Fix buggy zap amounts and wallet selector settings

Changelog-Fixed: Fix buggy zap amounts and wallet selector settings
This commit is contained in:
William Casarin
2023-04-22 12:10:10 -07:00
parent 357e8adf86
commit 055b13c1cd
9 changed files with 36 additions and 99 deletions

View File

@@ -8,6 +8,7 @@
import SwiftUI
struct SelectWalletView: View {
let default_wallet: Wallet
@Binding var showingSelectWallet: Bool
let our_pubkey: String
let invoice: String
@@ -38,8 +39,7 @@ struct SelectWalletView: View {
Section(NSLocalizedString("Select a Lightning wallet", comment: "Title of section for selecting a Lightning wallet to pay a Lightning invoice.")) {
List{
Button() {
let wallet_model = get_default_wallet(our_pubkey).model
open_with_wallet(wallet: wallet_model, invoice: invoice)
open_with_wallet(wallet: default_wallet.model, invoice: invoice)
} label: {
HStack {
Text("Default Wallet", comment: "Button to pay a Lightning invoice with the user's default Lightning wallet.").font(.body).foregroundColor(.blue)
@@ -73,6 +73,6 @@ struct SelectWalletView_Previews: PreviewProvider {
@State static var invoice: String = ""
static var previews: some View {
SelectWalletView(showingSelectWallet: $show, our_pubkey: "", invoice: "")
SelectWalletView(default_wallet: .lnlink, showingSelectWallet: $show, our_pubkey: "", invoice: "")
}
}