diff --git a/BDKSwiftExampleWallet.xcodeproj/project.pbxproj b/BDKSwiftExampleWallet.xcodeproj/project.pbxproj index 969404d4..88d5ffbd 100644 --- a/BDKSwiftExampleWallet.xcodeproj/project.pbxproj +++ b/BDKSwiftExampleWallet.xcodeproj/project.pbxproj @@ -108,6 +108,7 @@ AEE6C74F2ABCBA4600442ADD /* WalletSyncState.swift in Sources */ = {isa = PBXBuildFile; fileRef = AEE6C74E2ABCBA4600442ADD /* WalletSyncState.swift */; }; AEE83A492C07F54B00834468 /* BitcoinDevKit in Frameworks */ = {isa = PBXBuildFile; productRef = AEE83A482C07F54B00834468 /* BitcoinDevKit */; }; AEEA0E402DEF80B600C83255 /* Outpoint+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = AEEA0E3F2DEF80B600C83255 /* Outpoint+Extensions.swift */; }; + AEEC65532E8EC260003B55E8 /* AppIcon.icon in Resources */ = {isa = PBXBuildFile; fileRef = AEEC65522E8EC25F003B55E8 /* AppIcon.icon */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -213,6 +214,7 @@ AEE6C74B2ABCB3E200442ADD /* Transaction+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Transaction+Extensions.swift"; sourceTree = ""; }; AEE6C74E2ABCBA4600442ADD /* WalletSyncState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WalletSyncState.swift; sourceTree = ""; }; AEEA0E3F2DEF80B600C83255 /* Outpoint+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Outpoint+Extensions.swift"; sourceTree = ""; }; + AEEC65522E8EC25F003B55E8 /* AppIcon.icon */ = {isa = PBXFileReference; lastKnownFileType = folder.iconcomposer.icon; path = AppIcon.icon; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -267,6 +269,7 @@ A7FBCE392A72944C007C960E /* Resources */ = { isa = PBXGroup; children = ( + AEEC65522E8EC25F003B55E8 /* AppIcon.icon */, A733D6CF2A81113000F333B4 /* Localizable.xcstrings */, ); path = Resources; @@ -697,6 +700,7 @@ buildActionMask = 2147483647; files = ( AE4984A62A1BBCB8009951E2 /* README.md in Resources */, + AEEC65532E8EC260003B55E8 /* AppIcon.icon in Resources */, A733D6D02A81113000F333B4 /* Localizable.xcstrings in Resources */, AE4984832A1BBBD7009951E2 /* Preview Assets.xcassets in Resources */, AE4984802A1BBBD7009951E2 /* Assets.xcassets in Resources */, diff --git a/BDKSwiftExampleWallet/Assets.xcassets/AppIcon.appiconset/Contents.json b/BDKSwiftExampleWallet/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index e879b7f2..00000000 --- a/BDKSwiftExampleWallet/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "images" : [ - { - "filename" : "Icon-Light-1024x1024.png", - "idiom" : "universal", - "platform" : "ios", - "size" : "1024x1024" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/BDKSwiftExampleWallet/Assets.xcassets/AppIcon.appiconset/Icon-Light-1024x1024.png b/BDKSwiftExampleWallet/Assets.xcassets/AppIcon.appiconset/Icon-Light-1024x1024.png deleted file mode 100644 index 57aa922a..00000000 Binary files a/BDKSwiftExampleWallet/Assets.xcassets/AppIcon.appiconset/Icon-Light-1024x1024.png and /dev/null differ diff --git a/BDKSwiftExampleWallet/Extensions/BDK+Extensions/CbfClient+Extensions.swift b/BDKSwiftExampleWallet/Extensions/BDK+Extensions/CbfClient+Extensions.swift index 062b2a2b..dd559ecf 100644 --- a/BDKSwiftExampleWallet/Extensions/BDK+Extensions/CbfClient+Extensions.swift +++ b/BDKSwiftExampleWallet/Extensions/BDK+Extensions/CbfClient+Extensions.swift @@ -48,7 +48,7 @@ extension CbfClient { let info = try await self.nextInfo() CbfClient.monitoringTasksQueue.sync { Self.lastInfoAt[id] = Date() } switch info { - case let .progress(progress): + case .progress(let progress): await MainActor.run { NotificationCenter.default.post( name: NSNotification.Name("KyotoProgressUpdate"), @@ -56,7 +56,7 @@ extension CbfClient { userInfo: ["progress": progress] ) } - case let .newChainHeight(height): + case .newChainHeight(let height): await MainActor.run { NotificationCenter.default.post( name: NSNotification.Name("KyotoChainHeightUpdate"), diff --git a/BDKSwiftExampleWallet/Model/BalanceDisplayFormat.swift b/BDKSwiftExampleWallet/Model/BalanceDisplayFormat.swift index 56b8493a..8b50eedd 100644 --- a/BDKSwiftExampleWallet/Model/BalanceDisplayFormat.swift +++ b/BDKSwiftExampleWallet/Model/BalanceDisplayFormat.swift @@ -19,10 +19,10 @@ enum BalanceDisplayFormat: String, CaseIterable, Codable { switch self { case .bitcoinSats, .bitcoin, .bip177: return "₿" case .fiat: return "$" - default : return "" + default: return "" } } - + var displayText: String { switch self { case .sats, .bitcoinSats: return "sats" @@ -31,7 +31,7 @@ enum BalanceDisplayFormat: String, CaseIterable, Codable { case .fiat: return "USD" } } - + func formatted(_ btcAmount: UInt64, fiatPrice: Double) -> String { switch self { case .sats: diff --git a/BDKSwiftExampleWallet/Resources/AppIcon.icon/Assets/box-rotated.png b/BDKSwiftExampleWallet/Resources/AppIcon.icon/Assets/box-rotated.png new file mode 100644 index 00000000..7560ea3e Binary files /dev/null and b/BDKSwiftExampleWallet/Resources/AppIcon.icon/Assets/box-rotated.png differ diff --git a/BDKSwiftExampleWallet/Resources/AppIcon.icon/icon.json b/BDKSwiftExampleWallet/Resources/AppIcon.icon/icon.json new file mode 100644 index 00000000..171761a9 --- /dev/null +++ b/BDKSwiftExampleWallet/Resources/AppIcon.icon/icon.json @@ -0,0 +1,66 @@ +{ + "fill" : "system-light", + "groups" : [ + { + "layers" : [ + { + "fill" : { + "solid" : "display-p3:0.96409,0.82264,0.51574,1.00000" + }, + "glass" : false, + "image-name" : "box-rotated.png", + "name" : "box-rotated", + "position" : { + "scale" : 1.25, + "translation-in-points" : [ + -71.375, + -172.71875 + ] + } + } + ], + "shadow" : { + "kind" : "layer-color", + "opacity" : 0.5 + }, + "translucency" : { + "enabled" : true, + "value" : 0.5 + } + }, + { + "layers" : [ + { + "fill" : { + "solid" : "display-p3:0.96409,0.82264,0.51574,1.00000" + }, + "glass" : false, + "hidden" : false, + "image-name" : "box-rotated.png", + "name" : "box-rotated-big", + "position" : { + "scale" : 2.5, + "translation-in-points" : [ + 4.65625, + 86.3046875 + ] + } + } + ], + "shadow" : { + "kind" : "layer-color", + "opacity" : 0.5 + }, + "translucency" : { + "enabled" : true, + "value" : 0.5 + } + } + ], + "supported-platforms" : { + "circles" : [ + "watchOS" + ], + "squares" : "shared" + } +} \ No newline at end of file diff --git a/BDKSwiftExampleWallet/Resources/Localizable.xcstrings b/BDKSwiftExampleWallet/Resources/Localizable.xcstrings index d8c69c10..0ff37f57 100644 --- a/BDKSwiftExampleWallet/Resources/Localizable.xcstrings +++ b/BDKSwiftExampleWallet/Resources/Localizable.xcstrings @@ -149,6 +149,10 @@ }, "%" : { + }, + "%@" : { + "comment" : "A label displaying a transaction ID. The text inside the parentheses is the transaction ID itself.", + "isCommentAutoGenerated" : true }, "%@ • %@" : { "localizations" : { @@ -1482,5 +1486,5 @@ } } }, - "version" : "1.0" + "version" : "1.1" } \ No newline at end of file diff --git a/BDKSwiftExampleWallet/View/Activity/LocalOutputItemView.swift b/BDKSwiftExampleWallet/View/Activity/LocalOutputItemView.swift index 886c640a..e24afacb 100644 --- a/BDKSwiftExampleWallet/View/Activity/LocalOutputItemView.swift +++ b/BDKSwiftExampleWallet/View/Activity/LocalOutputItemView.swift @@ -56,7 +56,7 @@ struct LocalOutputItemView: View { .redacted(reason: isRedacted ? .placeholder : []) Spacer() - + Group { HStack { Text(balanceFormat.displayPrefix) diff --git a/BDKSwiftExampleWallet/View/Activity/TransactionItemView.swift b/BDKSwiftExampleWallet/View/Activity/TransactionItemView.swift index a83fee20..b268faa3 100644 --- a/BDKSwiftExampleWallet/View/Activity/TransactionItemView.swift +++ b/BDKSwiftExampleWallet/View/Activity/TransactionItemView.swift @@ -15,7 +15,7 @@ struct TransactionItemView: View { let isRedacted: Bool private let format: BalanceDisplayFormat private var fiatPrice: Double - + init( txDetails: TxDetails, isRedacted: Bool, diff --git a/BDKSwiftExampleWallet/View/Activity/TransactionListView.swift b/BDKSwiftExampleWallet/View/Activity/TransactionListView.swift index a28aa229..02f63f9b 100644 --- a/BDKSwiftExampleWallet/View/Activity/TransactionListView.swift +++ b/BDKSwiftExampleWallet/View/Activity/TransactionListView.swift @@ -29,7 +29,7 @@ struct TransactionListView: View { self.format = format self.fiatPrice = fiatPrice } - + var body: some View { List {