From 5dbc414e33ed3a1796eb980a7dbf94b7d13becca Mon Sep 17 00:00:00 2001 From: Matthew Fosse Date: Thu, 5 Sep 2024 14:48:11 -0700 Subject: [PATCH] fix workflows + ios fix --- .github/workflows/pr_test_build_android.yml | 2 +- .github/workflows/pr_test_build_linux.yml | 2 +- cw_mweb/ios/Classes/CwMwebPlugin.swift | 13 ++++++++----- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pr_test_build_android.yml b/.github/workflows/pr_test_build_android.yml index 0ff5ef367..306eb8282 100644 --- a/.github/workflows/pr_test_build_android.yml +++ b/.github/workflows/pr_test_build_android.yml @@ -112,8 +112,8 @@ jobs: # build mwebd: cd /opt/android/cake_wallet git clone https://github.com/ltcmweb/mwebd - git reset --hard 7f31c84eeb2e954f2c5f385b39db3b8e3b6389e3 cd /opt/android/cake_wallet/mwebd + git reset --hard 7f31c84eeb2e954f2c5f385b39db3b8e3b6389e3 gomobile bind -target=android -androidapi 21 . mkdir -p /opt/android/cake_wallet/cw_mweb/android/libs/ mv ./mwebd.aar $_ diff --git a/.github/workflows/pr_test_build_linux.yml b/.github/workflows/pr_test_build_linux.yml index e425cffbc..9faac2533 100644 --- a/.github/workflows/pr_test_build_linux.yml +++ b/.github/workflows/pr_test_build_linux.yml @@ -107,8 +107,8 @@ jobs: # build mwebd: cd /opt/android/cake_wallet git clone https://github.com/ltcmweb/mwebd - git reset --hard 7f31c84eeb2e954f2c5f385b39db3b8e3b6389e3 cd /opt/android/cake_wallet/mwebd + git reset --hard 7f31c84eeb2e954f2c5f385b39db3b8e3b6389e3 gomobile bind -target=android -androidapi 21 . mkdir -p /opt/android/cake_wallet/cw_mweb/android/libs/ mv ./mwebd.aar $_ diff --git a/cw_mweb/ios/Classes/CwMwebPlugin.swift b/cw_mweb/ios/Classes/CwMwebPlugin.swift index 81ebc4a87..f1fd78cd8 100644 --- a/cw_mweb/ios/Classes/CwMwebPlugin.swift +++ b/cw_mweb/ios/Classes/CwMwebPlugin.swift @@ -30,11 +30,14 @@ public static func register(with registrar: FlutterPluginRegistrar) { result(nil) break case "address": - let args = call.arguments as? [String: Any] - let scanSecret = args?["scanSecret"] as! Data - let spendPub = args?["spendPub"] as! Data - let index = args?["index"] as! Int32 - result(MwebdAddress(scanSecret, spendPub, index)) + let args = call.arguments as! [String: Any] + let scanSecret = args["scanSecret"] as! FlutterStandardTypedData + let spendPub = args["spendPub"] as! FlutterStandardTypedData + let index = args["index"] as! Int32 + + let scanSecretData = scanSecret.data + let spendPubData = spendPub.data + result(MwebdAddress(scanSecretData, spendPubData, index)) break default: result(FlutterMethodNotImplemented)