Skip to content

Commit 58bf565

Browse files
committed
Merge #904: Fix parsing of amount commitments from prevtxs in signrawtrasnactionwithkey
a4045d2 Fix parsing of amount commitments from prevtxs in signrawtransactionwithkey (Glenn Willen) Pull request description: Tree-SHA512: 4bc38ac4bcf09c3dc0dd5a5bdcb75a031a6a86a8848390e63c1c466f1788155f6f6456b1aa3b36078c35d62d6093667c70a6895eb1ab59d6704300ebac8bbe56
2 parents 32b624b + a4045d2 commit 58bf565

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/rpc/rawtransaction.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1105,8 +1105,7 @@ UniValue SignTransaction(interfaces::Chain& chain, CMutableTransaction& mtx, con
11051105
newcoin.out.nValue = CConfidentialValue(AmountFromValue(find_value(prevOut, "amount")));
11061106
} else if (prevOut.exists("amountcommitment")) {
11071107
// Segwit sigs require the amount commitment to be sighashed
1108-
uint256 asset_commit = uint256S(prevOut["amountcommitment"].get_str());
1109-
newcoin.out.nValue.vchCommitment = std::vector<unsigned char>(asset_commit.begin(), asset_commit.end());
1108+
newcoin.out.nValue.vchCommitment = ParseHexO(prevOut, "amountcommitment");
11101109
}
11111110
newcoin.nHeight = 1;
11121111
view.AddCoin(out, std::move(newcoin), true);

0 commit comments

Comments
 (0)