Skip to content

Commit 5db3c63

Browse files
committed
add mounted check
1 parent d090eae commit 5db3c63

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/pages/send_view/token_send_view.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ class _TokenSendViewState extends ConsumerState<TokenSendView> {
317317

318318
_cryptoAmountChangedFeeUpdateTimer?.cancel();
319319
_cryptoAmountChangedFeeUpdateTimer = Timer(updateFeesTimerDuration, () {
320-
if (coin is! Epiccash && !_baseFocus.hasFocus) {
320+
if (mounted && coin is! Epiccash && !_baseFocus.hasFocus) {
321321
setState(() {
322322
_calculateFeesFuture = calculateFees();
323323
});
@@ -329,7 +329,7 @@ class _TokenSendViewState extends ConsumerState<TokenSendView> {
329329
void _baseAmountChanged() {
330330
_baseAmountChangedFeeUpdateTimer?.cancel();
331331
_baseAmountChangedFeeUpdateTimer = Timer(updateFeesTimerDuration, () {
332-
if (coin is! Epiccash && !_cryptoFocus.hasFocus) {
332+
if (mounted && coin is! Epiccash && !_cryptoFocus.hasFocus) {
333333
setState(() {
334334
_calculateFeesFuture = calculateFees();
335335
});

0 commit comments

Comments
 (0)