From 2a7720771388733ae97dc57ac232f31c0c25afe8 Mon Sep 17 00:00:00 2001 From: Yeastplume Date: Wed, 28 Nov 2018 11:02:29 +0000 Subject: [PATCH] http api output lock/finalize order (#2034) --- wallet/src/controller.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wallet/src/controller.rs b/wallet/src/controller.rs index 5c783e052..b7a3bdc0c 100644 --- a/wallet/src/controller.rs +++ b/wallet/src/controller.rs @@ -339,15 +339,16 @@ where if args.method == "http" { let adapter = HTTPWalletCommAdapter::new(); slate = adapter.send_tx_sync(&args.dest, &slate)?; + api.tx_lock_outputs(&slate, lock_fn)?; api.finalize_tx(&mut slate)?; } else if args.method == "file" { let adapter = FileWalletCommAdapter::new(); adapter.send_tx_async(&args.dest, &slate)?; + api.tx_lock_outputs(&slate, lock_fn)?; } else { error!("unsupported payment method: {}", args.method); return Err(ErrorKind::ClientCallback("unsupported payment method"))?; } - api.tx_lock_outputs(&slate, lock_fn)?; Ok(slate) })) }