From 09bc186feadd5ad3048060a38757a9cb5f33b94a Mon Sep 17 00:00:00 2001 From: cyan Date: Tue, 26 Nov 2024 14:40:26 +0100 Subject: [PATCH] Cw 835 investigate failed to get earliest block height when sending monero (#1827) * update flutter to 3.24.3 * bump flutter to 3.24.4, fix all android issues (i hope) * update uni_links path * update sensitive_clipboard * update dependencies * update fast_scanner * update the ref * Update how_to_add_new_wallet_type.md [skip ci] * Update how_to_add_new_wallet_type.md [skip ci] * Update how_to_add_new_wallet_type.md [skip ci] * Update how_to_add_new_wallet_type.md [skip ci] * CW-835: Fix failed to get earlist block height when sending monero --------- Co-authored-by: Omar Hatem --- cw_monero/lib/api/transaction_history.dart | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/cw_monero/lib/api/transaction_history.dart b/cw_monero/lib/api/transaction_history.dart index f55545801..a00a6b206 100644 --- a/cw_monero/lib/api/transaction_history.dart +++ b/cw_monero/lib/api/transaction_history.dart @@ -91,12 +91,19 @@ Future createTransactionSync( List preferredInputs = const []}) async { final amt = amount == null ? 0 : monero.Wallet_amountFromString(amount); - + + final waddr = wptr!.address; + + // force reconnection in case the os killed the connection? + // fixes failed to get block height error. + Isolate.run(() async { + monero.Wallet_synchronized(Pointer.fromAddress(waddr)); + }); + final address_ = address.toNativeUtf8(); final paymentId_ = paymentId.toNativeUtf8(); final preferredInputs_ = preferredInputs.join(monero.defaultSeparatorStr).toNativeUtf8(); - final waddr = wptr!.address; final addraddr = address_.address; final paymentIdAddr = paymentId_.address; final preferredInputsAddr = preferredInputs_.address;