Skip to content

Commit

Permalink
run actions after interactions (#360)
Browse files Browse the repository at this point in the history
  • Loading branch information
brunobar79 authored Feb 13, 2020
1 parent 1d5a130 commit 46d88dd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 5 additions & 3 deletions src/screens/ExchangeModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,9 +255,11 @@ class ExchangeModal extends Component {
this.inputFocusInteractionHandle
);
}
this.props.uniswapClearCurrenciesAndReserves();
this.props.gasPricesStopPolling();
this.props.web3ListenerStop();
InteractionManager.runAfterInteractions(() => {
this.props.uniswapClearCurrenciesAndReserves();
this.props.gasPricesStopPolling();
this.props.web3ListenerStop();
});
};

lastFocusedInput = null;
Expand Down
4 changes: 3 additions & 1 deletion src/screens/SendSheet.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@ const SendSheet = ({
gasPricesStartPolling();
});
return () => {
gasPricesStopPolling();
InteractionManager.runAfterInteractions(() => {
gasPricesStopPolling();
});
};
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
Expand Down

0 comments on commit 46d88dd

Please sign in to comment.