Skip to content

Assertion failed error. #3856

Closed Answered by 0xharsha
0xharsha asked this question in Q&A
May 24, 2024 · 2 comments · 8 replies
Discussion options

You must be logged in to vote

@satoshiotomakan thank you for reviewing my code. after buffer reverse (i.e, Buffer.from(utxo.txid, 'hex').reverse()) it's working fine for me.

const utxo1 = TW.Bitcoin.Proto.UnspentTransaction.create({
    outPoint: {
        hash: Buffer.from(utxo.txid, 'hex').reverse(), // after reverse it's working fine. 
        index: utxo.vout,
        sequence: 4294967295 // default sequence
    },
    amount: new Long(utxo.satoshis),
    script: walletCore.BitcoinScript.lockScriptForAddress(
        fromAddress,
        walletCore.CoinType.bitcoin
    ).data()
});

Replies: 2 comments 8 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
8 replies
@0xharsha
Comment options

@satoshiotomakan
Comment options

@0xharsha
Comment options

@0xharsha
Comment options

Answer selected by 0xharsha
@satoshiotomakan
Comment options

@Doferesouleymane
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
bug Something isn't working
3 participants
Converted from issue

This discussion was converted from issue #3855 on May 24, 2024 09:47.