[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-taler-ios] 21/24: amountToTransfer
From: |
gnunet |
Subject: |
[taler-taler-ios] 21/24: amountToTransfer |
Date: |
Tue, 05 Dec 2023 16:26:17 +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 dee64048bad4587285973f1cda53fef268664a97
Author: Marc Stibane <marc@taler.net>
AuthorDate: Tue Dec 5 11:58:37 2023 +0100
amountToTransfer
---
TalerWallet1/Views/Peer2peer/P2PReadyV.swift | 14 +++++++-------
TalerWallet1/Views/Peer2peer/P2PSubjectV.swift | 10 ++++------
TalerWallet1/Views/Peer2peer/SendAmount.swift | 4 ++--
3 files changed, 13 insertions(+), 15 deletions(-)
diff --git a/TalerWallet1/Views/Peer2peer/P2PReadyV.swift
b/TalerWallet1/Views/Peer2peer/P2PReadyV.swift
index 682e207..80ac75d 100644
--- a/TalerWallet1/Views/Peer2peer/P2PReadyV.swift
+++ b/TalerWallet1/Views/Peer2peer/P2PReadyV.swift
@@ -10,10 +10,10 @@ import SymLog
struct P2PReadyV: View {
private let symLog = SymLogV()
let stack: CallStack
- let amountToSend: Amount?
- let amountToReceive: Amount?
let summary: String
let expireDays: UInt
+ let amountToSend: Bool
+ let amountToTransfer: Amount
@Binding var transactionStarted: Bool
@EnvironmentObject private var model: WalletModel
@@ -74,23 +74,23 @@ struct P2PReadyV: View {
let timestamp = developerMode ?
Timestamp.inSomeMinutes(expireDays > 20 ? (24*60)
:
expireDays > 5 ? 60 : 3)
:
Timestamp.inSomeDays(expireDays)
- if let amountToSend {
- let terms = PeerContractTerms(amount: amountToSend,
+ if amountToSend {
+ let terms = PeerContractTerms(amount: amountToTransfer,
summary: summary,
purse_expiration: timestamp)
// TODO: let user choose baseURL
let response = try await model.initiatePeerPushDebitM(nil,
terms: terms)
// will switch from WithdrawProgressView to
TransactionDetailView
transactionId = response.transactionId
- } else if let amountToReceive {
- let terms = PeerContractTerms(amount: amountToReceive,
+ } else {
+ let terms = PeerContractTerms(amount: amountToTransfer,
summary: summary,
purse_expiration: timestamp)
// TODO: let user choose baseURL
let response = try await
model.initiatePeerPullCreditM(nil, terms: terms)
// will switch from WithdrawProgressView to
TransactionDetailView
transactionId = response.transactionId
- } else { fatalError() }
+ }
} catch { // TODO: error
symLog.log(error.localizedDescription)
}
diff --git a/TalerWallet1/Views/Peer2peer/P2PSubjectV.swift
b/TalerWallet1/Views/Peer2peer/P2PSubjectV.swift
index aa6c13b..5637946 100644
--- a/TalerWallet1/Views/Peer2peer/P2PSubjectV.swift
+++ b/TalerWallet1/Views/Peer2peer/P2PSubjectV.swift
@@ -9,14 +9,12 @@ import SymLog
struct P2PSubjectV: View {
private let symLog = SymLogV(0)
let stack: CallStack
-
- let amountToSend: Amount?
- let amountToReceive: Amount?
-// let amountToTransfer: Amount
let navTitle: String
let buttonTitle: String
let feeLabel: String
let currencyInfo: CurrencyInfo
+ let amountToSend: Bool
+ @Binding var amountToTransfer: Amount
@Binding var summary: String
@Binding var expireDays: UInt
@@ -81,10 +79,10 @@ struct P2PSubjectV: View {
let disabled = (expireDays == 0) || (summary.count < 1) //
TODO: check amountAvailable
NavigationLink(destination: LazyView {
P2PReadyV(stack: stack.push(),
- amountToSend: amountToSend,
- amountToReceive: amountToReceive,
summary: summary,
expireDays: expireDays,
+ amountToSend: amountToSend,
+ amountToTransfer: amountToTransfer,
transactionStarted: $transactionStarted)
}) {
Text(buttonTitle)
diff --git a/TalerWallet1/Views/Peer2peer/SendAmount.swift
b/TalerWallet1/Views/Peer2peer/SendAmount.swift
index 642d278..cf4821f 100644
--- a/TalerWallet1/Views/Peer2peer/SendAmount.swift
+++ b/TalerWallet1/Views/Peer2peer/SendAmount.swift
@@ -78,12 +78,12 @@ struct SendAmount: View {
.padding(4)
NavigationLink(destination: LazyView {
P2PSubjectV(stack: stack.push(),
- amountToSend: amountToTransfer,
- amountToReceive: nil,
navTitle: navTitle2,
buttonTitle: buttonTitle,
feeLabel: feeLabel,
currencyInfo: currencyInfo,
+ amountToSend: true,
+ amountToTransfer: $amountToTransfer,
summary: $summary,
expireDays: $expireDays)
}) { Text("Next") }
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-taler-ios] branch master updated (be6a335 -> 989c5ea), gnunet, 2023/12/05
- [taler-taler-ios] 03/24: Fix KYC/Confirm, gnunet, 2023/12/05
- [taler-taler-ios] 05/24: Refund, gnunet, 2023/12/05
- [taler-taler-ios] 07/24: Only main title, gnunet, 2023/12/05
- [taler-taler-ios] 06/24: Exchange: ToS, gnunet, 2023/12/05
- [taler-taler-ios] 04/24: ViewThatFits, gnunet, 2023/12/05
- [taler-taler-ios] 02/24: New "flags", gnunet, 2023/12/05
- [taler-taler-ios] 09/24: cleanup, gnunet, 2023/12/05
- [taler-taler-ios] 23/24: shortcutAction, gnunet, 2023/12/05
- [taler-taler-ios] 01/24: Logging, gnunet, 2023/12/05
- [taler-taler-ios] 21/24: amountToTransfer,
gnunet <=
- [taler-taler-ios] 08/24: talerURI only sent if valid, gnunet, 2023/12/05
- [taler-taler-ios] 17/24: currency & -Info, gnunet, 2023/12/05
- [taler-taler-ios] 19/24: use #0042b3, gnunet, 2023/12/05
- [taler-taler-ios] 10/24: increasedContrast, gnunet, 2023/12/05
- [taler-taler-ios] 14/24: Bump version to 0.9.3 (29), gnunet, 2023/12/05
- [taler-taler-ios] 20/24: Bump version to 0.9.3 (30), gnunet, 2023/12/05
- [taler-taler-ios] 11/24: Payment: show what to pay for, gnunet, 2023/12/05
- [taler-taler-ios] 22/24: cleanup, gnunet, 2023/12/05
- [taler-taler-ios] 18/24: cleanup, en/disable button, gnunet, 2023/12/05
- [taler-taler-ios] 13/24: Exchange icon, gnunet, 2023/12/05