safe-global / safe-android

🔐 App to manage and interact with Safe
https://safe.global
GNU General Public License v3.0
90 stars 38 forks source link

JsonParse exception thrown on dataDecoded deserialise #784

Closed jpalvarezl closed 4 years ago

jpalvarezl commented 4 years ago

Describe the bug When calling the /safes/<safe_address>/creation endpoint some safes return a dataDecoded with a parameter that contains a ParamsDto with a value field that is an array instead of a string

To Reproduce Attempt to deserialise the response from /safes/0x1230B3d59858296A31053C1b8562Ecf89A2f888b/creation with the current moshi setup

Expected behavior The app should be able to handle this polymorphism

Additional context This will be solved in the client gateway, however this structure could still be fetched around the gateway somehow causing the exception to be thrown.

jpalvarezl commented 4 years ago

For reference: https://github.com/gnosis/safe-client-gateway/issues/77

tschubotz commented 4 years ago

this bug is about the creation tx, right? (#315). I marked it as "minor" since I think it's not 100% required before the public release. This doesn't lead to a cras currently, does it? @jpalvarezl @elgatovital

jpalvarezl commented 4 years ago

@tschubotz For now it is safe as long as the source of the data es the gateway. We solved it there, but this issue will arise whenever there is a solidity type of array returned by the backend. For now, the worst that will happen is that maybe no data is shown. I doubt it will crash the app, but it maybe show a weird empty/error state.

liliya-soroka commented 4 years ago

Verified for the safe 0x1230B3d59858296A31053C1b8562Ecf89A2f888b app version 2.1.0 - 1105