Merge pull request #282 from nodar-chkuaselidze/fix/createrawtransaction
RPC: Create/Sign Raw Transaction fix
This commit is contained in:
commit
c44293acd8
@ -1646,7 +1646,7 @@ RPC.prototype.createRawTransaction = async function createRawTransaction(args, h
|
|||||||
if (locktime != null)
|
if (locktime != null)
|
||||||
tx.locktime = locktime;
|
tx.locktime = locktime;
|
||||||
|
|
||||||
for (const obj of tx.inputs) {
|
for (const obj of inputs) {
|
||||||
const valid = new Validator([obj]);
|
const valid = new Validator([obj]);
|
||||||
const hash = valid.hash('txid');
|
const hash = valid.hash('txid');
|
||||||
const index = valid.u32('vout');
|
const index = valid.u32('vout');
|
||||||
@ -1835,7 +1835,7 @@ RPC.prototype.signRawTransaction = async function signRawTransaction(args, help)
|
|||||||
for (const prev of prevout) {
|
for (const prev of prevout) {
|
||||||
const valid = new Validator([prev]);
|
const valid = new Validator([prev]);
|
||||||
const hash = valid.hash('txid');
|
const hash = valid.hash('txid');
|
||||||
const index = valid.u32('index');
|
const index = valid.u32('vout');
|
||||||
const scriptRaw = valid.buf('scriptPubKey');
|
const scriptRaw = valid.buf('scriptPubKey');
|
||||||
const value = valid.ufixed('amount', 8);
|
const value = valid.ufixed('amount', 8);
|
||||||
const redeemRaw = valid.buf('redeemScript');
|
const redeemRaw = valid.buf('redeemScript');
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user