ios fixes

This commit is contained in:
Matthew Fosse 2024-09-05 14:40:13 -07:00
parent 20fa6a0bbd
commit 14891ec4f5
2 changed files with 6 additions and 6 deletions

View file

@ -42,7 +42,7 @@ class CwMwebPlugin: FlutterPlugin, MethodCallHandler {
val scanSecret: ByteArray = call.argument<ByteArray>("scanSecret") ?: ByteArray(0)
val spendPub: ByteArray = call.argument<ByteArray>("spendPub") ?: ByteArray(0)
val index: Int = call.argument<Int>("index") ?: 0
val res = Mwebd.addressIndex(scanSecret, spendPub, index)
val res = Mwebd.address(scanSecret, spendPub, index)
result.success(res)
} else {
result.notImplemented()

View file

@ -31,10 +31,10 @@ public static func register(with registrar: FlutterPluginRegistrar) {
break
case "address":
let args = call.arguments as? [String: Any]
let scanSecret = args?["scanSecret"]
let spendPub = args?["spendPub"]
let index = args?["index"]
result(MwebdAddressIndex(scanSecret, spendPub, index))
let scanSecret = args?["scanSecret"] as! Data
let spendPub = args?["spendPub"] as! Data
let index = args?["index"] as! Int32
result(MwebdAddress(scanSecret, spendPub, index))
break
default:
result(FlutterMethodNotImplemented)
@ -80,4 +80,4 @@ public static func register(with registrar: FlutterPluginRegistrar) {
deinit {
stopServer()
}
}
}