diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 6d04ccd6a..ca3fde8d0 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -4521,10 +4521,10 @@ int32_t komodo_staked(uint32_t nBits,uint32_t *blocktimep,uint32_t *txtimep,uint txNew.vin[0].prevout.hash = revtxid; txNew.vin[0].prevout.n = *utxovoutp; txNew.vout[0].scriptPubKey = CScript() << ParseHex(NOTARY_PUBKEY) << OP_CHECKSIG; - txNew.vout[0].nValue = nValue - txfee; + txNew.vout[0].nValue = *utxovaluep - txfee; txNew.nLockTime = *blocktimep; CTransaction txNewConst(txNew); - signSuccess = ProduceSignature(TransactionSignatureCreator(&keystore, &txNewConst, 0, nValue, SIGHASH_ALL), best_scriptPubKey, sigdata, consensusBranchId); + signSuccess = ProduceSignature(TransactionSignatureCreator(&keystore, &txNewConst, 0, *utxovaluep, SIGHASH_ALL), best_scriptPubKey, sigdata, consensusBranchId); if (!signSuccess) fprintf(stderr,"failed to create signature\n"); else