Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/psbtwallet.cpp
Show All 38 Lines | for (size_t i = 0; i < psbtx.tx->vin.size(); ++i) { | ||||
// Get the Sighash type | // Get the Sighash type | ||||
if (sign && input.sighash_type.getRawSigHashType() > 0 && | if (sign && input.sighash_type.getRawSigHashType() > 0 && | ||||
input.sighash_type != sighash_type) { | input.sighash_type != sighash_type) { | ||||
return TransactionError::SIGHASH_MISMATCH; | return TransactionError::SIGHASH_MISMATCH; | ||||
} | } | ||||
complete &= | complete &= | ||||
SignPSBTInput(HidingSigningProvider(pwallet, !sign, !bip32derivs), | SignPSBTInput(HidingSigningProvider(pwallet->GetSigningProvider(), | ||||
!sign, !bip32derivs), | |||||
psbtx, i, sighash_type); | psbtx, i, sighash_type); | ||||
} | } | ||||
// Fill in the bip32 keypaths and redeemscripts for the outputs so that | // Fill in the bip32 keypaths and redeemscripts for the outputs so that | ||||
// hardware wallets can identify change | // hardware wallets can identify change | ||||
for (size_t i = 0; i < psbtx.tx->vout.size(); ++i) { | for (size_t i = 0; i < psbtx.tx->vout.size(); ++i) { | ||||
UpdatePSBTOutput(HidingSigningProvider(pwallet, true, !bip32derivs), | UpdatePSBTOutput(HidingSigningProvider(pwallet->GetSigningProvider(), | ||||
true, !bip32derivs), | |||||
psbtx, i); | psbtx, i); | ||||
} | } | ||||
return TransactionError::OK; | return TransactionError::OK; | ||||
} | } |