Safe-react: If backend returns `null` for addresses the Transaction cannot be executed

Created on 18 Feb 2020  ·  8Comments  ·  Source: gnosis/safe-react

If gasToken or refundReceiver are null the interface cannot create the transaction hash and errors (see errors below). Therefore it is not possible to execute the transaction

Safe with example transactions:
https://rinkeby.gnosis-safe.io/safes/0xd9395aeE9141a3Efeb6d16057c8f67fBE296734c/transactions

Errors shown on console:

Error: “invalid address (arg=“gasToken”, coderType=“address”, value=null)”
Error: “invalid address (arg=“refundReceiver”, coderType=“address”, value=null)”
Bug 🐛 Major

All 8 comments

This does not affect users that do only create transactions through the interface, correct?

Correct

just a note: we need to set them to theirs default value if they're null. Probably using makeTransaction RecordFactory would help with other undesired scenarios.

@rmeissner, This bug was reported a long time ago. Now I'm checking the transactions of the reported Safe, and none of them have a null for those values.

Seems like they defaulted to 0x0000000000000000000000000000000000000000 (@Uxio0 is this due to a change in the back-end?)

Anyway, I'll do what I said in the previous comment (https://github.com/gnosis/safe-react/issues/573#issuecomment-597109363).

Ok, I'm not being able to reproduce this.

Tried even forcing the values to null, but no errors.

Seems like they defaulted to 0x0000000000000000000000000000000000000000 (@Uxio0 is this due to a change in the back-end?)

The backend allows null for some fields (like refund_receiver or gas_token) when you use the endpoint POST, but will use 0x0000...00 when indexed from blockchain.

That url you are using was previously shown using POST info, but after a reindex has now the 0x000..000 fields because it was updated from blockchain

This does not affect users that do only create transactions through the interface, correct?

@rmeissner, can you provide the steps to reproduce this? How to create transactions from outside the interface.

This does not affect users that do only create transactions through the interface, correct?

@rmeissner, can you provide the steps to reproduce this? How to create transactions from outside the interface.

Just go to the swagger https://safe-transaction.staging.gnosisdev.com/ and POST a tx setting some values like refund_receiver or gasToken null instead of 0x000...000

Was this page helpful?
0 / 5 - 0 ratings