[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-taler-ios] branch master updated (f361428 -> ad57348)
From: |
gnunet |
Subject: |
[taler-taler-ios] branch master updated (f361428 -> ad57348) |
Date: |
Fri, 07 Jul 2023 11:39:58 +0200 |
This is an automated email from the git hooks/post-receive script.
marc-stibane pushed a change to branch master
in repository taler-ios.
from f361428 Updated building instructions
new bdcb5d6 TestFlight WhatToTest for Xcode Cloud
new 0353dca Payment model uses transactionID
new 856c05a List handling
new c4e4ad0 ThreeAmounts
new f253367 shorter title, debug info
new 25509c9 remove .travis.yml
new 0b2122a Enhanced ToS plaintext formatting
new c310fc1 tosStatus
new ad57348 iOS: bump version to 0.9.3 (14)
The 9 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.travis.yml | 6 --
TalerWallet.xcodeproj/project.pbxproj | 18 +++-
TalerWallet1/Controllers/PublicConstants.swift | 3 +
TalerWallet1/Model/Model+Payment.swift | 112 +++++++++++++--------
TalerWallet1/Model/Model+Withdraw.swift | 11 +-
.../Views/Balances/BalancesSectionView.swift | 12 +--
.../Views/Exchange/ExchangeSectionView.swift | 6 +-
TalerWallet1/Views/HelperViews/AmountView.swift | 21 ++--
TalerWallet1/Views/Main/WalletEmptyView.swift | 3 +-
TalerWallet1/Views/Payment/PaymentURIView.swift | 81 ++++++++-------
.../Views/Sheets/P2P_Sheets/P2pPayURIView.swift | 2 +
.../Sheets/P2P_Sheets/P2pReceiveURIView.swift | 2 +
TalerWallet1/Views/Sheets/URLSheet.swift | 1 +
TalerWallet1/Views/Transactions/ThreeAmounts.swift | 23 +++--
.../Views/Transactions/TransactionsEmptyView.swift | 4 +-
.../Views/Transactions/TransactionsListView.swift | 6 +-
.../WithdrawBankIntegrated/WithdrawTOSView.swift | 20 +++-
.../WithdrawBankIntegrated/WithdrawURIView.swift | 2 +
TestFlight/WhatToTest.en-US.txt | 29 ++++++
19 files changed, 241 insertions(+), 121 deletions(-)
delete mode 100644 .travis.yml
create mode 100644 TestFlight/WhatToTest.en-US.txt
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index e4e6faf..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,6 +0,0 @@
-os: osx
-language: swift
-xcode_project: Taler.xcodeproj
-xcode_scheme: Taler
-osx_image: xcode11.6
-xcode_destination: platform=iOS Simulator,OS=13.6,name=iPhone 11
diff --git a/TalerWallet.xcodeproj/project.pbxproj
b/TalerWallet.xcodeproj/project.pbxproj
index 0f42ea1..df18aaa 100644
--- a/TalerWallet.xcodeproj/project.pbxproj
+++ b/TalerWallet.xcodeproj/project.pbxproj
@@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
- objectVersion = 52;
+ objectVersion = 54;
objects = {
/* Begin PBXBuildFile section */
@@ -29,6 +29,7 @@
4E753A062A0952F8002D9328 /* DebugViewC.swift in Sources */ =
{isa = PBXBuildFile; fileRef = 4E753A052A0952F7002D9328 /* DebugViewC.swift */;
};
4E753A082A0B6A5F002D9328 /* ShareSheet.swift in Sources */ =
{isa = PBXBuildFile; fileRef = 4E753A072A0B6A5F002D9328 /* ShareSheet.swift */;
};
4E7940DE29FC307C00A9AEA1 /* SendPurpose.swift in Sources */ =
{isa = PBXBuildFile; fileRef = 4E7940DD29FC307C00A9AEA1 /* SendPurpose.swift
*/; };
+ 4E7CFD382A532CE100CBAFF3 /* WhatToTest.en-US.txt in Resources
*/ = {isa = PBXBuildFile; fileRef = 4E7CFD372A532CE100CBAFF3 /*
WhatToTest.en-US.txt */; };
4E87C8732A31CB7F001C6406 /* TransactionsEmptyView.swift in
Sources */ = {isa = PBXBuildFile; fileRef = 4E87C8722A31CB7F001C6406 /*
TransactionsEmptyView.swift */; };
4E87C8752A34B411001C6406 /* UncompletedRowView.swift in Sources
*/ = {isa = PBXBuildFile; fileRef = 4E87C8742A34B411001C6406 /*
UncompletedRowView.swift */; };
4E8E25332A1CD39700A27BFA /* EqualIconWidthDomain.swift in
Sources */ = {isa = PBXBuildFile; fileRef = 4E8E25322A1CD39700A27BFA /*
EqualIconWidthDomain.swift */; };
@@ -162,6 +163,7 @@
4E753A052A0952F7002D9328 /* DebugViewC.swift */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path
= DebugViewC.swift; sourceTree = "<group>"; };
4E753A072A0B6A5F002D9328 /* ShareSheet.swift */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path
= ShareSheet.swift; sourceTree = "<group>"; };
4E7940DD29FC307C00A9AEA1 /* SendPurpose.swift */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path
= SendPurpose.swift; sourceTree = "<group>"; };
+ 4E7CFD372A532CE100CBAFF3 /* WhatToTest.en-US.txt */ = {isa =
PBXFileReference; lastKnownFileType = text; path = "WhatToTest.en-US.txt";
sourceTree = "<group>"; };
4E87C8722A31CB7F001C6406 /* TransactionsEmptyView.swift */ =
{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType =
sourcecode.swift; path = TransactionsEmptyView.swift; sourceTree = "<group>"; };
4E87C8742A34B411001C6406 /* UncompletedRowView.swift */ = {isa
= PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift;
path = UncompletedRowView.swift; sourceTree = "<group>"; };
4E8E25322A1CD39700A27BFA /* EqualIconWidthDomain.swift */ =
{isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path =
EqualIconWidthDomain.swift; sourceTree = "<group>"; };
@@ -282,6 +284,14 @@
path = P2P_Sheets;
sourceTree = "<group>";
};
+ 4E7CFD362A532C7A00CBAFF3 /* TestFlight */ = {
+ isa = PBXGroup;
+ children = (
+ 4E7CFD372A532CE100CBAFF3 /*
WhatToTest.en-US.txt */,
+ );
+ path = TestFlight;
+ sourceTree = "<group>";
+ };
4EB094EE298979840043A8A1 /* TalerWallet1 */ = {
isa = PBXGroup;
children = (
@@ -532,6 +542,7 @@
D14AFD1424D232B300C51073 = {
isa = PBXGroup;
children = (
+ 4E7CFD362A532C7A00CBAFF3 /* TestFlight */,
4EB094EE298979840043A8A1 /* TalerWallet1 */,
4EB094E129896FED0043A8A1 /* Info.plist */,
4E3AE7EF29A7E8F40070BEC4 /* Taler
Wallet.entitlements */,
@@ -694,6 +705,7 @@
4EB094F429897A510043A8A1 /* Preview
Assets.xcassets in Resources */,
4E363CC02A24754200D7E98C /* Settings.bundle in
Resources */,
4EB094F0298979D30043A8A1 /* Assets.xcassets in
Resources */,
+ 4E7CFD382A532CE100CBAFF3 /*
WhatToTest.en-US.txt in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -965,7 +977,7 @@
CODE_SIGN_ENTITLEMENTS = "GNU
Taler.entitlements";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone
Developer";
CODE_SIGN_STYLE = Manual;
- CURRENT_PROJECT_VERSION = 13;
+ CURRENT_PROJECT_VERSION = 14;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = GUDDQ9428Y;
ENABLE_PREVIEWS = YES;
@@ -1007,7 +1019,7 @@
CODE_SIGN_ENTITLEMENTS = "GNU
Taler.entitlements";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone
Distribution";
CODE_SIGN_STYLE = Manual;
- CURRENT_PROJECT_VERSION = 13;
+ CURRENT_PROJECT_VERSION = 14;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = GUDDQ9428Y;
ENABLE_PREVIEWS = YES;
diff --git a/TalerWallet1/Controllers/PublicConstants.swift
b/TalerWallet1/Controllers/PublicConstants.swift
index bafc2ea..d98dd22 100644
--- a/TalerWallet1/Controllers/PublicConstants.swift
+++ b/TalerWallet1/Controllers/PublicConstants.swift
@@ -27,6 +27,9 @@ public let LONGCURRENCY = "GOLDLATINUM"
// 11 characters
// MARK: - Keys used in JSON
+public let PLAINTEXT = "text/plain"
+public let MARKDOWN = "text/markdown"
+
public let EXCHANGEBASEURL = "exchangeBaseUrl"
public let TALERURI = "talerUri"
diff --git a/TalerWallet1/Model/Model+Payment.swift
b/TalerWallet1/Model/Model+Payment.swift
index 93c6003..6c60846 100644
--- a/TalerWallet1/Model/Model+Payment.swift
+++ b/TalerWallet1/Model/Model+Payment.swift
@@ -9,48 +9,72 @@ import AnyCodable
fileprivate let ASYNCDELAY: UInt = 0 //set e.g to 6 or 9 seconds for
debugging
// MARK: - ContractTerms
-struct ContractTerms: Codable {
- let amount: Amount
- let maxFee: Amount
- let maxWireFee: Amount
+
+// export interface TalerProtocolDuration {
+// readonly d_us: number | "forever";
+// }
+
+struct MerchantContractTerms: Codable {
+ let hWire: String // Hash of the merchant's wire details
+// let autoRefund: String? // TODO: TalerProtocolDuration
+ let wireMethod: String // merchant wants to use
+ let summary: String // Human-readable short summary of the
contract
+ let summaryI18n: String? // " localized "
+ let nonce: String // used to ensure freshness
+ let amount: Amount // Total amount payable
+ let payDeadline: Timestamp // Deadline to pay for the contract
+ let maxFee: Amount // Maximum deposit fee covered by the
merchant
let merchant: Merchant
- let extra: Extra
- let summary: String
- let timestamp: Timestamp
- let payDeadline: Timestamp
- let refundDeadline: Timestamp
- let wireTransferDeadline: Timestamp
- let merchantBaseURL: String
- let fulfillmentURL: String
- let publicReorderURL: String
- let auditors: [Auditor]
+ let merchantPub: String // Public key of the merchant
+ let deliveryDate: Timestamp? // indicating when the order should be
delivered
+ let deliveryLocation: Location? // Delivery location for (all!)
products
let exchanges: [ExchangeForPay]
- let orderID, nonce, merchantPub: String
- let products: [Product]
- let hWire: String
- let wireMethod: String
- let wireFeeAmortization: Int
+ let products: [Product]? // Products that are sold in this
contract
+ let refundDeadline: Timestamp // Deadline for refunds
+ let wireTransferDeadline: Timestamp // Deadline for the wire transfer
+ let timestamp: Timestamp // Time when the contract was
generated by the merchant
+ let orderID: String // uniquely identify the purchase
within one merchant instance
+ let merchantBaseURL: String // Base URL of the merchant's backend
+ let fulfillmentURL: String? // Fulfillment URL to view the product
or delivery status
+ let publicReorderURL: String? // URL meant to share the shopping cart
+ let fulfillmentMessage: String? // Plain text fulfillment message in
the merchant's default language
+ let fulfillmentMessageI18n: String? // Plain text fulfillment message in
the merchant's default language
+ let wireFeeAmortization: Int? // Share of the wire fee that must be
settled with one payment
+ let maxWireFee: Amount? // Maximum wire fee that the merchant
agrees to pay for
+ let minimumAge: Int?
+ let extra: Extra // Extra data, interpreted by the
mechant only
+// let auditors: [Auditor]?
enum CodingKeys: String, CodingKey {
+ case hWire = "h_wire"
+// case autoRefund = "auto_refund"
+ case wireMethod = "wire_method"
+ case summary
+ case summaryI18n = "summary_i18n"
+ case nonce
case amount
- case maxFee = "max_fee"
- case maxWireFee = "max_wire_fee"
- case merchant, extra, summary
- case timestamp
case payDeadline = "pay_deadline"
+ case maxFee = "max_fee"
+ case merchant
+ case merchantPub = "merchant_pub"
+ case deliveryDate = "delivery_date"
+ case deliveryLocation = "delivery_location"
+ case exchanges
+ case products
case refundDeadline = "refund_deadline"
case wireTransferDeadline = "wire_transfer_deadline"
+ case timestamp
+ case orderID = "order_id"
case merchantBaseURL = "merchant_base_url"
case fulfillmentURL = "fulfillment_url"
case publicReorderURL = "public_reorder_url"
- case auditors, exchanges
- case orderID = "order_id"
- case nonce
- case merchantPub = "merchant_pub"
- case products
- case hWire = "h_wire"
- case wireMethod = "wire_method"
+ case fulfillmentMessage = "fulfillment_message"
+ case fulfillmentMessageI18n = "fulfillment_message_i18n"
case wireFeeAmortization = "wire_fee_amortization"
+ case maxWireFee = "max_wire_fee"
+ case minimumAge = "minimum_age"
+ case extra
+// case auditors
}
}
// MARK: - Auditor
@@ -77,20 +101,28 @@ struct ExchangeForPay: Codable {
}
// MARK: - Extra
struct Extra: Codable {
- let articleName: String
+ let articleName: String?
enum CodingKeys: String, CodingKey {
case articleName = "article_name"
}
}
// MARK: -
+enum PreparePayResultType: String, Codable {
+ case paymentPossible = "payment-possible"
+ case alreadyConfirmed = "already-confirmed"
+ case insufficientBalance = "insufficient-balance"
+}
+
/// The result from PreparePayForUri
struct PaymentDetailsForUri: Codable {
+ let status: PreparePayResultType
+ let transactionId: String
+ let contractTerms: MerchantContractTerms
+ let contractTermsHash: String
let amountRaw: Amount
let amountEffective: Amount
- let proposalId: String
- let contractTerms: ContractTerms
- let contractTermsHash: String
+ let talerUri: String
}
/// A request to get an exchange's payment contract terms.
fileprivate struct PreparePayForUri: WalletBackendFormattedRequest {
@@ -107,18 +139,18 @@ fileprivate struct PreparePayForUri:
WalletBackendFormattedRequest {
/// The result from confirmPayForUri
struct ConfirmPayResult: Decodable {
var type: String
- var contractTerms: ContractTerms
+ var contractTerms: MerchantContractTerms
var transactionId: String
}
/// A request to get an exchange's payment details.
fileprivate struct confirmPayForUri: WalletBackendFormattedRequest {
typealias Response = ConfirmPayResult
func operation() -> String { return "confirmPay" }
- func args() -> Args { return Args(proposalId: proposalId) }
+ func args() -> Args { return Args(transactionId: transactionId) }
- var proposalId: String
+ var transactionId: String
struct Args: Encodable {
- var proposalId: String
+ var transactionId: String
}
}
// MARK: -
@@ -132,9 +164,9 @@ extension WalletModel {
return response
}
@MainActor
- func confirmPayM(_ proposalId: String) // M for MainActor
+ func confirmPayM(_ transactionId: String) // M for MainActor
async throws -> ConfirmPayResult {
- let request = confirmPayForUri(proposalId: proposalId)
+ let request = confirmPayForUri(transactionId: transactionId)
let response = try await sendRequest(request, ASYNCDELAY)
return response
}
diff --git a/TalerWallet1/Model/Model+Withdraw.swift
b/TalerWallet1/Model/Model+Withdraw.swift
index 5a4e39d..754c9dd 100644
--- a/TalerWallet1/Model/Model+Withdraw.swift
+++ b/TalerWallet1/Model/Model+Withdraw.swift
@@ -66,10 +66,19 @@ fileprivate struct GetWithdrawalDetailsForAmount:
WalletBackendFormattedRequest
}
}
// MARK: -
+enum ExchangeTosStatus: String, Codable {
+ case new = "new"
+ case accepted = "accepted"
+ case changed = "changed"
+ case notFound = "not-found"
+ case unknown = "unknown"
+}
struct ExchangeTermsOfService: Decodable {
- var content: String
var currentEtag: String
var acceptedEtag: String?
+ var tosStatus: ExchangeTosStatus
+ var contentType: String
+ var content: String
}
/// A request to query an exchange's terms of service.
fileprivate struct GetExchangeTermsOfService: WalletBackendFormattedRequest {
diff --git a/TalerWallet1/Views/Balances/BalancesSectionView.swift
b/TalerWallet1/Views/Balances/BalancesSectionView.swift
index 5cd273a..de1bfaa 100644
--- a/TalerWallet1/Views/Balances/BalancesSectionView.swift
+++ b/TalerWallet1/Views/Balances/BalancesSectionView.swift
@@ -193,17 +193,17 @@ fileprivate struct BindingViewContainer : View {
scopeInfo: scopeInfo,
requiresUserInput: false,
hasPendingTransactions: true)
- List {
- BalancesSectionView(balance: balance,
- centsToTransfer: $centsToTransfer,
- summary: $summary)
- }
+ BalancesSectionView(balance: balance,
+ centsToTransfer: $centsToTransfer,
+ summary: $summary)
}
}
struct BalancesSectionView_Previews: PreviewProvider {
static var previews: some View {
- BindingViewContainer()
+ List {
+ BindingViewContainer()
+ }
}
}
#endif
diff --git a/TalerWallet1/Views/Exchange/ExchangeSectionView.swift
b/TalerWallet1/Views/Exchange/ExchangeSectionView.swift
index c29dcdd..ffe53dc 100644
--- a/TalerWallet1/Views/Exchange/ExchangeSectionView.swift
+++ b/TalerWallet1/Views/Exchange/ExchangeSectionView.swift
@@ -87,16 +87,16 @@ struct ExchangeRow_Container : View {
exchangeStatus: "exchangeStatus",
ageRestrictionOptions: [],
permanent: false)
- List {
ExchangeSectionView(currency: LONGCURRENCY, exchanges: [exchange1,
exchange2],
centsToTransfer: $centsToTransfer)
- }
}
}
struct ExchangeRow_Previews: PreviewProvider {
static var previews: some View {
- ExchangeRow_Container()
+ List {
+ ExchangeRow_Container()
+ }
}
}
#endif
diff --git a/TalerWallet1/Views/HelperViews/AmountView.swift
b/TalerWallet1/Views/HelperViews/AmountView.swift
index bf2b32f..1d059cb 100644
--- a/TalerWallet1/Views/HelperViews/AmountView.swift
+++ b/TalerWallet1/Views/HelperViews/AmountView.swift
@@ -9,16 +9,23 @@ struct AmountView: View {
let value: String
let color: Color
let large: Bool // set to false for QR or IBAN
+
var body: some View {
- VStack {
+ VStack(alignment: .leading) {
Text(title)
- .font(.title3)
- Text(value)
- .font(large ? .largeTitle : .title)
- .fontWeight(large ? .medium : .regular)
- .foregroundColor(color)
+ .multilineTextAlignment(.leading)
+ .font(.body)
+ HStack {
+ Spacer()
+ Text(value)
+ .multilineTextAlignment(.center)
+ .font(large ? .title : .title2)
+// .fontWeight(large ? .medium : .regular) //
@available(iOS 16.0, *)
+ .foregroundColor(color)
+ Spacer()
+ }
}
- .frame(maxWidth: .infinity, alignment: .center)
+ .frame(maxWidth: .infinity, alignment: .leading)
.listRowSeparator(.hidden)
}
}
diff --git a/TalerWallet1/Views/Main/WalletEmptyView.swift
b/TalerWallet1/Views/Main/WalletEmptyView.swift
index 1ec8cd7..d095ce2 100644
--- a/TalerWallet1/Views/Main/WalletEmptyView.swift
+++ b/TalerWallet1/Views/Main/WalletEmptyView.swift
@@ -27,9 +27,8 @@ struct WalletEmptyView: View {
Text("Just register a test account, then withdraw some coins.")
}
}
-// .padding(.vertical)
- .font(.title2)
.listStyle(myListStyle.style).anyView
+ .font(.title2)
.background(WalletColors().backgroundColor.edgesIgnoringSafeArea(.all))
.onAppear() {
DebugViewC.shared.setViewID(VIEW_EMPTY) // 10
diff --git a/TalerWallet1/Views/Payment/PaymentURIView.swift
b/TalerWallet1/Views/Payment/PaymentURIView.swift
index ece1955..a42ddc2 100644
--- a/TalerWallet1/Views/Payment/PaymentURIView.swift
+++ b/TalerWallet1/Views/Payment/PaymentURIView.swift
@@ -13,6 +13,7 @@ struct PaymentURIView: View {
let navTitle = String(localized: "Confirm Payment", comment:"pay merchant")
@EnvironmentObject private var controller: Controller
+ @AppStorage("myListStyle") var myListStyle: MyListStyle = .automatic
// the scanned URL
let url: URL
@@ -22,7 +23,7 @@ struct PaymentURIView: View {
func acceptAction(detailsForUri: PaymentDetailsForUri) {
Task {
do {
- let confirmPayResult = try await
model.confirmPayM(detailsForUri.proposalId)
+ let confirmPayResult = try await
model.confirmPayM(detailsForUri.transactionId)
symLog.log(confirmPayResult as Any)
if confirmPayResult.type != "done" {
controller.playSound(0)
@@ -42,7 +43,7 @@ struct PaymentURIView: View {
var body: some View {
if let detailsForUri {
ScrollViewReader { scrollView in
- VStack {
+ List {
let baseURL = detailsForUri.contractTerms.exchanges.first?.url
let raw = detailsForUri.amountRaw
let effective = detailsForUri.amountEffective
@@ -52,21 +53,22 @@ struct PaymentURIView: View {
topAmount: raw, fee: fee,
bottomTitle: String(localized: "\(currency) to
be spent:"),
bottomAmount: effective,
- large: true, pending: false, incoming:
false,
+ large: false, pending: false, incoming:
false,
baseURL: baseURL)
// TODO: payment: popup with all possible exchanges, check fees
- .safeAreaInset(edge: .bottom) {
- Button(navTitle, action: { acceptAction(detailsForUri:
detailsForUri) })
- .buttonStyle(TalerButtonStyle(type: .prominent))
- .padding(.horizontal)
- }
+ }
+ .listStyle(myListStyle.style).anyView
+ .safeAreaInset(edge: .bottom) {
+ Button(navTitle, action: { acceptAction(detailsForUri:
detailsForUri) })
+ .buttonStyle(TalerButtonStyle(type: .prominent))
+ .padding(.horizontal)
}
.navigationTitle(navTitle)
- }
+ } // ScrollViewReader
} else {
let badURL = "Error in URL: \(url)"
WithdrawProgressView(message: url.host ?? badURL)
- .navigationTitle("Contacting Exchange")
+ .navigationTitle("Find Exchange")
.task {
do {
symLog.log(".task")
@@ -85,34 +87,43 @@ struct PaymentURIView_Previews: PreviewProvider {
let merchant = Merchant(name: "Merchant")
let extra = Extra(articleName: "articleName")
let product = Product(description: "description")
- let terms = ContractTerms(amount: try! Amount(fromString: LONGCURRENCY
+ ":2.2"),
- maxFee: try! Amount(fromString: LONGCURRENCY
+ ":0.2"),
- maxWireFee: try! Amount(fromString:
LONGCURRENCY + ":0.2"),
- merchant: merchant,
- extra: extra,
- summary: "summary",
- timestamp: Timestamp.now(),
- payDeadline: Timestamp.tomorrow(),
- refundDeadline: Timestamp.tomorrow(),
- wireTransferDeadline: Timestamp.tomorrow(),
- merchantBaseURL: "merchantBaseURL",
- fulfillmentURL: "fulfillmentURL",
- publicReorderURL: "publicReorderURL",
- auditors: [],
- exchanges: [],
- orderID: "orderID",
- nonce: "nonce",
- merchantPub: "merchantPub",
- products: [product],
- hWire: "hWire",
- wireMethod: "wireMethod",
- wireFeeAmortization: 0)
+ let terms = MerchantContractTerms(hWire: "hWire",
+ wireMethod: "wireMethod",
+ summary: "summary",
+ summaryI18n: nil,
+ nonce: "nonce",
+ amount: try! Amount(fromString:
LONGCURRENCY + ":2.2"),
+ payDeadline: Timestamp.tomorrow(),
+ maxFee: try! Amount(fromString:
LONGCURRENCY + ":0.2"),
+ merchant: merchant,
+ merchantPub: "merchantPub",
+ deliveryDate: nil,
+ deliveryLocation: nil,
+ exchanges: [],
+ products: [product],
+ refundDeadline: Timestamp.tomorrow(),
+ wireTransferDeadline:
Timestamp.tomorrow(),
+ timestamp: Timestamp.now(),
+ orderID: "orderID",
+ merchantBaseURL: "merchantBaseURL",
+ fulfillmentURL: "fulfillmentURL",
+ publicReorderURL:
"publicReorderURL",
+ fulfillmentMessage: nil,
+ fulfillmentMessageI18n: nil,
+ wireFeeAmortization: 0,
+ maxWireFee: try! Amount(fromString:
LONGCURRENCY + ":0.2"),
+ minimumAge: nil,
+ extra: extra
+// auditors: [],
+ )
let details = PaymentDetailsForUri(
+ status: PreparePayResultType.paymentPossible,
+ transactionId: "txn:payment:012345",
+ contractTerms: terms,
+ contractTermsHash: "termsHash",
amountRaw: try! Amount(fromString: LONGCURRENCY + ":2.2"),
amountEffective: try! Amount(fromString: LONGCURRENCY + ":2.4"),
- proposalId: "proposalId",
- contractTerms: terms,
- contractTermsHash: "termsHash"
+ talerUri: "talerURI"
)
let url = URL(string: "taler://pay/some_amount")!
diff --git a/TalerWallet1/Views/Sheets/P2P_Sheets/P2pPayURIView.swift
b/TalerWallet1/Views/Sheets/P2P_Sheets/P2pPayURIView.swift
index d3cb92e..89a6502 100644
--- a/TalerWallet1/Views/Sheets/P2P_Sheets/P2pPayURIView.swift
+++ b/TalerWallet1/Views/Sheets/P2P_Sheets/P2pPayURIView.swift
@@ -16,6 +16,7 @@ struct P2pPayURIView: View {
let url: URL
@EnvironmentObject private var model: WalletModel
+ @AppStorage("myListStyle") var myListStyle: MyListStyle = .automatic
@State private var peerPullDebitResponse: PreparePeerPullDebitResponse?
@@ -34,6 +35,7 @@ struct P2pPayURIView: View {
large: false, pending: false, incoming:
false,
baseURL: nil)
}
+ .listStyle(myListStyle.style).anyView
.navigationTitle(navTitle)
NavigationLink(destination: LazyView {
diff --git a/TalerWallet1/Views/Sheets/P2P_Sheets/P2pReceiveURIView.swift
b/TalerWallet1/Views/Sheets/P2P_Sheets/P2pReceiveURIView.swift
index f40a5bf..c4f4301 100644
--- a/TalerWallet1/Views/Sheets/P2P_Sheets/P2pReceiveURIView.swift
+++ b/TalerWallet1/Views/Sheets/P2P_Sheets/P2pReceiveURIView.swift
@@ -11,6 +11,7 @@ import SymLog
struct P2pReceiveURIView: View {
private let symLog = SymLogV()
let navTitle = String(localized: "Accept P2P Receive")
+ @AppStorage("myListStyle") var myListStyle: MyListStyle = .automatic
// the scanned URL
let url: URL
@@ -34,6 +35,7 @@ struct P2pReceiveURIView: View {
large: false, pending: false,
incoming: true,
baseURL: nil)
}
+ .listStyle(myListStyle.style).anyView
.navigationTitle(navTitle)
let tosAccepted = true // TODO:
https://bugs.gnunet.org/view.php?id=7869
if tosAccepted {
diff --git a/TalerWallet1/Views/Sheets/URLSheet.swift
b/TalerWallet1/Views/Sheets/URLSheet.swift
index 6902d55..723480f 100644
--- a/TalerWallet1/Views/Sheets/URLSheet.swift
+++ b/TalerWallet1/Views/Sheets/URLSheet.swift
@@ -39,6 +39,7 @@ struct URLSheet: View {
.navigationTitle(navTitle)
}
}.task {
+ symLog.log(urlToOpen)
urlCommand = controller.openURL(urlToOpen)
}
}
diff --git a/TalerWallet1/Views/Transactions/ThreeAmounts.swift
b/TalerWallet1/Views/Transactions/ThreeAmounts.swift
index 5e60ce4..8d85c04 100644
--- a/TalerWallet1/Views/Transactions/ThreeAmounts.swift
+++ b/TalerWallet1/Views/Transactions/ThreeAmounts.swift
@@ -64,18 +64,23 @@ struct ThreeAmountsView: View {
color: foreColor,
large: large)
if let baseURL {
- VStack {
+ VStack(alignment: .leading) {
Text(incoming ? "from Exchange:" : "to Exchange:")
- .font(.title3)
- Text(baseURL.trimURL())
- .font(large ? .title : .title2)
- .fontWeight(large ? .medium : .regular)
- .foregroundColor(labelColor)
+ .multilineTextAlignment(.leading)
+ .font(.body)
+ HStack {
+ Spacer()
+ Text(baseURL.trimURL())
+ .multilineTextAlignment(.center)
+ .font(large ? .title : .title2)
+ // .fontWeight(large ? .medium
: .regular) // @available(iOS 16.0, *)
+ .foregroundColor(labelColor)
+ Spacer()
+ }
}
.padding(.top, 4)
- .frame(maxWidth: .infinity, alignment: .center)
+ .frame(maxWidth: .infinity, alignment: .leading)
.listRowSeparator(.hidden)
-
}
if let status {
HStack {
@@ -99,7 +104,7 @@ struct ThreeAmounts_Previews: PreviewProvider {
txActions: [])
Group {
List {
- ThreeAmountsSheet(common: common, topTitle: "Withdrawal",
baseURL: DEMOEXCHANGE, large: 1==1)
+ ThreeAmountsSheet(common: common, topTitle: "Withdrawal",
baseURL: DEMOEXCHANGE, large: 1==0)
.safeAreaInset(edge: .bottom) {
Button(String(localized: "Accept"), action: {})
.buttonStyle(TalerButtonStyle(type: .prominent))
diff --git a/TalerWallet1/Views/Transactions/TransactionsEmptyView.swift
b/TalerWallet1/Views/Transactions/TransactionsEmptyView.swift
index eb7479f..fa382ba 100644
--- a/TalerWallet1/Views/Transactions/TransactionsEmptyView.swift
+++ b/TalerWallet1/Views/Transactions/TransactionsEmptyView.swift
@@ -19,10 +19,10 @@ struct TransactionsEmptyView: View {
Section {
Text("There are no transactions for \(currency).")
}
+ .font(.title2)
}
- .padding(.vertical)
- .font(.title2)
.listStyle(myListStyle.style).anyView
+// .padding(.vertical)
.background(WalletColors().backgroundColor.edgesIgnoringSafeArea(.all))
.onAppear() {
DebugViewC.shared.setViewID(VIEW_EMPTY) // 10
diff --git a/TalerWallet1/Views/Transactions/TransactionsListView.swift
b/TalerWallet1/Views/Transactions/TransactionsListView.swift
index ac27eea..d5a4f3c 100644
--- a/TalerWallet1/Views/Transactions/TransactionsListView.swift
+++ b/TalerWallet1/Views/Transactions/TransactionsListView.swift
@@ -110,12 +110,12 @@ extension TransactionsListView {
}
}
// .onDelete(perform: removeItems) // delete this row
from the list
- }
+ }.id(viewId)
+ .listStyle(myListStyle.style).anyView
.refreshable {
symLog?.log("refreshing")
await reloadAllAction()
- }.id(viewId)
- .listStyle(myListStyle.style).anyView
+ }
.onAppear {
if showUpDown {
upAction = { withAnimation { scrollView.scrollTo(0) }}
diff --git a/TalerWallet1/Views/WithdrawBankIntegrated/WithdrawTOSView.swift
b/TalerWallet1/Views/WithdrawBankIntegrated/WithdrawTOSView.swift
index 4298ef2..e7a4a53 100644
--- a/TalerWallet1/Views/WithdrawBankIntegrated/WithdrawTOSView.swift
+++ b/TalerWallet1/Views/WithdrawBankIntegrated/WithdrawTOSView.swift
@@ -62,7 +62,7 @@ struct WithdrawTOSView: View {
}.task {
do {
if let exchangeBaseUrl {
- let acceptedFormat: [String] = ["text/markdown",
"text/plain"]
+ let acceptedFormat: [String] = [MARKDOWN, PLAINTEXT]
let someTOS = try await
model.loadExchangeTermsOfServiceM(exchangeBaseUrl,
acceptedFormat: acceptedFormat)
exchangeTOS = someTOS
@@ -83,10 +83,22 @@ extension WithdrawTOSView {
var body: some View {
if let tos = exchangeTOS {
- let components = tos.content.components(separatedBy:"\n\n")
+ let components = tos.content.components(separatedBy: "\n\n")
- List (components, id: \.self) { term in
- Text(term)
+ List (components, id: \.self) { term0 in
+ if tos.contentType == PLAINTEXT {
+ let term1 = term0.replacingOccurrences(of: "\n ",
with: " ") // newline + 5 blanks
+ let term2 = term1.replacingOccurrences(of: "\n" ,
with: " ") // remove all other linebreaks
+ let term3 = term2.replacingOccurrences(of: " ====",
with: "\n====") // add them back for underscoring
+ let term4 = term3.replacingOccurrences(of: " ----",
with: "\n----") // special for "Highlights:"
+ Section {
+ Text(term4)
+ }
+ } else {
+ Section {
+ Text(term0)
+ }
+ }
}.safeAreaInset(edge: .bottom) {
Button(String(localized: "Accept ToS"), action:
acceptAction)
.buttonStyle(TalerButtonStyle(type: .prominent))
diff --git a/TalerWallet1/Views/WithdrawBankIntegrated/WithdrawURIView.swift
b/TalerWallet1/Views/WithdrawBankIntegrated/WithdrawURIView.swift
index da3f547..e86a472 100644
--- a/TalerWallet1/Views/WithdrawBankIntegrated/WithdrawURIView.swift
+++ b/TalerWallet1/Views/WithdrawBankIntegrated/WithdrawURIView.swift
@@ -17,6 +17,7 @@ struct WithdrawURIView: View {
let url: URL
@EnvironmentObject private var model: WalletModel
+ @AppStorage("myListStyle") var myListStyle: MyListStyle = .automatic
// the exchange used for this withdrawal.
@State private var exchangeBaseUrl: String? = nil
@@ -44,6 +45,7 @@ struct WithdrawURIView: View {
QuiteSomeCoins(someCoins: someCoins, shouldShowFee: false,
currency: raw.currencyStr, amountEffective:
effective)
}
+ .listStyle(myListStyle.style).anyView
.navigationTitle(navTitle)
let tosAccepted = withdrawalAmountDetails.tosAccepted
if tosAccepted {
diff --git a/TestFlight/WhatToTest.en-US.txt b/TestFlight/WhatToTest.en-US.txt
new file mode 100644
index 0000000..a83b1b4
--- /dev/null
+++ b/TestFlight/WhatToTest.en-US.txt
@@ -0,0 +1,29 @@
+
+Version 0.9.3 (14)
+
+- ToS formatted with markdown (if the exchange supports this)
+
+
+Version 0.9.3 (13)
+
+- Checks that the amount is valid when sending coins
+- Shows the P2P purpose in the transaction details
+
+
+Version 0.9.3 (12)
+
+• Try to add an exchange, and then withdraw money from that
+
+- Automatic reload of balances
+
+
+Version 0.9.3 (11)
+
+- Bank-integrated withdrawal now hints better that you should confirm with bank
+
+
+Version 0.9.3 (10)
+
+• Try to withdraw some KUDOS (by tapping the link in Balances)
+• Try to spend them at the store
+• Try to send a friend/colleague some money
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-taler-ios] branch master updated (f361428 -> ad57348),
gnunet <=
- [taler-taler-ios] 01/09: TestFlight WhatToTest for Xcode Cloud, gnunet, 2023/07/07
- [taler-taler-ios] 05/09: shorter title, debug info, gnunet, 2023/07/07
- [taler-taler-ios] 02/09: Payment model uses transactionID, gnunet, 2023/07/07
- [taler-taler-ios] 03/09: List handling, gnunet, 2023/07/07
- [taler-taler-ios] 06/09: remove .travis.yml, gnunet, 2023/07/07
- [taler-taler-ios] 09/09: iOS: bump version to 0.9.3 (14), gnunet, 2023/07/07
- [taler-taler-ios] 08/09: tosStatus, gnunet, 2023/07/07
- [taler-taler-ios] 04/09: ThreeAmounts, gnunet, 2023/07/07
- [taler-taler-ios] 07/09: Enhanced ToS plaintext formatting, gnunet, 2023/07/07