mirror of
https://github.com/mimblewimble/grin.git
synced 2025-02-01 17:01:09 +03:00
http api output lock/finalize order (#2034)
This commit is contained in:
parent
b95caecc27
commit
2a77207713
1 changed files with 2 additions and 1 deletions
|
@ -339,15 +339,16 @@ where
|
||||||
if args.method == "http" {
|
if args.method == "http" {
|
||||||
let adapter = HTTPWalletCommAdapter::new();
|
let adapter = HTTPWalletCommAdapter::new();
|
||||||
slate = adapter.send_tx_sync(&args.dest, &slate)?;
|
slate = adapter.send_tx_sync(&args.dest, &slate)?;
|
||||||
|
api.tx_lock_outputs(&slate, lock_fn)?;
|
||||||
api.finalize_tx(&mut slate)?;
|
api.finalize_tx(&mut slate)?;
|
||||||
} else if args.method == "file" {
|
} else if args.method == "file" {
|
||||||
let adapter = FileWalletCommAdapter::new();
|
let adapter = FileWalletCommAdapter::new();
|
||||||
adapter.send_tx_async(&args.dest, &slate)?;
|
adapter.send_tx_async(&args.dest, &slate)?;
|
||||||
|
api.tx_lock_outputs(&slate, lock_fn)?;
|
||||||
} else {
|
} else {
|
||||||
error!("unsupported payment method: {}", args.method);
|
error!("unsupported payment method: {}", args.method);
|
||||||
return Err(ErrorKind::ClientCallback("unsupported payment method"))?;
|
return Err(ErrorKind::ClientCallback("unsupported payment method"))?;
|
||||||
}
|
}
|
||||||
api.tx_lock_outputs(&slate, lock_fn)?;
|
|
||||||
Ok(slate)
|
Ok(slate)
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue