Skip to content

invalid nonce parsed #7

@AmitShah

Description

@AmitShah

The nonce returned from infura is a string with 0x prefix. Conver this string to buffer then send to BN parsing: Below is the fix

getTransactionCount (address) {
return this.fetchSimple('eth_getTransactionCount', [util.addHexPrefix(address.toString('hex')), 'latest'],x=>{
return new util.BN(util.toBuffer(x).toString('hex'),16)});
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions