finish updates to wallet selector improvements

This commit is contained in:
Benjamin Hakes
2022-12-29 14:51:36 -06:00
parent d10ee72fec
commit 429a765d42
8 changed files with 212 additions and 180 deletions

View File

@@ -20,14 +20,14 @@ struct InvoiceView: View {
var PayButton: some View {
Button {
inv = invoice.string
if (user_settings.showwalletselector){
if (user_settings.showWalletSelector){
showingSelectWallet = true
} else {
let wallet = get_default_wallet(user_settings.defaultwallet.rawValue)
if let url = URL(string: "\(wallet.link)\(inv)"), UIApplication.shared.canOpenURL(url) {
let walletModel = user_settings.defaultWallet.model
if let url = URL(string: "\(walletModel.link)\(inv)"), UIApplication.shared.canOpenURL(url) {
openURL(url)
} else {
if let url = URL(string: wallet.appStoreLink), UIApplication.shared.canOpenURL(url) {
if let url = URL(string: walletModel.appStoreLink), UIApplication.shared.canOpenURL(url) {
openURL(url)
}
}