Merge pull request #5441 from joostjager/cli-fix-fund-psbt

lncli: fix psbt fund parameter parsing
This commit is contained in:
Olaoluwa Osuntokun authored and GitHub committed 2021-06-30 17:56:34 -07:00
commit 3dc375603f
1 file changed
+6 -5
+6 -5
View File
@@ -651,15 +651,16 @@ func fundPsbt(ctx *cli.Context) error {
return fmt.Errorf("cannot set conf_target and sat_per_vbyte " +
"at the same time")
case ctx.Uint64("conf_target") > 0:
req.Fees = &walletrpc.FundPsbtRequest_TargetConf{
TargetConf: uint32(ctx.Uint64("conf_target")),
}
case ctx.Uint64("sat_per_vbyte") > 0:
req.Fees = &walletrpc.FundPsbtRequest_SatPerVbyte{
SatPerVbyte: ctx.Uint64("sat_per_vbyte"),
}
// Check conf_target last because it has a default value.
case ctx.Uint64("conf_target") > 0:
req.Fees = &walletrpc.FundPsbtRequest_TargetConf{
TargetConf: uint32(ctx.Uint64("conf_target")),
}
}
walletClient, cleanUp := getWalletClient(ctx)