diff options
author | Marc Stibane <marc@taler.net> | 2023-07-25 16:39:39 +0200 |
---|---|---|
committer | Marc Stibane <marc@taler.net> | 2023-07-25 16:39:39 +0200 |
commit | 97ca40f5b60bb5bbdb4d107d2247d73a6fd4119a (patch) | |
tree | d9b2b7b309341b3bee7b13057f739027c722436f | |
parent | a2f80815c7baf4dcada9b1b68d913978431f36b7 (diff) | |
download | taler-ios-97ca40f5b60bb5bbdb4d107d2247d73a6fd4119a.tar.gz taler-ios-97ca40f5b60bb5bbdb4d107d2247d73a6fd4119a.tar.bz2 taler-ios-97ca40f5b60bb5bbdb4d107d2247d73a6fd4119a.zip |
small fixes
-rw-r--r-- | TalerWallet1/Views/Exchange/ManualWithdrawDone.swift | 3 | ||||
-rw-r--r-- | TalerWallet1/Views/HelperViews/CurrencyInputView.swift | 2 | ||||
-rw-r--r-- | TalerWallet1/Views/Peer2peer/SendAmount.swift | 46 |
3 files changed, 25 insertions, 26 deletions
diff --git a/TalerWallet1/Views/Exchange/ManualWithdrawDone.swift b/TalerWallet1/Views/Exchange/ManualWithdrawDone.swift index 0048820..5214057 100644 --- a/TalerWallet1/Views/Exchange/ManualWithdrawDone.swift +++ b/TalerWallet1/Views/Exchange/ManualWithdrawDone.swift @@ -33,7 +33,8 @@ struct ManualWithdrawDone: View { TransactionDetailView(transactionId: transactionId, reloadAction: reloadOneAction, doneAction: ViewState.shared.popToRootView) - .navigationBarBackButtonHidden(true) // exit only by Done-Button + .navigationBarBackButtonHidden(true) + .interactiveDismissDisabled() // can only use "Done" button to dismiss .navigationTitle(navTitle) } else { WithdrawProgressView(message: exchange.exchangeBaseUrl.trimURL()) diff --git a/TalerWallet1/Views/HelperViews/CurrencyInputView.swift b/TalerWallet1/Views/HelperViews/CurrencyInputView.swift index da84250..e6f0d38 100644 --- a/TalerWallet1/Views/HelperViews/CurrencyInputView.swift +++ b/TalerWallet1/Views/HelperViews/CurrencyInputView.swift @@ -16,7 +16,7 @@ struct CurrencyInputView: View { var body: some View { VStack (alignment: .leading) { Text(title) - .padding(.top) +// .padding(.top) .font(.title3) currencyField .frame(maxWidth: .infinity, alignment: .trailing) diff --git a/TalerWallet1/Views/Peer2peer/SendAmount.swift b/TalerWallet1/Views/Peer2peer/SendAmount.swift index e979d73..4376e7e 100644 --- a/TalerWallet1/Views/Peer2peer/SendAmount.swift +++ b/TalerWallet1/Views/Peer2peer/SendAmount.swift @@ -41,18 +41,17 @@ struct SendAmount: View { let fee = fee(ppCheck: peerPushCheck) // ScrollViewReader { scrollView in - VStack { - let available = amountAvailable.readableDescription - Text("Available: \(available)") - .font(.title3) - CurrencyInputView(currencyField: currencyField, - title: String(localized: "Amount to send:")) + VStack(alignment: .trailing) { + let available = amountAvailable.readableDescription + Text("Available: \(available)") + .font(.title3) + .padding(.bottom, 2) + CurrencyInputView(currencyField: currencyField, + title: String(localized: "Amount to send:")) + Text("+ \(fee) payment fee") + .foregroundColor(.red) + .padding(4) - Text("+ \(fee) payment fee") - .foregroundColor(.red) - .padding(4) - - HStack { let disabled = centsToTransfer == 0 // TODO: check amountAvailable NavigationLink(destination: LazyView { @@ -61,15 +60,12 @@ struct SendAmount: View { fee: fee, summary: $summary, expireDays: $expireDays) -// { deactivateAction() } }) { Text("To another wallet") - } - .buttonStyle(TalerButtonStyle(type: .prominent)) - .disabled(disabled) + } .buttonStyle(TalerButtonStyle(type: .prominent)) + .disabled(disabled) + Spacer() } - Spacer() - } // } .frame(maxWidth: .infinity, alignment: .leading) .padding(.horizontal) @@ -83,15 +79,17 @@ struct SendAmount: View { symLog.log("❗️Yikes SendAmount onDisappear") } .task(id: centsToTransfer) { - let amount = Amount.amountFromCents(currency, centsToTransfer) - do { - let ppCheck = try await model.checkPeerPushDebitM(amount) - peerPushCheck = ppCheck + if centsToTransfer > 0 { + let amount = Amount.amountFromCents(currency, centsToTransfer) + do { + let ppCheck = try await model.checkPeerPushDebitM(amount) + peerPushCheck = ppCheck // TODO: set from exchange // agePicker.setAges(ages: peerPushCheck?.ageRestrictionOptions) - } catch { // TODO: error - symLog.log(error.localizedDescription) - peerPushCheck = nil + } catch { // TODO: error + symLog.log(error.localizedDescription) + peerPushCheck = nil + } } } } |