0xProject / 0x-launch-kit-frontend

Apache License 2.0
114 stars 208 forks source link

(Bug) Locked/Unlocked token icon it's updated before the transaction finish #185

Closed mariano-aguero closed 5 years ago

mariano-aguero commented 5 years ago

Closes #176

mariano-aguero commented 5 years ago

I think the modal component shouldn't be responsible of doing this.

Instead, we could await for the transaction to be successful in the toggleTokenLock action:

        web3Wrapper.awaitTransactionSuccessAsync(tx).then(() => {
            dispatch(updateTokenBalancesOnToggleTokenLock(token, isUnlocked));
        });

    return tx;

@fvictorio Done!