[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-taler-ios] 18/69: ToS for P2P
From: |
gnunet |
Subject: |
[taler-taler-ios] 18/69: ToS for P2P |
Date: |
Fri, 19 Jan 2024 09:01:51 +0100 |
This is an automated email from the git hooks/post-receive script.
marc-stibane pushed a commit to branch master
in repository taler-ios.
commit 7dea9e491354de52ccb8b2b9c2222d77abaa3b88
Author: Marc Stibane <marc@taler.net>
AuthorDate: Wed Jan 3 17:47:07 2024 +0100
ToS for P2P
---
TalerWallet1/Views/Exchange/ManualWithdraw.swift | 27 +++++++++++-----------
.../Sheets/P2P_Sheets/P2pReceiveURIView.swift | 14 +++++------
.../WithdrawBankIntegrated/WithdrawURIView.swift | 14 ++++++-----
3 files changed, 29 insertions(+), 26 deletions(-)
diff --git a/TalerWallet1/Views/Exchange/ManualWithdraw.swift
b/TalerWallet1/Views/Exchange/ManualWithdraw.swift
index 6e96795..fce67f7 100644
--- a/TalerWallet1/Views/Exchange/ManualWithdraw.swift
+++ b/TalerWallet1/Views/Exchange/ManualWithdraw.swift
@@ -48,23 +48,24 @@ struct ManualWithdraw: View {
// restrictAge: restrictAge)
}
let disabled = amountToTransfer.isZero || someCoins.invalid ||
someCoins.tooMany
+ let tosAccepted = exchange.tosStatus == .accepted
ScrollView { VStack(alignment: .trailing) {
Text("via \(exchange.exchangeBaseUrl.trimURL())")
.multilineTextAlignment(.center)
.accessibilityFont(.body)
- CurrencyInputView(amount: $amountToTransfer,
- available: nil,
- title: iconOnly ? String(localized:
"Amount:")
- : String(localized: "Amount
to withdraw:"),
- shortcutAction: nil)
- .padding(.top)
- QuiteSomeCoins(someCoins: someCoins,
- shouldShowFee: true, // TODO: set to
false if we never charge withdrawal fees
- currency: currency,
- currencyInfo: currencyInfo,
- amountEffective:
withdrawalAmountDetails?.amountEffective)
-// agePicker
- if exchange.tosStatus == .accepted {
+ if !tosAccepted {
+ CurrencyInputView(amount: $amountToTransfer,
+ available: nil,
+ title: iconOnly ? String(localized:
"Amount:")
+ : String(localized:
"Amount to withdraw:"),
+ shortcutAction: nil)
+ .padding(.top)
+ QuiteSomeCoins(someCoins: someCoins,
+ shouldShowFee: true, // TODO: set to
false if we never charge withdrawal fees
+ currency: currency,
+ currencyInfo: currencyInfo,
+ amountEffective:
withdrawalAmountDetails?.amountEffective)
+// agePicker
NavigationLink(destination: destination) {
Text("Confirm Withdrawal") // VIEW_WITHDRAW_ACCEPT
}
diff --git a/TalerWallet1/Views/Sheets/P2P_Sheets/P2pReceiveURIView.swift
b/TalerWallet1/Views/Sheets/P2P_Sheets/P2pReceiveURIView.swift
index 0f71b3e..5e97857 100644
--- a/TalerWallet1/Views/Sheets/P2P_Sheets/P2pReceiveURIView.swift
+++ b/TalerWallet1/Views/Sheets/P2P_Sheets/P2pReceiveURIView.swift
@@ -23,9 +23,15 @@ struct P2pReceiveURIView: View {
@State private var exchange: Exchange? = nil
var body: some View {
- let badURL = "Error in URL: \(url)"
VStack {
if let peerPushCreditResponse {
+ let tosAccepted = exchange?.tosStatus == .accepted
+ if !tosAccepted {
+ ToSButtonView(stack: stack.push(),
+ exchangeBaseUrl:
peerPushCreditResponse.exchangeBaseUrl,
+ viewID: SHEET_RCV_P2P_TOS,
+ p2p: true)
+ }
List {
let raw = peerPushCreditResponse.amountRaw
let effective = peerPushCreditResponse.amountEffective
@@ -44,7 +50,6 @@ struct P2pReceiveURIView: View {
}
.listStyle(myListStyle.style).anyView
.navigationTitle(navTitle)
- let tosAccepted = exchange?.tosStatus == .accepted
if tosAccepted {
NavigationLink(destination: LazyView {
P2pAcceptDone(stack: stack.push(),
@@ -55,11 +60,6 @@ struct P2pReceiveURIView: View {
}
.buttonStyle(TalerButtonStyle(type: .prominent))
.padding(.horizontal)
- } else {
- ToSButtonView(stack: stack.push(),
- exchangeBaseUrl:
peerPushCreditResponse.exchangeBaseUrl,
- viewID: SHEET_RCV_P2P_TOS,
- p2p: true)
}
} else {
LoadingView(url: url, message: nil)
diff --git
a/TalerWallet1/Views/Sheets/WithdrawBankIntegrated/WithdrawURIView.swift
b/TalerWallet1/Views/Sheets/WithdrawBankIntegrated/WithdrawURIView.swift
index 5c9ec65..284d94d 100644
--- a/TalerWallet1/Views/Sheets/WithdrawBankIntegrated/WithdrawURIView.swift
+++ b/TalerWallet1/Views/Sheets/WithdrawBankIntegrated/WithdrawURIView.swift
@@ -27,6 +27,13 @@ struct WithdrawURIView: View {
var body: some View {
VStack {
if let withdrawalAmountDetails, let exchange {
+ let tosAccepted = exchange.tosStatus == .accepted
+ if !tosAccepted {
+ ToSButtonView(stack: stack.push(),
+ exchangeBaseUrl: exchange.exchangeBaseUrl,
+ viewID: SHEET_WITHDRAW_TOS,
+ p2p: false)
+ }
List {
let raw = withdrawalAmountDetails.amountRaw
let effective = withdrawalAmountDetails.amountEffective
@@ -55,7 +62,7 @@ struct WithdrawURIView: View {
}
.listStyle(myListStyle.style).anyView
.navigationTitle(navTitle)
- if exchange.tosStatus == .accepted {
+ if tosAccepted {
NavigationLink(destination: LazyView {
WithdrawAcceptDone(stack: stack.push(),
exchangeBaseUrl: exchange.exchangeBaseUrl,
@@ -65,11 +72,6 @@ struct WithdrawURIView: View {
}
.buttonStyle(TalerButtonStyle(type: .prominent))
.padding(.horizontal)
- } else {
- ToSButtonView(stack: stack.push(),
- exchangeBaseUrl: exchange.exchangeBaseUrl,
- viewID: SHEET_WITHDRAW_TOS,
- p2p: false)
}
} else { // no details or no exchange
LoadingView(url: url, message: nil)
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-taler-ios] 02/69: LoadingView, (continued)
- [taler-taler-ios] 02/69: LoadingView, gnunet, 2024/01/19
- [taler-taler-ios] 12/69: PRINT_CHANGES, gnunet, 2024/01/19
- [taler-taler-ios] 07/69: Haptics, gnunet, 2024/01/19
- [taler-taler-ios] 31/69: Withdraw only once, gnunet, 2024/01/19
- [taler-taler-ios] 22/69: Summary in ThreeAmountsV, gnunet, 2024/01/19
- [taler-taler-ios] 30/69: Layout Balances, gnunet, 2024/01/19
- [taler-taler-ios] 20/69: button color if disabled, gnunet, 2024/01/19
- [taler-taler-ios] 10/69: Exchanges->Banking, gnunet, 2024/01/19
- [taler-taler-ios] 32/69: Warnings for tx buttons, gnunet, 2024/01/19
- [taler-taler-ios] 16/69: remove about protocols, gnunet, 2024/01/19
- [taler-taler-ios] 18/69: ToS for P2P,
gnunet <=
- [taler-taler-ios] 29/69: clearDb (instead of reset), gnunet, 2024/01/19
- [taler-taler-ios] 27/69: use minor for Status, gnunet, 2024/01/19
- [taler-taler-ios] 14/69: remove Apple Sounds, gnunet, 2024/01/19
- [taler-taler-ios] 21/69: TransactionDone popToRootView, gnunet, 2024/01/19
- [taler-taler-ios] 09/69: API 2:0:1, gnunet, 2024/01/19
- [taler-taler-ios] 15/69: hapticFeedback, gnunet, 2024/01/19
- [taler-taler-ios] 08/69: fixes, gnunet, 2024/01/19
- [taler-taler-ios] 11/69: Landscape, gnunet, 2024/01/19
- [taler-taler-ios] 17/69: Summary in ThreeAmountsV, gnunet, 2024/01/19
- [taler-taler-ios] 50/69: txStates, gnunet, 2024/01/19