add images for wallets

This commit is contained in:
Suhail Saqan
2022-12-22 04:34:26 -06:00
parent bb6d1b2522
commit 3a34fd5f46
18 changed files with 182 additions and 8 deletions

View File

@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "bluewallet.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

View File

@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "breez.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

View File

@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "cashapp.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

View File

@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "muun.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

View File

@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "strike.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

View File

@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "walletofsatoshi.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

View File

@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "zebedee.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

View File

@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "zeus.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

View File

@@ -25,14 +25,14 @@ public class Constants {
static let WALLETS = """
[
{"id": 0, "name": "Strike", "link": "strike:lightning", "appStoreLink": "https://apps.apple.com/us/app/strike-bitcoin-payments/id1488724463"},
{"id": 1, "name": "Cash App", "link": "squarecash://", "appStoreLink": "https://apps.apple.com/us/app/cash-app/id711923939"},
{"id": 2, "name": "Muun", "link": "muun:", "appStoreLink": "https://apps.apple.com/us/app/muun-wallet/id1482037683"},
{"id": 3, "name": "Blue Wallet", "link": "bluewallet:lightning", "appStoreLink": "https://apps.apple.com/us/app/bluewallet-bitcoin-wallet/id1376878040"},
{"id": 4, "name": "Wallet Of Satoshi", "link": "walletofsatoshi:lightning", "appStoreLink": "https://apps.apple.com/us/app/wallet-of-satoshi/id1438599608"},
{"id": 5, "name": "Breez", "link": "breez:lightning", "appStoreLink": "https://testflight.apple.com/join/wPju2Du7"},
{"id": 6, "name": "Zebedee", "link": "zebedee:lightning", "appStoreLink": "https://apps.apple.com/us/app/zebedee-wallet/id1484394401"},
{"id": 7, "name": "Zeus LN", "link": "zeusln:lightning", "appStoreLink": "https://apps.apple.com/us/app/zeus-ln/id1456038895"},
{"id": 0, "name": "Strike", "link": "strike:lightning", "appStoreLink": "https://apps.apple.com/us/app/strike-bitcoin-payments/id1488724463", "image": "strike"},
{"id": 1, "name": "Cash App", "link": "squarecash://", "appStoreLink": "https://apps.apple.com/us/app/cash-app/id711923939", "image": "cashapp"},
{"id": 2, "name": "Muun", "link": "muun:", "appStoreLink": "https://apps.apple.com/us/app/muun-wallet/id1482037683", "image": "muun"},
{"id": 3, "name": "Blue Wallet", "link": "bluewallet:lightning", "appStoreLink": "https://apps.apple.com/us/app/bluewallet-bitcoin-wallet/id1376878040", "image": "bluewallet"},
{"id": 4, "name": "Wallet Of Satoshi", "link": "walletofsatoshi:lightning", "appStoreLink": "https://apps.apple.com/us/app/wallet-of-satoshi/id1438599608", "image": "walletofsatoshi"},
{"id": 5, "name": "Breez", "link": "breez:lightning", "appStoreLink": "https://testflight.apple.com/join/wPju2Du7", "image": "breez"},
{"id": 6, "name": "Zebedee", "link": "zebedee:lightning", "appStoreLink": "https://apps.apple.com/us/app/zebedee-wallet/id1484394401", "image": "zebedee"},
{"id": 7, "name": "Zeus LN", "link": "zeusln:lightning", "appStoreLink": "https://apps.apple.com/us/app/zeus-ln/id1456038895", "image": "zeusln"},
]
""".data(using: .utf8)!
}

View File

@@ -12,6 +12,7 @@ struct WalletItem : Decodable, Identifiable {
var name : String
var link : String
var appStoreLink : String
var image: String
}
struct SelectWalletView: View {
@@ -25,6 +26,11 @@ struct SelectWalletView: View {
VStack(alignment: .leading) {
ForEach(walletItems) { wallet in
HStack(spacing: 20) {
Image(wallet.image)
.resizable()
.scaledToFit()
.aspectRatio(contentMode: .fit)
.cornerRadius(5)
Button("\(wallet.name)"){
if let url = URL(string: "\(wallet.link)\(invoice)"), UIApplication.shared.canOpenURL(url) {
openURL(url)