Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(ios) UI for claiming BIP353 address #602

Merged
merged 2 commits into from
Aug 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions phoenix-ios/phoenix-ios.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,7 @@
DC2DC8682906AC0B0079E570 /* BitcoinUnitSelector.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC2DC8672906AC0B0079E570 /* BitcoinUnitSelector.swift */; };
DC2DC86A2906AC620079E570 /* FiatCurrencySelector.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC2DC8692906AC620079E570 /* FiatCurrencySelector.swift */; };
DC2F431427B6972C0006FCC4 /* SwapInView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC2F431327B6972C0006FCC4 /* SwapInView.swift */; };
DC2F431627B6983B0006FCC4 /* CopyOptionsSheet.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC2F431527B6983B0006FCC4 /* CopyOptionsSheet.swift */; };
DC2F431827B698E20006FCC4 /* ShareOptionsSheet.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC2F431727B698E20006FCC4 /* ShareOptionsSheet.swift */; };
DC2F431627B6983B0006FCC4 /* CopyShareOptionsSheet.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC2F431527B6983B0006FCC4 /* CopyShareOptionsSheet.swift */; };
DC2F431A27B699800006FCC4 /* ModifyInvoiceSheet.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC2F431927B699800006FCC4 /* ModifyInvoiceSheet.swift */; };
DC32FB3529A3D3FE009912AC /* XpcManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC32FB3429A3D3FE009912AC /* XpcManager.swift */; };
DC33369826BAF721000E3F49 /* ShortSheet.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC33369726BAF721000E3F49 /* ShortSheet.swift */; };
Expand Down Expand Up @@ -144,8 +143,10 @@
DC4CF3CE2BE96C36003A957F /* DisablePinView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC4CF3CD2BE96C36003A957F /* DisablePinView.swift */; };
DC4CF3D02BEA8C13003A957F /* EditPinView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC4CF3CF2BEA8C13003A957F /* EditPinView.swift */; };
DC5567452C2F1A6900008E11 /* ContactsList.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC5567442C2F1A6900008E11 /* ContactsList.swift */; };
DC5631C52C541E5C00DCB5BF /* Experimental.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC5631C42C541E5C00DCB5BF /* Experimental.swift */; };
DC5631C72C5944CF00DCB5BF /* KotlinExtensions+Manager.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC5631C62C5944CF00DCB5BF /* KotlinExtensions+Manager.swift */; };
DC5631C82C59466000DCB5BF /* KotlinExtensions+Manager.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC5631C62C5944CF00DCB5BF /* KotlinExtensions+Manager.swift */; };
DC5631CA2C597B8600DCB5BF /* SourceInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC5631C92C597B8600DCB5BF /* SourceInfo.swift */; };
DC59377127516297003B4B53 /* Sequence+Sum.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC59377027516296003B4B53 /* Sequence+Sum.swift */; };
DC5A935329846044004F19FD /* FileHandle+Async.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC5A935229846043004F19FD /* FileHandle+Async.swift */; };
DC5CA4ED28F83C3B0048A737 /* DrainWalletView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC5CA4EC28F83C3B0048A737 /* DrainWalletView.swift */; };
Expand Down Expand Up @@ -501,8 +502,7 @@
DC2DC8672906AC0B0079E570 /* BitcoinUnitSelector.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BitcoinUnitSelector.swift; sourceTree = "<group>"; };
DC2DC8692906AC620079E570 /* FiatCurrencySelector.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FiatCurrencySelector.swift; sourceTree = "<group>"; };
DC2F431327B6972C0006FCC4 /* SwapInView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwapInView.swift; sourceTree = "<group>"; };
DC2F431527B6983B0006FCC4 /* CopyOptionsSheet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CopyOptionsSheet.swift; sourceTree = "<group>"; };
DC2F431727B698E20006FCC4 /* ShareOptionsSheet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShareOptionsSheet.swift; sourceTree = "<group>"; };
DC2F431527B6983B0006FCC4 /* CopyShareOptionsSheet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CopyShareOptionsSheet.swift; sourceTree = "<group>"; };
DC2F431927B699800006FCC4 /* ModifyInvoiceSheet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ModifyInvoiceSheet.swift; sourceTree = "<group>"; };
DC32FB3429A3D3FE009912AC /* XpcManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = XpcManager.swift; sourceTree = "<group>"; };
DC33369726BAF721000E3F49 /* ShortSheet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShortSheet.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -553,7 +553,9 @@
DC4CF3CD2BE96C36003A957F /* DisablePinView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DisablePinView.swift; sourceTree = "<group>"; };
DC4CF3CF2BEA8C13003A957F /* EditPinView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EditPinView.swift; sourceTree = "<group>"; };
DC5567442C2F1A6900008E11 /* ContactsList.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContactsList.swift; sourceTree = "<group>"; };
DC5631C42C541E5C00DCB5BF /* Experimental.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Experimental.swift; sourceTree = "<group>"; };
DC5631C62C5944CF00DCB5BF /* KotlinExtensions+Manager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "KotlinExtensions+Manager.swift"; sourceTree = "<group>"; };
DC5631C92C597B8600DCB5BF /* SourceInfo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SourceInfo.swift; sourceTree = "<group>"; };
DC59377027516296003B4B53 /* Sequence+Sum.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Sequence+Sum.swift"; sourceTree = "<group>"; };
DC5A935229846043004F19FD /* FileHandle+Async.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "FileHandle+Async.swift"; sourceTree = "<group>"; };
DC5CA4EC28F83C3B0048A737 /* DrainWalletView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DrainWalletView.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1017,8 +1019,8 @@
DC98D3972AF2AE41005BD177 /* ReceiveView.swift */,
DC3FDCAE2C3306AB002C5931 /* LightningDualView.swift */,
DC2F431327B6972C0006FCC4 /* SwapInView.swift */,
DC2F431527B6983B0006FCC4 /* CopyOptionsSheet.swift */,
DC2F431727B698E20006FCC4 /* ShareOptionsSheet.swift */,
DC5631C92C597B8600DCB5BF /* SourceInfo.swift */,
DC2F431527B6983B0006FCC4 /* CopyShareOptionsSheet.swift */,
DC2F431927B699800006FCC4 /* ModifyInvoiceSheet.swift */,
DC370A882B7FBD7C0093C56F /* BtcAddrOptionsSheet.swift */,
DC70A99B2BBB6093002DBFF8 /* InboundFeeWarning.swift */,
Expand Down Expand Up @@ -1274,6 +1276,7 @@
DCFAEFC72A72F46D00330088 /* wallet */,
DCFFAADC2900218B004E3C11 /* channels */,
53BEF0A8669F9379E4E4596F /* logs */,
DC5631C42C541E5C00DCB5BF /* Experimental.swift */,
);
path = advanced;
sourceTree = "<group>";
Expand Down Expand Up @@ -1794,7 +1797,7 @@
DC4CF3C62BE59E4B003A957F /* TextTracking.swift in Sources */,
DC63BDF729AEB30C0067A361 /* BackgroundPaymentsConfig.swift in Sources */,
DC67E40B27F3798600496C04 /* AnimatedMenu.swift in Sources */,
DC2F431627B6983B0006FCC4 /* CopyOptionsSheet.swift in Sources */,
DC2F431627B6983B0006FCC4 /* CopyShareOptionsSheet.swift in Sources */,
DCACF6FE2566D0BA0009B01E /* GenericPasswordConvertible.swift in Sources */,
DC949E6A2B45B1EC00E80BB5 /* LiquidityAdsHelp.swift in Sources */,
DC33369826BAF721000E3F49 /* ShortSheet.swift in Sources */,
Expand Down Expand Up @@ -1914,7 +1917,6 @@
DC5631C72C5944CF00DCB5BF /* KotlinExtensions+Manager.swift in Sources */,
DC63BDF429AE44380067A361 /* NotificationsManager.swift in Sources */,
DC118BFA27B44F840080BBAC /* TipSliderSheet.swift in Sources */,
DC2F431827B698E20006FCC4 /* ShareOptionsSheet.swift in Sources */,
DC6F04252C38807300627B4F /* PhotosManager.swift in Sources */,
DC72C33425A51AAC008A927A /* CurrencyPrefs.swift in Sources */,
DCE6FB8C28D0B5F200054511 /* ResetWalletView.swift in Sources */,
Expand All @@ -1936,6 +1938,7 @@
DC89857F25914747007B253F /* UIApplicationState+Phoenix.swift in Sources */,
DCFC72042862237400D6B293 /* Asserts.swift in Sources */,
DC1771B42ABC99CE00B286C7 /* WebsiteLinkPopover.swift in Sources */,
DC5631CA2C597B8600DCB5BF /* SourceInfo.swift in Sources */,
DCCD046127EE045C007D57A5 /* DetailsView.swift in Sources */,
DC6CF35B2938F32E001837EE /* ListBackgroundColor.swift in Sources */,
DC641C82282188E700862DCD /* Utils+CurrencyPrefs.swift in Sources */,
Expand Down Expand Up @@ -2015,6 +2018,7 @@
DC5CA4ED28F83C3B0048A737 /* DrainWalletView.swift in Sources */,
DC784A112B31EA180018DC4A /* LiquidityAdsView.swift in Sources */,
DC6D26E329E76557006A7814 /* AnimatedClock.swift in Sources */,
DC5631C52C541E5C00DCB5BF /* Experimental.swift in Sources */,
DCF8E3AC2BC4968D009299EE /* LowMinerFeeWarning.swift in Sources */,
DCAC9FC329675E1A0098D769 /* NavigationWrapper.swift in Sources */,
DC65D86428E2F7D700686355 /* ResetWalletView_Action.swift in Sources */,
Expand Down
5 changes: 4 additions & 1 deletion phoenix-ios/phoenix-ios/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,10 @@ class AppDelegate: UIResponder, UIApplicationDelegate, MessagingDelegate {
return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
}

func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>) {
func application(
_ application: UIApplication,
didDiscardSceneSessions sceneSessions: Set<UISceneSession>
) {
// Called when the user discards a scene session.
// If any sessions were discarded while the application was not running,
// this will be called shortly after application:didFinishLaunchingWithOptions.
Expand Down
71 changes: 70 additions & 1 deletion phoenix-ios/phoenix-ios/Localizable.xcstrings
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,7 @@
},
"(Bitcoin address)" : {
"comment" : "Type of text being copied",
"extractionState" : "stale",
"localizations" : {
"ar" : {
"stringUnit" : {
Expand Down Expand Up @@ -998,6 +999,9 @@
}
}
}
},
"(image)" : {

},
"(inclusive)" : {
"comment" : "translate: inclusive",
Expand Down Expand Up @@ -1126,6 +1130,7 @@
}
},
"(QR code)" : {
"extractionState" : "stale",
"localizations" : {
"ar" : {
"stringUnit" : {
Expand Down Expand Up @@ -1273,6 +1278,9 @@
}
}
}
},
"(text)" : {

},
"(This is your address - derived from your seed. You alone possess your seed.)" : {
"localizations" : {
Expand Down Expand Up @@ -1741,6 +1749,16 @@
}
}
},
"%@ %@" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "%1$@ %2$@"
}
}
}
},
"%@ days" : {
"extractionState" : "manual",
"localizations" : {
Expand Down Expand Up @@ -7822,6 +7840,9 @@
}
}
}
},
"BIP353 DNS Address" : {

},
"Bitcoin" : {
"localizations" : {
Expand Down Expand Up @@ -9791,6 +9812,9 @@
}
}
}
},
"Claim my address" : {

},
"claimed amount" : {
"comment" : "Label in DetailsView_IncomingPayment",
Expand Down Expand Up @@ -11569,8 +11593,12 @@
}
}
},
"Copied image to pasteboard!" : {
"comment" : "Toast message"
},
"Copied QR code image to pasteboard!" : {
"comment" : "Toast message",
"extractionState" : "stale",
"localizations" : {
"ar" : {
"stringUnit" : {
Expand Down Expand Up @@ -11813,6 +11841,7 @@
}
},
"Copy Image (QR code)" : {
"extractionState" : "stale",
"localizations" : {
"ar" : {
"stringUnit" : {
Expand Down Expand Up @@ -11891,8 +11920,12 @@
}
}
}
},
"Copy options" : {

},
"Copy Text" : {
"extractionState" : "stale",
"localizations" : {
"ar" : {
"stringUnit" : {
Expand Down Expand Up @@ -11933,6 +11966,7 @@
}
},
"Copy Text (bitcoin address)" : {
"extractionState" : "stale",
"localizations" : {
"ar" : {
"stringUnit" : {
Expand Down Expand Up @@ -11973,6 +12007,7 @@
}
},
"Copy Text (lightning invoice)" : {
"extractionState" : "stale",
"localizations" : {
"ar" : {
"stringUnit" : {
Expand Down Expand Up @@ -16287,6 +16322,9 @@
}
}
}
},
"Experimental" : {

},
"Expired" : {
"localizations" : {
Expand Down Expand Up @@ -18205,6 +18243,9 @@
}
}
},
"Full URI" : {
"comment" : "Type of text being copied"
},
"Funding failure" : {
"localizations" : {
"ar" : {
Expand Down Expand Up @@ -19200,6 +19241,9 @@
},
"How to use" : {

},
"Human-readable address" : {
"comment" : "Type of text being copied"
},
"I have saved my recovery phrase somewhere safe." : {
"localizations" : {
Expand Down Expand Up @@ -22753,7 +22797,7 @@
}
},
"Lightning invoice" : {
"extractionState" : "stale",
"comment" : "Type of text being copied",
"localizations" : {
"ar" : {
"stringUnit" : {
Expand Down Expand Up @@ -25472,6 +25516,9 @@
}
}
}
},
"No address yet..." : {

},
"No available channels. Please check your internet connection." : {
"localizations" : {
Expand Down Expand Up @@ -27709,6 +27756,9 @@
}
}
},
"Payment code" : {
"comment" : "Type of text being copied"
},
"payment description" : {
"extractionState" : "stale",
"localizations" : {
Expand Down Expand Up @@ -33599,6 +33649,7 @@
}
},
"Share Image (QR code)" : {
"extractionState" : "stale",
"localizations" : {
"ar" : {
"stringUnit" : {
Expand Down Expand Up @@ -33637,8 +33688,12 @@
}
}
}
},
"Share options" : {

},
"Share Text" : {
"extractionState" : "stale",
"localizations" : {
"ar" : {
"stringUnit" : {
Expand Down Expand Up @@ -33679,6 +33734,7 @@
}
},
"Share Text (bitcoin address)" : {
"extractionState" : "stale",
"localizations" : {
"ar" : {
"stringUnit" : {
Expand Down Expand Up @@ -33713,6 +33769,7 @@
}
},
"Share Text (lightning invoice)" : {
"extractionState" : "stale",
"localizations" : {
"ar" : {
"stringUnit" : {
Expand Down Expand Up @@ -37487,6 +37544,9 @@
}
}
}
},
"The request timed out. Please check your internet connection and try again." : {

},
"The scanned QR code is not a bitcoin address" : {
"comment" : "Error message - parsing bitcoin address",
Expand Down Expand Up @@ -38548,6 +38608,9 @@
}
}
}
},
"This is a human-readable address for your Bolt12 payment request." : {

},
"This is a swap address. It is not controlled by your wallet. On-chain deposits sent to this address will be converted to Lightning channels." : {
"extractionState" : "manual",
Expand Down Expand Up @@ -42624,6 +42687,9 @@
}
}
}
},
"Want a prettier address? Use third-party services, or self-host the address!" : {

},
"Warning" : {
"localizations" : {
Expand Down Expand Up @@ -44648,6 +44714,9 @@
}
}
}
},
"You need at least one channel to claim your address. Try adding funds to your wallet and try again." : {

},
"You scanned a bitcoin address. Phoenix currently only supports sending Lightning payments. You can use a third-party service to make the offchain->onchain swap." : {
"comment" : "Error message - scanning lightning invoice",
Expand Down
8 changes: 6 additions & 2 deletions phoenix-ios/phoenix-ios/SceneDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,12 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {

// Issue #282 - Face ID remains enabled between app installs.
// Items stored in the iOS keychain remain persisted between iOS installs.
// So we clear the flag here.
AppSecurity.shared.setSoftBiometrics(enabled: false) { _ in }
// So we need to clear the flag here.
//
// We have the same problem with the Custom PIN.
// And also the Bip353Address.
// So we perform a standard wallet reset (which clears all values).
AppSecurity.shared.resetWallet()

} else {
// The user has a wallet. (UI may or may not be locked.)
Expand Down
Loading