Browse Source

add images for wallets

post-button-style
Suhail Saqan 2 years ago
parent
commit
3a34fd5f46
No known key found for this signature in database GPG Key ID: C3E8D33BFD16C6E6
  1. 21
      damus/Assets.xcassets/bluewallet.imageset/Contents.json
  2. BIN
      damus/Assets.xcassets/bluewallet.imageset/bluewallet.png
  3. 21
      damus/Assets.xcassets/breez.imageset/Contents.json
  4. BIN
      damus/Assets.xcassets/breez.imageset/breez.png
  5. 21
      damus/Assets.xcassets/cashapp.imageset/Contents.json
  6. BIN
      damus/Assets.xcassets/cashapp.imageset/cashapp.png
  7. 21
      damus/Assets.xcassets/muun.imageset/Contents.json
  8. BIN
      damus/Assets.xcassets/muun.imageset/muun.png
  9. 21
      damus/Assets.xcassets/strike.imageset/Contents.json
  10. BIN
      damus/Assets.xcassets/strike.imageset/strike.png
  11. 21
      damus/Assets.xcassets/walletofsatoshi.imageset/Contents.json
  12. BIN
      damus/Assets.xcassets/walletofsatoshi.imageset/walletofsatoshi.png
  13. 21
      damus/Assets.xcassets/zebedee.imageset/Contents.json
  14. BIN
      damus/Assets.xcassets/zebedee.imageset/zebedee.png
  15. 21
      damus/Assets.xcassets/zeusln.imageset/Contents.json
  16. BIN
      damus/Assets.xcassets/zeusln.imageset/zeus.png
  17. 16
      damus/Util/Constants.swift
  18. 6
      damus/Views/SelectWalletView.swift

21
damus/Assets.xcassets/bluewallet.imageset/Contents.json

@ -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
}
}

BIN
damus/Assets.xcassets/bluewallet.imageset/bluewallet.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

21
damus/Assets.xcassets/breez.imageset/Contents.json

@ -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
}
}

BIN
damus/Assets.xcassets/breez.imageset/breez.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

21
damus/Assets.xcassets/cashapp.imageset/Contents.json

@ -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
}
}

BIN
damus/Assets.xcassets/cashapp.imageset/cashapp.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

21
damus/Assets.xcassets/muun.imageset/Contents.json

@ -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
}
}

BIN
damus/Assets.xcassets/muun.imageset/muun.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

21
damus/Assets.xcassets/strike.imageset/Contents.json

@ -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
}
}

BIN
damus/Assets.xcassets/strike.imageset/strike.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

21
damus/Assets.xcassets/walletofsatoshi.imageset/Contents.json

@ -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
}
}

BIN
damus/Assets.xcassets/walletofsatoshi.imageset/walletofsatoshi.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

21
damus/Assets.xcassets/zebedee.imageset/Contents.json

@ -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
}
}

BIN
damus/Assets.xcassets/zebedee.imageset/zebedee.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

21
damus/Assets.xcassets/zeusln.imageset/Contents.json

@ -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
}
}

BIN
damus/Assets.xcassets/zeusln.imageset/zeus.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

16
damus/Util/Constants.swift

@ -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)!
}

6
damus/Views/SelectWalletView.swift

@ -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)

Loading…
Cancel
Save