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 <omarh.ismail1@gmail.com>
cyan committed
Nov 26, 2024 at 14:40 UTC
09bc186feadd5ad3048060a38757a9cb5f33b94a
1 file changed
+9
-2
cw_monero/lib/api/transaction_history.dart
+9
-2
@@ -91,12 +91,19 @@ Future<PendingTransactionDescription> createTransactionSync(
91
List<String> preferredInputs = const []}) async {
92
93
final amt = amount == null ? 0 : monero.Wallet_amountFromString(amount);
94
-
94
+
95
+ final waddr = wptr!.address;
96
+
97
+ // force reconnection in case the os killed the connection?
98
+ // fixes failed to get block height error.
99
+ Isolate.run(() async {
100
+ monero.Wallet_synchronized(Pointer.fromAddress(waddr));
101
+ });
102
+
103
final address_ = address.toNativeUtf8();
104
final paymentId_ = paymentId.toNativeUtf8();
105
final preferredInputs_ = preferredInputs.join(monero.defaultSeparatorStr).toNativeUtf8();
106
99
- final waddr = wptr!.address;
107
final addraddr = address_.address;
108
final paymentIdAddr = paymentId_.address;
109
final preferredInputsAddr = preferredInputs_.address;