commit 0f8fbb80037ae1c7be45bb8a347d4a3cb0759744
parent 681ecf201912436204538356f541a4149f8af599
Author: Marc Stibane <marc@taler.net>
Date: Sat, 4 Nov 2023 20:55:13 +0100
ThreeAmountsV cleanup
Diffstat:
8 files changed, 193 insertions(+), 189 deletions(-)
diff --git a/TalerWallet.xcodeproj/project.pbxproj b/TalerWallet.xcodeproj/project.pbxproj
@@ -99,7 +99,7 @@
4E3EAE672A990778009F1BE8 /* PendingOpsListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4EB0954E2989CBFE0043A8A1 /* PendingOpsListView.swift */; };
4E3EAE682A990778009F1BE8 /* WalletModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4EB095112989CBB00043A8A1 /* WalletModel.swift */; };
4E3EAE692A990778009F1BE8 /* URLSheet.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4EB095332989CBFE0043A8A1 /* URLSheet.swift */; };
- 4E3EAE6A2A990778009F1BE8 /* ThreeAmounts.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4ED2F94A2A278F5100453B40 /* ThreeAmounts.swift */; };
+ 4E3EAE6A2A990778009F1BE8 /* ThreeAmountsV.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4ED2F94A2A278F5100453B40 /* ThreeAmountsV.swift */; };
4E3EAE6B2A990778009F1BE8 /* Model+Withdraw.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4EB0953D2989CBFE0043A8A1 /* Model+Withdraw.swift */; };
4E3EAE6C2A990778009F1BE8 /* ExchangeSectionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4EC90C772A1B528B0071DC58 /* ExchangeSectionView.swift */; };
4E3EAE6D2A990778009F1BE8 /* SendPurpose.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E7940DD29FC307C00A9AEA1 /* SendPurpose.swift */; };
@@ -242,7 +242,7 @@
4EC90C782A1B528B0071DC58 /* ExchangeSectionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4EC90C772A1B528B0071DC58 /* ExchangeSectionView.swift */; };
4ECB62802A0BA6DF004ABBB7 /* Model+P2P.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4ECB627F2A0BA6DF004ABBB7 /* Model+P2P.swift */; };
4ECB62822A0BB01D004ABBB7 /* SelectDays.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4ECB62812A0BB01D004ABBB7 /* SelectDays.swift */; };
- 4ED2F94B2A278F5100453B40 /* ThreeAmounts.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4ED2F94A2A278F5100453B40 /* ThreeAmounts.swift */; };
+ 4ED2F94B2A278F5100453B40 /* ThreeAmountsV.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4ED2F94A2A278F5100453B40 /* ThreeAmountsV.swift */; };
4EDBDCD92AB787CB00925C02 /* CallStack.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4EDBDCD82AB787CB00925C02 /* CallStack.swift */; };
4EDBDCDA2AB787CB00925C02 /* CallStack.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4EDBDCD82AB787CB00925C02 /* CallStack.swift */; };
4EEC157329F8242800D46A03 /* QRGeneratorView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4EEC157229F8242800D46A03 /* QRGeneratorView.swift */; };
@@ -414,7 +414,7 @@
4EC90C772A1B528B0071DC58 /* ExchangeSectionView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ExchangeSectionView.swift; sourceTree = "<group>"; };
4ECB627F2A0BA6DF004ABBB7 /* Model+P2P.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Model+P2P.swift"; sourceTree = "<group>"; };
4ECB62812A0BB01D004ABBB7 /* SelectDays.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SelectDays.swift; sourceTree = "<group>"; };
- 4ED2F94A2A278F5100453B40 /* ThreeAmounts.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ThreeAmounts.swift; sourceTree = "<group>"; };
+ 4ED2F94A2A278F5100453B40 /* ThreeAmountsV.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ThreeAmountsV.swift; sourceTree = "<group>"; };
4EDBDCD82AB787CB00925C02 /* CallStack.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CallStack.swift; sourceTree = "<group>"; };
4EEC157229F8242800D46A03 /* QRGeneratorView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = QRGeneratorView.swift; sourceTree = "<group>"; };
4EEC157729F9032900D46A03 /* Sheet.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Sheet.swift; sourceTree = "<group>"; };
@@ -693,7 +693,7 @@
4EB095312989CBFE0043A8A1 /* TransactionDetailView.swift */,
4E87C8722A31CB7F001C6406 /* TransactionsEmptyView.swift */,
4E6EDD842A3615BE0031D520 /* ManualDetailsV.swift */,
- 4ED2F94A2A278F5100453B40 /* ThreeAmounts.swift */,
+ 4ED2F94A2A278F5100453B40 /* ThreeAmountsV.swift */,
);
path = Transactions;
sourceTree = "<group>";
@@ -1128,7 +1128,7 @@
4E3EAE672A990778009F1BE8 /* PendingOpsListView.swift in Sources */,
4E3EAE682A990778009F1BE8 /* WalletModel.swift in Sources */,
4E3EAE692A990778009F1BE8 /* URLSheet.swift in Sources */,
- 4E3EAE6A2A990778009F1BE8 /* ThreeAmounts.swift in Sources */,
+ 4E3EAE6A2A990778009F1BE8 /* ThreeAmountsV.swift in Sources */,
4E3EAE6B2A990778009F1BE8 /* Model+Withdraw.swift in Sources */,
4E3EAE6C2A990778009F1BE8 /* ExchangeSectionView.swift in Sources */,
4E3EAE6D2A990778009F1BE8 /* SendPurpose.swift in Sources */,
@@ -1237,7 +1237,7 @@
4EB095702989CBFE0043A8A1 /* PendingOpsListView.swift in Sources */,
4EB095162989CBB00043A8A1 /* WalletModel.swift in Sources */,
4EB0955A2989CBFE0043A8A1 /* URLSheet.swift in Sources */,
- 4ED2F94B2A278F5100453B40 /* ThreeAmounts.swift in Sources */,
+ 4ED2F94B2A278F5100453B40 /* ThreeAmountsV.swift in Sources */,
4EB095622989CBFE0043A8A1 /* Model+Withdraw.swift in Sources */,
4EC90C782A1B528B0071DC58 /* ExchangeSectionView.swift in Sources */,
4E7940DE29FC307C00A9AEA1 /* SendPurpose.swift in Sources */,
diff --git a/TalerWallet1/Views/Sheets/P2P_Sheets/P2pPayURIView.swift b/TalerWallet1/Views/Sheets/P2P_Sheets/P2pPayURIView.swift
@@ -29,14 +29,14 @@ struct P2pPayURIView: View {
let effective = peerPullDebitResponse.amountEffective
let currency = raw.currencyStr
let fee = try! Amount.diff(raw, effective)
- ThreeAmountsView(topTitle: String(localized: "Amount to pay:"),
- topAbbrev: String(localized: "Pay:"),
- topAmount: raw, fee: fee,
- bottomTitle: String(localized: "Amount to be spent:"),
- bottomAbbrev: String(localized: "Effective:"),
- bottomAmount: effective,
- large: false, pending: false, incoming: false,
- baseURL: nil)
+ ThreeAmountsV(topTitle: String(localized: "Amount to pay:"),
+ topAbbrev: String(localized: "Pay:"),
+ topAmount: raw, fee: fee,
+ bottomTitle: String(localized: "Amount to be spent:"),
+ bottomAbbrev: String(localized: "Effective:"),
+ bottomAmount: effective,
+ large: false, pending: false, incoming: false,
+ baseURL: nil)
}
.listStyle(myListStyle.style).anyView
.navigationTitle(navTitle)
diff --git a/TalerWallet1/Views/Sheets/P2P_Sheets/P2pReceiveURIView.swift b/TalerWallet1/Views/Sheets/P2P_Sheets/P2pReceiveURIView.swift
@@ -29,14 +29,14 @@ struct P2pReceiveURIView: View {
let effective = peerPushCreditResponse.amountEffective
let currency = raw.currencyStr
let fee = try! Amount.diff(raw, effective)
- ThreeAmountsView(topTitle: String(localized: "Amount to receive:"),
- topAbbrev: String(localized: "Receive:"),
- topAmount: raw, fee: fee,
- bottomTitle: String(localized: "Amount to be obtained:"),
- bottomAbbrev: String(localized: "Effective:"),
- bottomAmount: effective,
- large: false, pending: false, incoming: true,
- baseURL: nil)
+ ThreeAmountsV(topTitle: String(localized: "Amount to receive:"),
+ topAbbrev: String(localized: "Receive:"),
+ topAmount: raw, fee: fee,
+ bottomTitle: String(localized: "Amount to obtain:"),
+ bottomAbbrev: String(localized: "Effective:"),
+ bottomAmount: effective,
+ large: false, pending: false, incoming: true,
+ baseURL: nil)
}
.listStyle(myListStyle.style).anyView
.navigationTitle(navTitle)
diff --git a/TalerWallet1/Views/Sheets/Payment/PayTemplateView.swift b/TalerWallet1/Views/Sheets/Payment/PayTemplateView.swift
@@ -60,26 +60,26 @@ struct PayTemplateView: View {
if let effective {
// TODO: already paid
let fee = try! Amount.diff(raw, effective) // TODO: different currencies
- ThreeAmountsView(topTitle: topTitle,
- topAbbrev: topAbbrev,
- topAmount: raw, fee: fee,
- bottomTitle: String(localized: "Amount to be spent:"),
- bottomAbbrev: String(localized: "Effective:"),
- bottomAmount: effective,
- large: false, pending: false, incoming: false,
- baseURL: baseURL)
+ ThreeAmountsV(topTitle: topTitle,
+ topAbbrev: topAbbrev,
+ topAmount: raw, fee: fee,
+ bottomTitle: String(localized: "Amount to spend:"),
+ bottomAbbrev: String(localized: "Effective:"),
+ bottomAmount: effective,
+ large: false, pending: false, incoming: false,
+ baseURL: baseURL)
// TODO: payment: popup with all possible exchanges, check fees
} else if let balanceDetails = preparePayResult.balanceDetails { // Insufficient
Text("You don't have enough \(currency)")
.accessibilityFont(.body)
- ThreeAmountsView(topTitle: topTitle,
- topAbbrev: topAbbrev,
- topAmount: raw, fee: nil,
- bottomTitle: String(localized: "Amount available:"),
- bottomAbbrev: String(localized: "Available:"),
- bottomAmount: balanceDetails.balanceAvailable,
- large: false, pending: false, incoming: false,
- baseURL: baseURL)
+ ThreeAmountsV(topTitle: topTitle,
+ topAbbrev: topAbbrev,
+ topAmount: raw, fee: nil,
+ bottomTitle: String(localized: "Amount available:"),
+ bottomAbbrev: String(localized: "Available:"),
+ bottomAmount: balanceDetails.balanceAvailable,
+ large: false, pending: false, incoming: false,
+ baseURL: baseURL)
} else {
// TODO: Error - neither effective nor balanceDetails
Text("Error")
diff --git a/TalerWallet1/Views/Sheets/Payment/PaymentView.swift b/TalerWallet1/Views/Sheets/Payment/PaymentView.swift
@@ -53,26 +53,26 @@ struct PaymentView: View {
if let effective {
// TODO: already paid
let fee = try! Amount.diff(raw, effective) // TODO: different currencies
- ThreeAmountsView(topTitle: topTitle,
- topAbbrev: topAbbrev,
- topAmount: raw, fee: fee,
- bottomTitle: String(localized: "Amount to be spent:"),
- bottomAbbrev: String(localized: "Effective:"),
- bottomAmount: effective,
- large: false, pending: false, incoming: false,
- baseURL: baseURL)
+ ThreeAmountsV(topTitle: topTitle,
+ topAbbrev: topAbbrev,
+ topAmount: raw, fee: fee,
+ bottomTitle: String(localized: "Amount to spend:"),
+ bottomAbbrev: String(localized: "Effective:"),
+ bottomAmount: effective,
+ large: false, pending: false, incoming: false,
+ baseURL: baseURL)
// TODO: payment: popup with all possible exchanges, check fees
} else if let balanceDetails = preparePayResult.balanceDetails { // Insufficient
Text("You don't have enough \(currency)")
.accessibilityFont(.body)
- ThreeAmountsView(topTitle: topTitle,
- topAbbrev: topAbbrev,
- topAmount: raw, fee: nil,
- bottomTitle: String(localized: "Available:"),
- bottomAbbrev: String(localized: "Available:"),
- bottomAmount: balanceDetails.balanceAvailable,
- large: false, pending: false, incoming: false,
- baseURL: baseURL)
+ ThreeAmountsV(topTitle: topTitle,
+ topAbbrev: topAbbrev,
+ topAmount: raw, fee: nil,
+ bottomTitle: String(localized: "Amount available:"),
+ bottomAbbrev: String(localized: "Available:"),
+ bottomAmount: balanceDetails.balanceAvailable,
+ large: false, pending: false, incoming: false,
+ baseURL: baseURL)
} else {
// TODO: Error - neither effective nor balanceDetails
Text("Error")
diff --git a/TalerWallet1/Views/Sheets/WithdrawBankIntegrated/WithdrawURIView.swift b/TalerWallet1/Views/Sheets/WithdrawBankIntegrated/WithdrawURIView.swift
@@ -36,14 +36,14 @@ struct WithdrawURIView: View {
let outColor = WalletColors().transactionColor(false)
let inColor = WalletColors().transactionColor(true)
- ThreeAmountsView(topTitle: String(localized: "Chosen amount to withdraw:"),
- topAbbrev: String(localized: "Chosen:"),
- topAmount: raw, fee: fee,
- bottomTitle: String(localized: "Amount to be withdrawn:"),
- bottomAbbrev: String(localized: "Effective:"),
- bottomAmount: effective,
- large: false, pending: false, incoming: true,
- baseURL: exchangeBaseUrl)
+ ThreeAmountsV(topTitle: String(localized: "Chosen amount to withdraw:"),
+ topAbbrev: String(localized: "Chosen:"),
+ topAmount: raw, fee: fee,
+ bottomTitle: String(localized: "Amount to be withdrawn:"),
+ bottomAbbrev: String(localized: "Effective:"),
+ bottomAmount: effective,
+ large: false, pending: false, incoming: true,
+ baseURL: exchangeBaseUrl)
let someCoins = SomeCoins(details: withdrawalAmountDetails)
QuiteSomeCoins(someCoins: someCoins, shouldShowFee: false,
currency: raw.currencyStr, amountEffective: effective)
diff --git a/TalerWallet1/Views/Transactions/ThreeAmounts.swift b/TalerWallet1/Views/Transactions/ThreeAmounts.swift
@@ -1,127 +0,0 @@
-/*
- * This file is part of GNU Taler, ©2022-23 Taler Systems S.A.
- * See LICENSE.md
- */
-import SwiftUI
-import taler_swift
-
-struct ThreeAmountsSheet: View {
- var common: TransactionCommon
- var topAbbrev: String
- var topTitle: String
- var bottomTitle: String?
- var bottomAbbrev: String?
- let baseURL: String?
- let large: Bool // set to false for QR or IBAN
-
- var body: some View {
- let raw = common.amountRaw
- let effective = common.amountEffective
- let fee = common.fee()
- let incoming = common.incoming()
- let pending = (common.txState.major == TransactionMajorState.pending)
-
- let defaultBottomTitle = incoming ? (pending ? String(localized: "Pending amount to obtain:")
- : String(localized: "Obtained amount:") )
- : String(localized: "Paid amount:")
- let defaultBottomAbbre = incoming ? (pending ? String(localized: "Pending:")
- : String(localized: "Obtained:") )
- : String(localized: "Paid:")
- ThreeAmountsView(topTitle: topTitle, topAbbrev: topAbbrev, topAmount: raw, fee: fee,
- bottomTitle: bottomTitle ?? defaultBottomTitle,
- bottomAbbrev: bottomAbbrev ?? defaultBottomAbbre,
- bottomAmount: effective,
- large: large, pending: pending, incoming: incoming,
- baseURL: baseURL,
- status: common.txState.major.localizedState)
- }
-}
-// MARK: -
-struct ThreeAmountsView: View {
- var topTitle: String
- var topAbbrev: String
- var topAmount: Amount
- var fee: Amount?
- var bottomTitle: String
- var bottomAbbrev: String
- var bottomAmount: Amount
- let large: Bool
- let pending: Bool
- let incoming: Bool
- let baseURL: String?
- var status: String?
-
- @AppStorage("iconOnly") var iconOnly: Bool = false
-
- var body: some View {
- let labelColor = Color(UIColor.label)
- let foreColor = pending ? WalletColors().pendingColor(incoming)
- : WalletColors().transactionColor(incoming)
- Section {
- AmountView(title: iconOnly ? topAbbrev : topTitle,
- value: topAmount.readableDescription,
- color: labelColor,
- large: large)
- .padding(.bottom, 4)
- if let fee {
- AmountView(title: iconOnly ? String(localized: "Fee:")
- : String(localized: "Exchange fee:"),
- value: fee.readableDescription,
- color: labelColor,
- large: false)
- .padding(.bottom, 4)
- }
- AmountView(title: iconOnly ? bottomAbbrev : bottomTitle,
- value: bottomAmount.readableDescription,
- color: foreColor,
- large: large)
- if let baseURL {
- VStack(alignment: .leading) {
- Text(iconOnly ? "Exchange:" : "Using Exchange:")
- .multilineTextAlignment(.leading)
- .accessibilityFont(.body)
- HStack {
- Spacer()
- Text(baseURL.trimURL())
- .multilineTextAlignment(.center)
- .accessibilityFont(large ? .title3 : .body)
-// .fontWeight(large ? .medium : .regular) // @available(iOS 16.0, *)
- .foregroundColor(labelColor)
- }
- }
- .padding(.top, 4)
- .frame(maxWidth: .infinity, alignment: .leading)
- .listRowSeparator(.hidden)
- }
- } header: {
- if !iconOnly {
- Text("Summary")
- .accessibilityFont(.title3)
- }
- }
- }
-}
-// MARK: -
-struct ThreeAmounts_Previews: PreviewProvider {
- static var previews: some View {
- let common = TransactionCommon(type: .withdrawal,
- txState: TransactionState(major: .done),
- amountEffective: try! Amount(fromString: LONGCURRENCY + ":0.1"),
- amountRaw: try! Amount(fromString: LONGCURRENCY + ":0.2"),
- transactionId: "someTxID",
- timestamp: Timestamp(from: 1_666_666_000_000),
- txActions: [])
- Group {
- List {
- ThreeAmountsSheet(common: common, topAbbrev: "Withdrawal",
- topTitle: "Withdrawal", baseURL: DEMOEXCHANGE, large: 1==0)
- .safeAreaInset(edge: .bottom) {
- Button(String(localized: "Accept"), action: {})
- .buttonStyle(TalerButtonStyle(type: .prominent))
- .padding(.horizontal)
- .disabled(true)
- }
- }
- }
- }
-}
diff --git a/TalerWallet1/Views/Transactions/ThreeAmountsV.swift b/TalerWallet1/Views/Transactions/ThreeAmountsV.swift
@@ -0,0 +1,131 @@
+/*
+ * This file is part of GNU Taler, ©2022-23 Taler Systems S.A.
+ * See LICENSE.md
+ */
+import SwiftUI
+import taler_swift
+
+struct ThreeAmountsSheet: View {
+ var common: TransactionCommon
+ var topAbbrev: String
+ var topTitle: String
+ var bottomTitle: String?
+ var bottomAbbrev: String?
+ let baseURL: String?
+ let large: Bool // set to false for QR or IBAN
+
+ var body: some View {
+ let raw = common.amountRaw
+ let effective = common.amountEffective
+ let fee = common.fee()
+ let incoming = common.incoming()
+ let pending = (common.txState.major == .pending)
+ let isDone = (common.txState.major == .done)
+ let incomplete = !(isDone || pending)
+
+ let defaultBottomTitle = incoming ? (pending ? String(localized: "Pending amount to obtain:")
+ : String(localized: "Obtained amount:") )
+ : String(localized: "Paid amount:")
+ let defaultBottomAbbre = incoming ? (pending ? String(localized: "Pending:")
+ : String(localized: "Obtained:") )
+ : String(localized: "Paid:")
+ ThreeAmountsV(topTitle: topTitle, topAbbrev: topAbbrev, topAmount: raw, fee: fee,
+ bottomTitle: bottomTitle ?? defaultBottomTitle,
+ bottomAbbrev: bottomAbbrev ?? defaultBottomAbbre,
+ bottomAmount: incomplete ? nil : effective,
+ large: large, pending: pending, incoming: incoming,
+ baseURL: baseURL,
+ status: common.txState.major.localizedState)
+ }
+}
+// MARK: -
+struct ThreeAmountsV: View {
+ var topTitle: String
+ var topAbbrev: String
+ var topAmount: Amount
+ var fee: Amount?
+ var bottomTitle: String
+ var bottomAbbrev: String
+ var bottomAmount: Amount?
+ let large: Bool
+ let pending: Bool
+ let incoming: Bool
+ let baseURL: String?
+ var status: String?
+
+ @AppStorage("iconOnly") var iconOnly: Bool = false
+
+ var body: some View {
+ let labelColor = Color(UIColor.label)
+ let foreColor = pending ? WalletColors().pendingColor(incoming)
+ : WalletColors().transactionColor(incoming)
+ Section {
+ AmountView(title: iconOnly ? topAbbrev : topTitle,
+ value: topAmount.readableDescription,
+ color: labelColor,
+ large: large)
+ .padding(.bottom, 4)
+ if let fee {
+ AmountView(title: iconOnly ? String(localized: "Fee:")
+ : String(localized: "Exchange fee:"),
+ value: fee.readableDescription,
+ color: labelColor,
+ large: false)
+ .padding(.bottom, 4)
+ }
+ if let bottomAmount {
+ AmountView(title: iconOnly ? bottomAbbrev : bottomTitle,
+ value: bottomAmount.readableDescription,
+ color: foreColor,
+ large: large)
+ }
+ if let baseURL {
+ VStack(alignment: .leading) {
+ Text(iconOnly ? "Exchange:" : "Using Exchange:")
+ .multilineTextAlignment(.leading)
+ .accessibilityFont(.body)
+ HStack {
+ Spacer()
+ Text(baseURL.trimURL())
+ .multilineTextAlignment(.center)
+ .accessibilityFont(large ? .title3 : .body)
+// .fontWeight(large ? .medium : .regular) // @available(iOS 16.0, *)
+ .foregroundColor(labelColor)
+ }
+ }
+ .padding(.top, 4)
+ .frame(maxWidth: .infinity, alignment: .leading)
+ .listRowSeparator(.hidden)
+ }
+ } header: {
+ if !iconOnly {
+ Text("Summary")
+ .accessibilityFont(.title3)
+ }
+ }
+ }
+}
+// MARK: -
+struct ThreeAmounts_Previews: PreviewProvider {
+ static var previews: some View {
+ let common = TransactionCommon(type: .withdrawal,
+ txState: TransactionState(major: .done),
+ amountEffective: try! Amount(fromString: LONGCURRENCY + ":0.1"),
+ amountRaw: try! Amount(fromString: LONGCURRENCY + ":0.2"),
+ transactionId: "someTxID",
+ timestamp: Timestamp(from: 1_666_666_000_000),
+ txActions: [])
+ Group {
+ List {
+ ThreeAmountsSheet(common: common, topAbbrev: "Withdrawal",
+ topTitle: "Withdrawal", baseURL: DEMOEXCHANGE, large: 1==0)
+ .safeAreaInset(edge: .bottom) {
+ Button(String(localized: "Accept"), action: {})
+ .buttonStyle(TalerButtonStyle(type: .prominent))
+ .padding(.horizontal)
+ .disabled(true)
+ }
+ }
+ }
+ }
+}