diff --git a/lib/app/features/wallet/views/pages/coins_flow/coin_receive_modal/coin_receive_modal.dart b/lib/app/features/wallet/views/pages/coins_flow/coin_receive_modal/coin_receive_modal.dart index 03cc78234..09cefd8d0 100644 --- a/lib/app/features/wallet/views/pages/coins_flow/coin_receive_modal/coin_receive_modal.dart +++ b/lib/app/features/wallet/views/pages/coins_flow/coin_receive_modal/coin_receive_modal.dart @@ -1,6 +1,7 @@ // SPDX-License-Identifier: ice License 1.0 import 'package:flutter/material.dart'; +import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:ion/app/components/list_item/list_item.dart'; import 'package:ion/app/components/screen_offset/screen_bottom_offset.dart'; @@ -25,10 +26,13 @@ class CoinReceiveModal extends HookConsumerWidget { Widget build(BuildContext context, WidgetRef ref) { final receiveCoinState = ref.watch(receiveCoinsFormControllerProvider); - void updateNetwork(NetworkType network) { - final clarifiedNetwork = network == NetworkType.all ? NetworkType.arbitrum : network; - ref.read(receiveCoinsFormControllerProvider.notifier).setNetwork(clarifiedNetwork); - } + final updateNetwork = useCallback( + (NetworkType network) { + final clarifiedNetwork = network == NetworkType.all ? NetworkType.arbitrum : network; + ref.read(receiveCoinsFormControllerProvider.notifier).setNetwork(clarifiedNetwork); + }, + [], + ); useOnInit( () => updateNetwork(receiveCoinState.selectedNetwork),