diff --git a/cw_monero/lib/ledger.dart b/cw_monero/lib/ledger.dart index d931b58d0..19c427b7a 100644 --- a/cw_monero/lib/ledger.dart +++ b/cw_monero/lib/ledger.dart @@ -8,6 +8,7 @@ import 'package:ffi/ffi.dart'; import 'package:ledger_flutter_plus/ledger_flutter_plus.dart'; import 'package:ledger_flutter_plus/ledger_flutter_plus_dart.dart'; import 'package:monero/src/wallet2.dart'; +import 'package:monero/src/monero.dart' as api; LedgerConnection? gLedger; @@ -17,15 +18,15 @@ Timer? _ledgerKeepAlive; void enableLedgerExchange(Wallet2Wallet wallet, LedgerConnection connection) { _ledgerExchangeTimer?.cancel(); _ledgerExchangeTimer = Timer.periodic(Duration(milliseconds: 1), (_) async { - final ledgerRequestLength = wallet.getSendToDeviceLength(); - final ledgerRequest = wallet.getSendToDevice() + final ledgerRequestLength = api.MoneroWallet.getSendToDeviceLength(); + final ledgerRequest = api.MoneroWallet.getSendToDevice() .cast() .asTypedList(ledgerRequestLength); if (ledgerRequestLength > 0) { _ledgerKeepAlive?.cancel(); final Pointer emptyPointer = malloc(0); - wallet.setDeviceSendData( + api.MoneroWallet.setDeviceSendData( emptyPointer.cast(), 0); malloc.free(emptyPointer); @@ -44,8 +45,7 @@ void enableLedgerExchange(Wallet2Wallet wallet, LedgerConnection connection) { for (var i = 0; i < response.length; i++) { result.asTypedList(response.length)[i] = response[i]; } - - wallet.setDeviceReceivedData( + api.MoneroWallet.setDeviceReceivedData( result.cast(), response.length); malloc.free(result); keepAlive(connection); diff --git a/cw_monero/pubspec.lock b/cw_monero/pubspec.lock index 8f94def22..2cd6ae4d6 100644 --- a/cw_monero/pubspec.lock +++ b/cw_monero/pubspec.lock @@ -573,8 +573,8 @@ packages: dependency: "direct main" description: path: "impls/monero.dart" - ref: b335585a7fb94b315eb52bd88f2da6d3489fa508 - resolved-ref: b335585a7fb94b315eb52bd88f2da6d3489fa508 + ref: a27fbcb24d91143715ed930a05aaa4d853fba1f2 + resolved-ref: a27fbcb24d91143715ed930a05aaa4d853fba1f2 url: "https://github.com/mrcyjanek/monero_c" source: git version: "0.0.0" diff --git a/cw_monero/pubspec.yaml b/cw_monero/pubspec.yaml index 90d0b85ab..a34e86ff0 100644 --- a/cw_monero/pubspec.yaml +++ b/cw_monero/pubspec.yaml @@ -27,7 +27,7 @@ dependencies: monero: git: url: https://github.com/mrcyjanek/monero_c - ref: b335585a7fb94b315eb52bd88f2da6d3489fa508 + ref: a27fbcb24d91143715ed930a05aaa4d853fba1f2 path: impls/monero.dart mutex: ^3.1.0 ledger_flutter_plus: ^1.4.1 diff --git a/cw_wownero/pubspec.lock b/cw_wownero/pubspec.lock index 3e42905c0..91711105f 100644 --- a/cw_wownero/pubspec.lock +++ b/cw_wownero/pubspec.lock @@ -480,8 +480,8 @@ packages: dependency: "direct main" description: path: "impls/monero.dart" - ref: b335585a7fb94b315eb52bd88f2da6d3489fa508 - resolved-ref: b335585a7fb94b315eb52bd88f2da6d3489fa508 + ref: a27fbcb24d91143715ed930a05aaa4d853fba1f2 + resolved-ref: a27fbcb24d91143715ed930a05aaa4d853fba1f2 url: "https://github.com/mrcyjanek/monero_c" source: git version: "0.0.0" diff --git a/cw_wownero/pubspec.yaml b/cw_wownero/pubspec.yaml index 7b9ec4c41..8368f8bf8 100644 --- a/cw_wownero/pubspec.yaml +++ b/cw_wownero/pubspec.yaml @@ -25,7 +25,7 @@ dependencies: monero: git: url: https://github.com/mrcyjanek/monero_c - ref: b335585a7fb94b315eb52bd88f2da6d3489fa508 # monero_c hash + ref: a27fbcb24d91143715ed930a05aaa4d853fba1f2 # monero_c hash path: impls/monero.dart mutex: ^3.1.0 diff --git a/cw_zano/pubspec.lock b/cw_zano/pubspec.lock index 21a59ed84..1f24c6d07 100644 --- a/cw_zano/pubspec.lock +++ b/cw_zano/pubspec.lock @@ -485,8 +485,8 @@ packages: dependency: "direct main" description: path: "impls/monero.dart" - ref: b335585a7fb94b315eb52bd88f2da6d3489fa508 - resolved-ref: b335585a7fb94b315eb52bd88f2da6d3489fa508 + ref: a27fbcb24d91143715ed930a05aaa4d853fba1f2 + resolved-ref: a27fbcb24d91143715ed930a05aaa4d853fba1f2 url: "https://github.com/mrcyjanek/monero_c" source: git version: "0.0.0" @@ -842,4 +842,4 @@ packages: version: "3.1.3" sdks: dart: ">=3.5.0 <4.0.0" - flutter: ">=3.27.4" + flutter: ">=3.24.0" diff --git a/cw_zano/pubspec.yaml b/cw_zano/pubspec.yaml index ff2c1e9a6..9546aac8d 100644 --- a/cw_zano/pubspec.yaml +++ b/cw_zano/pubspec.yaml @@ -26,7 +26,7 @@ dependencies: monero: git: url: https://github.com/mrcyjanek/monero_c - ref: b335585a7fb94b315eb52bd88f2da6d3489fa508 # monero_c hash + ref: a27fbcb24d91143715ed930a05aaa4d853fba1f2 # monero_c hash path: impls/monero.dart dev_dependencies: flutter_test: diff --git a/scripts/prepare_moneroc.sh b/scripts/prepare_moneroc.sh index b49ad2c34..ef29d360f 100755 --- a/scripts/prepare_moneroc.sh +++ b/scripts/prepare_moneroc.sh @@ -8,7 +8,7 @@ if [[ ! -d "monero_c/.git" ]]; then git clone https://github.com/mrcyjanek/monero_c --branch master monero_c cd monero_c - git checkout b335585a7fb94b315eb52bd88f2da6d3489fa508 + git checkout a27fbcb24d91143715ed930a05aaa4d853fba1f2 git reset --hard git submodule update --init --force --recursive ./apply_patches.sh monero