Browse Source
add default wallet option and phoenix
post-button-style
Suhail Saqan
2 years ago
No known key found for this signature in database
GPG Key ID: C3E8D33BFD16C6E6
4 changed files with
32 additions and
1 deletions
-
damus/Assets.xcassets/phoenix.imageset/Contents.json
-
BIN
damus/Assets.xcassets/phoenix.imageset/phoenix.png
-
damus/Util/Constants.swift
-
damus/Views/SelectWalletView.swift
|
|
@ -0,0 +1,21 @@ |
|
|
|
{ |
|
|
|
"images" : [ |
|
|
|
{ |
|
|
|
"filename" : "phoenix.png", |
|
|
|
"idiom" : "universal", |
|
|
|
"scale" : "1x" |
|
|
|
}, |
|
|
|
{ |
|
|
|
"idiom" : "universal", |
|
|
|
"scale" : "2x" |
|
|
|
}, |
|
|
|
{ |
|
|
|
"idiom" : "universal", |
|
|
|
"scale" : "3x" |
|
|
|
} |
|
|
|
], |
|
|
|
"info" : { |
|
|
|
"author" : "xcode", |
|
|
|
"version" : 1 |
|
|
|
} |
|
|
|
} |
Width:
|
Height:
|
Size: 2.9 KiB
|
|
|
@ -35,6 +35,7 @@ public class Constants { |
|
|
|
{"id": 5, "name": "Zebedee", "link": "zebedee:lightning:", "appStoreLink": "https://apps.apple.com/us/app/zebedee-wallet/id1484394401", "image": "zebedee"}, |
|
|
|
{"id": 6, "name": "Zeus LN", "link": "zeusln:lightning:", "appStoreLink": "https://apps.apple.com/us/app/zeus-ln/id1456038895", "image": "zeusln"}, |
|
|
|
{"id": 7, "name": "LNLink", "link": "lnlink://", "appStoreLink": "https://testflight.apple.com/join/aNY4yuuZ", "image": "lnlink"}, |
|
|
|
{"id": 8, "name": "Phoenix", "link": "phoenix://", "appStoreLink": "https://apps.apple.com/us/app/phoenix-wallet/id1544097028", "image": "phoenix"}, |
|
|
|
] |
|
|
|
""".data(using: .utf8)! |
|
|
|
} |
|
|
|
|
|
@ -36,7 +36,7 @@ struct SelectWalletView: View { |
|
|
|
|
|
|
|
Spacer() |
|
|
|
|
|
|
|
Image(systemName: self.invoice_copied ? "checkmark.circle" : "doc.on.doc") |
|
|
|
Image(systemName: self.invoice_copied ? "checkmark.circle" : "doc.on.doc").foregroundColor(.blue) |
|
|
|
}.clipShape(RoundedRectangle(cornerRadius: 5)).onTapGesture { |
|
|
|
UIPasteboard.general.string = invoice |
|
|
|
self.invoice_copied = true |
|
|
@ -45,6 +45,15 @@ struct SelectWalletView: View { |
|
|
|
} |
|
|
|
Section("Select a lightning wallet"){ |
|
|
|
List{ |
|
|
|
Button() { |
|
|
|
if let url = URL(string: "lightning:\(invoice)"), UIApplication.shared.canOpenURL(url) { |
|
|
|
openURL(url) |
|
|
|
} |
|
|
|
} label: { |
|
|
|
HStack { |
|
|
|
Text("Default Wallet").font(.body).foregroundColor(.blue) |
|
|
|
} |
|
|
|
}.buttonStyle(.plain) |
|
|
|
ForEach(walletItems, id: \.self) { wallet in |
|
|
|
Button() { |
|
|
|
if let url = URL(string: "\(wallet.link)\(invoice)"), UIApplication.shared.canOpenURL(url) { |
|
|
|