balance-io / balance-wallet

A mobile wallet for dapps & tokens.
https://balance.io
GNU General Public License v3.0
94 stars 38 forks source link

Change import logic to fetch only after displaying feedback #392

Closed osdnk closed 5 years ago

osdnk commented 5 years ago

Motivation

Changing state ought to be considered as async action and then other operations (i.e. fetching) have to wait for it in order to omit race condition. Previously fetching was probably conflicting with displaying feedback.

Changes

https://github.com/neoziro/recompact/issues/59 Following this discussion figured out that lifecycle methods' hook is a solution for this case since compact does not provide any mechanism for registering proper callback. There was need to make fetch only after state's change.

Also, change fading logic and make it more smooth.

mikedemarais commented 5 years ago