Skip to content
This repository has been archived by the owner on Jul 9, 2021. It is now read-only.

Unmarshal pending TX Receipt error [parity][kovan] #1307

Closed
dekz opened this issue Nov 23, 2018 · 1 comment
Closed

Unmarshal pending TX Receipt error [parity][kovan] #1307

dekz opened this issue Nov 23, 2018 · 1 comment

Comments

@dekz
Copy link
Member

dekz commented Nov 23, 2018

Parity (test on Kovan) will happily return you a receipt when the transaction is still pending.

This breaks our unmarshal assumption where we expect the data to be present. Geth behaves as expected and does not return a pending receipt.

#1291
openethereum/parity-ethereum#1180

⠦ Maker ZRX Approval: 0x252e46b28e4e0ee4273ddb1da9eba880b65cb03b809c7262f6d051f2ae38008e{ blockHash: null,
  blockNumber: null,
  contractAddress: null,
  cumulativeGasUsed: '0xf274d',
  from: null,
  gasUsed: '0x6a48',
  logs:
   [ { address: '0x2002d3812f58e35f0ea1ffbf80a75a38c32175fa',
       blockHash: null,
       blockNumber: null,
       data:
        '0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff',
       logIndex: null,
       removed: false,
       topics: [Array],
       transactionHash: null,
       transactionIndex: null,
       transactionLogIndex: null,
       type: 'pending' } ],
  logsBloom:
   '0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100200000000002000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002008000000000080000000000000000000000000000000020000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000005000000000000000000000000000000000000000',
  root: null,
  status: '0x1',
  to: null,
  transactionHash:
   '0x252e46b28e4e0ee4273ddb1da9eba880b65cb03b809c7262f6d051f2ae38008e',
  transactionIndex: '0x13' }
✖ Maker ZRX Approval
{ BigNumber Error: new BigNumber() not a number: null
    at raise (/Users/jacob/projects/ethdev/0x/0x.js/node_modules/bignumber.js/bignumber.js:1190:25)
    at /Users/jacob/projects/ethdev/0x/0x.js/node_modules/bignumber.js/bignumber.js:1178:33
    at new BigNumber (/Users/jacob/projects/ethdev/0x/0x.js/node_modules/bignumber.js/bignumber.js:193:67)
    at Object.convertHexToNumber (/Users/jacob/projects/ethdev/0x/0x.js/packages/web3-wrapper/src/utils.ts:10:32)

Expected Behavior

Handle the case where parity or other nodes return a pending receipt

Current Behavior

Attempts to unmarshall and throws.

Possible Solution

Check for a blockNumber before attempting to unmarshal.

Steps to Reproduce (for bugs)

1. Connect to Kovan (parity 2.0.x)
2. Await a mined transaction using latest Web3Wrapper.
3.

Context

Your Environment

Package Version
Network
NAME
@dekz
Copy link
Member Author

dekz commented Nov 26, 2018

fixed in #1308

@dekz dekz closed this as completed Nov 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant