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

@@ -10,6 +10,7 @@ import SwiftUI
struct InvoicesView: View {
let our_pubkey: String
var invoices: [Invoice]
let settings: UserSettingsStore
@State var open_sheet: Bool = false
@State var current_invoice: Invoice? = nil
@@ -17,7 +18,7 @@ struct InvoicesView: View {
var body: some View {
TabView {
ForEach(invoices, id: \.string) { invoice in
InvoiceView(our_pubkey: our_pubkey, invoice: invoice)
InvoiceView(our_pubkey: our_pubkey, invoice: invoice, settings: settings)
.tabItem {
Text(invoice.string)
}
@@ -31,7 +32,7 @@ struct InvoicesView: View {
struct InvoicesView_Previews: PreviewProvider {
static var previews: some View {
InvoicesView(our_pubkey: "", invoices: [Invoice.init(description: .description("description"), amount: .specific(10000), string: "invstr", expiry: 100000, payment_hash: Data(), created_at: 1000000)])
InvoicesView(our_pubkey: "", invoices: [Invoice.init(description: .description("description"), amount: .specific(10000), string: "invstr", expiry: 100000, payment_hash: Data(), created_at: 1000000)], settings: test_damus_state().settings)
.frame(width: 300)
}
}