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)});
}
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)});
}