Merge pull request #607 from Chlup/fix_sample_compilation

Fix Sample SDK app compilation
This commit is contained in:
Francisco Gindre 2022-11-03 15:16:32 -03:00 committed by GitHub
commit b745cb807a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 42 additions and 39 deletions

View File

@ -18,7 +18,8 @@ class GetAddressViewController: UIViewController {
let synchronizer = SDKSynchronizer.shared
guard let uAddress = synchronizer.getUnifiedAddress(accountIndex: 0) else {
Task { @MainActor in
guard let uAddress = await synchronizer.getUnifiedAddress(accountIndex: 0) else {
unifiedAddressLabel.text = "could not derive UA"
tAddressLabel.text = "could not derive tAddress"
saplingAddress.text = "could not derive zAddress"
@ -55,6 +56,7 @@ class GetAddressViewController: UIViewController {
saplingAddress.isUserInteractionEnabled = true
loggerProxy.info("Address: \(String(describing: uAddress))")
}
}
@IBAction func spendingKeyTapped(_ gesture: UIGestureRecognizer) {
loggerProxy.event("copied to clipboard")

View File

@ -24,11 +24,12 @@ class GetUTXOsViewController: UIViewController {
func updateUI() {
let synchronizer = SDKSynchronizer.shared
let tAddress = synchronizer.getTransparentAddress(accountIndex: 0)?.stringEncoded ?? "no t-address found"
Task { @MainActor in
let tAddress = await synchronizer.getTransparentAddress(accountIndex: 0)?.stringEncoded ?? "no t-address found"
self.transparentAddressLabel.text = tAddress
Task { @MainActor in
// swiftlint:disable:next force_try
let balance = try! await AppDelegate.shared.sharedSynchronizer.getTransparentBalance(accountIndex: 0)

View File

@ -38,7 +38,7 @@ class SendViewController: UIViewController {
setUp()
Task { @MainActor in
// swiftlint:disable:next force_try
try! await synchronizer.prepare()
try! await synchronizer.prepare(with: DemoAppConfig.seed)
}
}