diff --git a/lib/home/bloc/state.dart b/lib/home/bloc/state.dart index f434710e..7cfda421 100644 --- a/lib/home/bloc/state.dart +++ b/lib/home/bloc/state.dart @@ -131,12 +131,17 @@ class HomeState with _$HomeState { Transaction? getTxFromSwap(SwapTx swap) { final isLiq = swap.walletType == BaseWalletType.Liquid; final network = swap.network; + print('----> 1 $isLiq $network'); final wallet = !isLiq ? getMainSecureWallet(network)?.state.wallet : getMainInstantWallet(network)?.state.wallet; + print('----> 2 $wallet'); if (wallet == null) return null; + print('----> 3'); final idx = wallet.transactions.indexWhere((t) => t.swapTx?.id == swap.id); + print('----> 4 $idx'); if (idx == -1) return null; + print('----> 5'); return wallet.transactions[idx]; } diff --git a/lib/swap/receive.dart b/lib/swap/receive.dart index 23077e78..f6467b40 100644 --- a/lib/swap/receive.dart +++ b/lib/swap/receive.dart @@ -303,11 +303,12 @@ class _ReceivingSwapPageState extends State { if (swapTx.id != widget.tx.id) return; if (swapTx.settledReverse()) { - await Future.delayed(200.ms); - tx = context.read().state.getTxFromSwap(widget.tx); setState(() { received = true; }); + await Future.delayed(800.ms); + tx = context.read().state.getTxFromSwap(widget.tx); + setState(() {}); } }, child: Scaffold(