1
0
mirror of https://github.com/bitcoin/bips.git synced 2026-02-23 15:38:22 +00:00

Do not crash reference implementation if there is no address in the bip21

This commit is contained in:
nicolas.dorier
2020-06-18 11:04:59 +09:00
parent a2a085cdb4
commit a3fbc6c620

View File

@@ -424,6 +424,7 @@ public async Task<PSBT> RequestPayjoin(
for (int i = 0; i < originalGlobalTx.Outputs.Count; i++) for (int i = 0; i < originalGlobalTx.Outputs.Count; i++)
{ {
if (optionalParameters.DisableOutputSubstitution || if (optionalParameters.DisableOutputSubstitution ||
bip21.Address == null ||
signedPSBT.Outputs[i].ScriptPubKey != bip21.Address.ScriptPubKey) signedPSBT.Outputs[i].ScriptPubKey != bip21.Address.ScriptPubKey)
ourOutputs.Enqueue((originalGlobalTx.Outputs[i], signedPSBT.Outputs[i])); ourOutputs.Enqueue((originalGlobalTx.Outputs[i], signedPSBT.Outputs[i]));
} }