mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-29 14:59:39 -04:00
wallet: Replace "non-0" with "non-zero" in translatable error message
Transifex interprets the "-0" substring as a number in translatable strings. Since not all translations preserve "-0," this triggers a corresponding warning. While this warning could be disabled globally, it is more reasonable to adjust the original string instead.
This commit is contained in:
parent
15717f0ef3
commit
18e83534ac
2 changed files with 2 additions and 2 deletions
|
@ -1138,7 +1138,7 @@ static util::Result<CreatedTransactionResult> CreateTransactionInternal(
|
||||||
// This can only happen if feerate is 0, and requested destinations are value of 0 (e.g. OP_RETURN)
|
// This can only happen if feerate is 0, and requested destinations are value of 0 (e.g. OP_RETURN)
|
||||||
// and no pre-selected inputs. This will result in 0-input transaction, which is consensus-invalid anyways
|
// and no pre-selected inputs. This will result in 0-input transaction, which is consensus-invalid anyways
|
||||||
if (selection_target == 0 && !coin_control.HasSelected()) {
|
if (selection_target == 0 && !coin_control.HasSelected()) {
|
||||||
return util::Error{_("Transaction requires one destination of non-0 value, a non-0 feerate, or a pre-selected input")};
|
return util::Error{_("Transaction requires one destination of non-zero value, a non-zero feerate, or a pre-selected input")};
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fetch manually selected coins
|
// Fetch manually selected coins
|
||||||
|
|
|
@ -999,7 +999,7 @@ class PSBTTest(BitcoinTestFramework):
|
||||||
{'hex': '0200000001dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd0000000000000000000100000000000000000000000000', 'complete': True})
|
{'hex': '0200000001dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd0000000000000000000100000000000000000000000000', 'complete': True})
|
||||||
|
|
||||||
self.log.info("Test we don't crash when making a 0-value funded transaction at 0 fee without forcing an input selection")
|
self.log.info("Test we don't crash when making a 0-value funded transaction at 0 fee without forcing an input selection")
|
||||||
assert_raises_rpc_error(-4, "Transaction requires one destination of non-0 value, a non-0 feerate, or a pre-selected input", self.nodes[0].walletcreatefundedpsbt, [], [{"data": "deadbeef"}], 0, {"fee_rate": "0"})
|
assert_raises_rpc_error(-4, "Transaction requires one destination of non-zero value, a non-zero feerate, or a pre-selected input", self.nodes[0].walletcreatefundedpsbt, [], [{"data": "deadbeef"}], 0, {"fee_rate": "0"})
|
||||||
|
|
||||||
self.log.info("Test descriptorprocesspsbt updates and signs a psbt with descriptors")
|
self.log.info("Test descriptorprocesspsbt updates and signs a psbt with descriptors")
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue