Skip to content

Commit 18e8353

Browse files
committed
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.
1 parent 15717f0 commit 18e8353

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/wallet/spend.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1138,7 +1138,7 @@ static util::Result<CreatedTransactionResult> CreateTransactionInternal(
11381138
// This can only happen if feerate is 0, and requested destinations are value of 0 (e.g. OP_RETURN)
11391139
// and no pre-selected inputs. This will result in 0-input transaction, which is consensus-invalid anyways
11401140
if (selection_target == 0 && !coin_control.HasSelected()) {
1141-
return util::Error{_("Transaction requires one destination of non-0 value, a non-0 feerate, or a pre-selected input")};
1141+
return util::Error{_("Transaction requires one destination of non-zero value, a non-zero feerate, or a pre-selected input")};
11421142
}
11431143

11441144
// Fetch manually selected coins

test/functional/rpc_psbt.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -999,7 +999,7 @@ def test_psbt_input_keys(psbt_input, keys):
999999
{'hex': '0200000001dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd0000000000000000000100000000000000000000000000', 'complete': True})
10001000

10011001
self.log.info("Test we don't crash when making a 0-value funded transaction at 0 fee without forcing an input selection")
1002-
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"})
1002+
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"})
10031003

10041004
self.log.info("Test descriptorprocesspsbt updates and signs a psbt with descriptors")
10051005

0 commit comments

Comments
 (0)