Skip to content

Commit dd51db4

Browse files
committed
chore: cleanup
1 parent 6e10de5 commit dd51db4

47 files changed

Lines changed: 263 additions & 526 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

DashWallet/Sources/Models/Explore Dash/Services/CTXSpendAPI.swift

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ enum CTXSpendError: Error, LocalizedError {
3030
case merchantUnavailable
3131
case transactionRejected
3232
case purchaseLimitExceeded
33-
case purchaseLimitBelowMinimum
3433
case serverError
3534
case customError(String)
3635
case unknown
@@ -49,7 +48,7 @@ enum CTXSpendError: Error, LocalizedError {
4948
case .tokenRefreshFailed:
5049
return NSLocalizedString("Your session expired", comment: "DashSpend")
5150
case .insufficientFunds:
52-
return NSLocalizedString("Insufficient funds to complete this purchase. Please add more Dash to your wallet or reduce the amount.", comment: "DashSpend")
51+
return NSLocalizedString("You do not have sufficient funds to complete this transaction", comment: "DashSpend")
5352
case .invalidMerchant:
5453
return NSLocalizedString("This merchant is currently unavailable.", comment: "DashSpend")
5554
case .invalidAmount:
@@ -59,9 +58,7 @@ enum CTXSpendError: Error, LocalizedError {
5958
case .transactionRejected:
6059
return NSLocalizedString("Your transaction was rejected. Please try again or contact support if the problem persists.", comment: "DashSpend")
6160
case .purchaseLimitExceeded:
62-
return NSLocalizedString("Purchase amount exceeds the maximum limit for this merchant. Please reduce the amount and try again.", comment: "DashSpend")
63-
case .purchaseLimitBelowMinimum:
64-
return NSLocalizedString("Purchase amount is below the minimum limit for this merchant. Please increase the amount and try again.", comment: "DashSpend")
61+
return NSLocalizedString("The purchase limits for this merchant have changed. Please contact CTX Support for more information.", comment: "DashSpend")
6562
case .serverError:
6663
return NSLocalizedString("Server error occurred. Please try again later.", comment: "DashSpend")
6764
case .customError(let message):

DashWallet/Sources/Models/Explore Dash/Services/CTXSpendService.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,8 @@ class CTXSpendService: CTXSpendAPIAccessTokenProvider, CTXSpendTokenProvider, Ob
138138
// Check for limit errors first
139139
if let fiatAmountErrors = errorData.fields?.fiatAmount,
140140
let firstFiatError = fiatAmountErrors.first {
141-
if firstFiatError == "above threshold" {
141+
if firstFiatError == "above threshold" || firstFiatError == "below threshold" {
142142
throw CTXSpendError.purchaseLimitExceeded
143-
} else if firstFiatError == "below threshold" {
144-
throw CTXSpendError.purchaseLimitBelowMinimum
145143
}
146144
}
147145

DashWallet/Sources/Models/Explore Dash/Services/ExploreDatabaseSyncManager.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import Foundation
2020
import SSZipArchive
2121

2222
// TODO: Move it to plist and note in release process
23-
let gsFilePath = "gs://dash-wallet-firebase.appspot.com/explore/explore-v3-testnet.db"
23+
let gsFilePath = "gs://dash-wallet-firebase.appspot.com/explore/explore-v3.db"
2424

2525
private let fileName = "explore"
2626

DashWallet/Sources/UI/Payments/Amount/Model/Send/SendAmountModel.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ enum SendAmountError: Error, ColorizedText, LocalizedError {
2828
var errorDescription: String? {
2929
switch self {
3030
case .insufficientMixedFunds: return NSLocalizedString("Insufficient mixed funds. Wait for CoinJoin mixing to finish or disable this feature in the settings to complete this transaction.", comment: "Send screen")
31-
case .insufficientFunds: return NSLocalizedString("Insufficient funds. Please add more Dash to your wallet or reduce the amount.", comment: "Send screen")
31+
case .insufficientFunds: return NSLocalizedString("Insufficient funds", comment: "Send screen")
3232
case .syncingChain: return NSLocalizedString("Wait until wallet is synced to complete the transaction",
3333
comment: "Send screen")
3434
case .networkUnavailable: return NSLocalizedString("Network Unavailable", comment: "Network Unavailable")

DashWallet/ar.lproj/Localizable.strings

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1228,12 +1228,6 @@
12281228
/* No comment provided by engineer. */
12291229
"Insufficient funds" = "رصيد غير كاف";
12301230

1231-
/* DashSpend */
1232-
"Insufficient funds to complete this purchase. Please add more Dash to your wallet or reduce the amount." = "Insufficient funds to complete this purchase. Please add more Dash to your wallet or reduce the amount.";
1233-
1234-
/* Send screen */
1235-
"Insufficient funds. Please add more Dash to your wallet or reduce the amount." = "Insufficient funds. Please add more Dash to your wallet or reduce the amount.";
1236-
12371231
/* Send screen */
12381232
"Insufficient mixed funds. Wait for CoinJoin mixing to finish or disable this feature in the settings to complete this transaction." = "Insufficient mixed funds. Wait for CoinJoin mixing to finish or disable this feature in the settings to complete this transaction.";
12391233

@@ -1973,12 +1967,6 @@
19731967
/* Coinbase/Buy Dash */
19741968
"Purchase" = "شراء";
19751969

1976-
/* DashSpend */
1977-
"Purchase amount exceeds the maximum limit for this merchant. Please reduce the amount and try again." = "Purchase amount exceeds the maximum limit for this merchant. Please reduce the amount and try again.";
1978-
1979-
/* DashSpend */
1980-
"Purchase amount is below the minimum limit for this merchant. Please increase the amount and try again." = "Purchase amount is below the minimum limit for this merchant. Please increase the amount and try again.";
1981-
19821970
/* Alert title */
19831971
"Purchase Failed" = "Purchase Failed";
19841972

@@ -2494,6 +2482,9 @@
24942482
/* Coinbase */
24952483
"The minimum amount you can send is %@" = "The minimum amount you can send is %@";
24962484

2485+
/* DashSpend */
2486+
"The purchase limits for this merchant have changed. Please contact CTX Support for more information." = "The purchase limits for this merchant have changed. Please contact CTX Support for more information.";
2487+
24972488
/* Usernames */
24982489
"The username '%@' was blocked by the Dash Network. Please try again by requesting another username." = "The username '%@' was blocked by the Dash Network. Please try again by requesting another username.";
24992490

@@ -3013,6 +3004,9 @@
30133004
/* No comment provided by engineer. */
30143005
"You do not have any contacts at the moment" = "You do not have any contacts at the moment";
30153006

3007+
/* DashSpend */
3008+
"You do not have sufficient funds to complete this transaction" = "You do not have sufficient funds to complete this transaction";
3009+
30163010
/* Coinbase */
30173011
"You don’t have enough balance" = "ليس لديك رصيد كافي";
30183012

DashWallet/bg.lproj/Localizable.strings

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1228,12 +1228,6 @@
12281228
/* No comment provided by engineer. */
12291229
"Insufficient funds" = "Недостатъчно средства";
12301230

1231-
/* DashSpend */
1232-
"Insufficient funds to complete this purchase. Please add more Dash to your wallet or reduce the amount." = "Insufficient funds to complete this purchase. Please add more Dash to your wallet or reduce the amount.";
1233-
1234-
/* Send screen */
1235-
"Insufficient funds. Please add more Dash to your wallet or reduce the amount." = "Insufficient funds. Please add more Dash to your wallet or reduce the amount.";
1236-
12371231
/* Send screen */
12381232
"Insufficient mixed funds. Wait for CoinJoin mixing to finish or disable this feature in the settings to complete this transaction." = "Insufficient mixed funds. Wait for CoinJoin mixing to finish or disable this feature in the settings to complete this transaction.";
12391233

@@ -1973,12 +1967,6 @@
19731967
/* Coinbase/Buy Dash */
19741968
"Purchase" = "Purchase";
19751969

1976-
/* DashSpend */
1977-
"Purchase amount exceeds the maximum limit for this merchant. Please reduce the amount and try again." = "Purchase amount exceeds the maximum limit for this merchant. Please reduce the amount and try again.";
1978-
1979-
/* DashSpend */
1980-
"Purchase amount is below the minimum limit for this merchant. Please increase the amount and try again." = "Purchase amount is below the minimum limit for this merchant. Please increase the amount and try again.";
1981-
19821970
/* Alert title */
19831971
"Purchase Failed" = "Purchase Failed";
19841972

@@ -2494,6 +2482,9 @@
24942482
/* Coinbase */
24952483
"The minimum amount you can send is %@" = "The minimum amount you can send is %@";
24962484

2485+
/* DashSpend */
2486+
"The purchase limits for this merchant have changed. Please contact CTX Support for more information." = "The purchase limits for this merchant have changed. Please contact CTX Support for more information.";
2487+
24972488
/* Usernames */
24982489
"The username '%@' was blocked by the Dash Network. Please try again by requesting another username." = "The username '%@' was blocked by the Dash Network. Please try again by requesting another username.";
24992490

@@ -3013,6 +3004,9 @@
30133004
/* No comment provided by engineer. */
30143005
"You do not have any contacts at the moment" = "You do not have any contacts at the moment";
30153006

3007+
/* DashSpend */
3008+
"You do not have sufficient funds to complete this transaction" = "You do not have sufficient funds to complete this transaction";
3009+
30163010
/* Coinbase */
30173011
"You don’t have enough balance" = "You don’t have enough balance";
30183012

DashWallet/ca.lproj/Localizable.strings

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1228,12 +1228,6 @@
12281228
/* No comment provided by engineer. */
12291229
"Insufficient funds" = "Insufficient funds";
12301230

1231-
/* DashSpend */
1232-
"Insufficient funds to complete this purchase. Please add more Dash to your wallet or reduce the amount." = "Insufficient funds to complete this purchase. Please add more Dash to your wallet or reduce the amount.";
1233-
1234-
/* Send screen */
1235-
"Insufficient funds. Please add more Dash to your wallet or reduce the amount." = "Insufficient funds. Please add more Dash to your wallet or reduce the amount.";
1236-
12371231
/* Send screen */
12381232
"Insufficient mixed funds. Wait for CoinJoin mixing to finish or disable this feature in the settings to complete this transaction." = "Insufficient mixed funds. Wait for CoinJoin mixing to finish or disable this feature in the settings to complete this transaction.";
12391233

@@ -1973,12 +1967,6 @@
19731967
/* Coinbase/Buy Dash */
19741968
"Purchase" = "Purchase";
19751969

1976-
/* DashSpend */
1977-
"Purchase amount exceeds the maximum limit for this merchant. Please reduce the amount and try again." = "Purchase amount exceeds the maximum limit for this merchant. Please reduce the amount and try again.";
1978-
1979-
/* DashSpend */
1980-
"Purchase amount is below the minimum limit for this merchant. Please increase the amount and try again." = "Purchase amount is below the minimum limit for this merchant. Please increase the amount and try again.";
1981-
19821970
/* Alert title */
19831971
"Purchase Failed" = "Purchase Failed";
19841972

@@ -2494,6 +2482,9 @@
24942482
/* Coinbase */
24952483
"The minimum amount you can send is %@" = "The minimum amount you can send is %@";
24962484

2485+
/* DashSpend */
2486+
"The purchase limits for this merchant have changed. Please contact CTX Support for more information." = "The purchase limits for this merchant have changed. Please contact CTX Support for more information.";
2487+
24972488
/* Usernames */
24982489
"The username '%@' was blocked by the Dash Network. Please try again by requesting another username." = "The username '%@' was blocked by the Dash Network. Please try again by requesting another username.";
24992490

@@ -3013,6 +3004,9 @@
30133004
/* No comment provided by engineer. */
30143005
"You do not have any contacts at the moment" = "You do not have any contacts at the moment";
30153006

3007+
/* DashSpend */
3008+
"You do not have sufficient funds to complete this transaction" = "You do not have sufficient funds to complete this transaction";
3009+
30163010
/* Coinbase */
30173011
"You don’t have enough balance" = "You don’t have enough balance";
30183012

DashWallet/cs.lproj/Localizable.strings

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1228,12 +1228,6 @@
12281228
/* No comment provided by engineer. */
12291229
"Insufficient funds" = "Nedostatečný zůstatek";
12301230

1231-
/* DashSpend */
1232-
"Insufficient funds to complete this purchase. Please add more Dash to your wallet or reduce the amount." = "Insufficient funds to complete this purchase. Please add more Dash to your wallet or reduce the amount.";
1233-
1234-
/* Send screen */
1235-
"Insufficient funds. Please add more Dash to your wallet or reduce the amount." = "Insufficient funds. Please add more Dash to your wallet or reduce the amount.";
1236-
12371231
/* Send screen */
12381232
"Insufficient mixed funds. Wait for CoinJoin mixing to finish or disable this feature in the settings to complete this transaction." = "Insufficient mixed funds. Wait for CoinJoin mixing to finish or disable this feature in the settings to complete this transaction.";
12391233

@@ -1973,12 +1967,6 @@
19731967
/* Coinbase/Buy Dash */
19741968
"Purchase" = "Purchase";
19751969

1976-
/* DashSpend */
1977-
"Purchase amount exceeds the maximum limit for this merchant. Please reduce the amount and try again." = "Purchase amount exceeds the maximum limit for this merchant. Please reduce the amount and try again.";
1978-
1979-
/* DashSpend */
1980-
"Purchase amount is below the minimum limit for this merchant. Please increase the amount and try again." = "Purchase amount is below the minimum limit for this merchant. Please increase the amount and try again.";
1981-
19821970
/* Alert title */
19831971
"Purchase Failed" = "Purchase Failed";
19841972

@@ -2494,6 +2482,9 @@
24942482
/* Coinbase */
24952483
"The minimum amount you can send is %@" = "The minimum amount you can send is %@";
24962484

2485+
/* DashSpend */
2486+
"The purchase limits for this merchant have changed. Please contact CTX Support for more information." = "The purchase limits for this merchant have changed. Please contact CTX Support for more information.";
2487+
24972488
/* Usernames */
24982489
"The username '%@' was blocked by the Dash Network. Please try again by requesting another username." = "The username '%@' was blocked by the Dash Network. Please try again by requesting another username.";
24992490

@@ -3013,6 +3004,9 @@
30133004
/* No comment provided by engineer. */
30143005
"You do not have any contacts at the moment" = "You do not have any contacts at the moment";
30153006

3007+
/* DashSpend */
3008+
"You do not have sufficient funds to complete this transaction" = "You do not have sufficient funds to complete this transaction";
3009+
30163010
/* Coinbase */
30173011
"You don’t have enough balance" = "You don’t have enough balance";
30183012

DashWallet/da.lproj/Localizable.strings

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1228,12 +1228,6 @@
12281228
/* No comment provided by engineer. */
12291229
"Insufficient funds" = "Insufficient funds";
12301230

1231-
/* DashSpend */
1232-
"Insufficient funds to complete this purchase. Please add more Dash to your wallet or reduce the amount." = "Insufficient funds to complete this purchase. Please add more Dash to your wallet or reduce the amount.";
1233-
1234-
/* Send screen */
1235-
"Insufficient funds. Please add more Dash to your wallet or reduce the amount." = "Insufficient funds. Please add more Dash to your wallet or reduce the amount.";
1236-
12371231
/* Send screen */
12381232
"Insufficient mixed funds. Wait for CoinJoin mixing to finish or disable this feature in the settings to complete this transaction." = "Insufficient mixed funds. Wait for CoinJoin mixing to finish or disable this feature in the settings to complete this transaction.";
12391233

@@ -1973,12 +1967,6 @@
19731967
/* Coinbase/Buy Dash */
19741968
"Purchase" = "Purchase";
19751969

1976-
/* DashSpend */
1977-
"Purchase amount exceeds the maximum limit for this merchant. Please reduce the amount and try again." = "Purchase amount exceeds the maximum limit for this merchant. Please reduce the amount and try again.";
1978-
1979-
/* DashSpend */
1980-
"Purchase amount is below the minimum limit for this merchant. Please increase the amount and try again." = "Purchase amount is below the minimum limit for this merchant. Please increase the amount and try again.";
1981-
19821970
/* Alert title */
19831971
"Purchase Failed" = "Purchase Failed";
19841972

@@ -2494,6 +2482,9 @@
24942482
/* Coinbase */
24952483
"The minimum amount you can send is %@" = "The minimum amount you can send is %@";
24962484

2485+
/* DashSpend */
2486+
"The purchase limits for this merchant have changed. Please contact CTX Support for more information." = "The purchase limits for this merchant have changed. Please contact CTX Support for more information.";
2487+
24972488
/* Usernames */
24982489
"The username '%@' was blocked by the Dash Network. Please try again by requesting another username." = "The username '%@' was blocked by the Dash Network. Please try again by requesting another username.";
24992490

@@ -3013,6 +3004,9 @@
30133004
/* No comment provided by engineer. */
30143005
"You do not have any contacts at the moment" = "You do not have any contacts at the moment";
30153006

3007+
/* DashSpend */
3008+
"You do not have sufficient funds to complete this transaction" = "You do not have sufficient funds to complete this transaction";
3009+
30163010
/* Coinbase */
30173011
"You don’t have enough balance" = "You don’t have enough balance";
30183012

DashWallet/de.lproj/Localizable.strings

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1228,12 +1228,6 @@
12281228
/* No comment provided by engineer. */
12291229
"Insufficient funds" = "Guthaben nicht ausreichend";
12301230

1231-
/* DashSpend */
1232-
"Insufficient funds to complete this purchase. Please add more Dash to your wallet or reduce the amount." = "Insufficient funds to complete this purchase. Please add more Dash to your wallet or reduce the amount.";
1233-
1234-
/* Send screen */
1235-
"Insufficient funds. Please add more Dash to your wallet or reduce the amount." = "Insufficient funds. Please add more Dash to your wallet or reduce the amount.";
1236-
12371231
/* Send screen */
12381232
"Insufficient mixed funds. Wait for CoinJoin mixing to finish or disable this feature in the settings to complete this transaction." = "Insufficient mixed funds. Wait for CoinJoin mixing to finish or disable this feature in the settings to complete this transaction.";
12391233

@@ -1973,12 +1967,6 @@
19731967
/* Coinbase/Buy Dash */
19741968
"Purchase" = "Kaufen";
19751969

1976-
/* DashSpend */
1977-
"Purchase amount exceeds the maximum limit for this merchant. Please reduce the amount and try again." = "Purchase amount exceeds the maximum limit for this merchant. Please reduce the amount and try again.";
1978-
1979-
/* DashSpend */
1980-
"Purchase amount is below the minimum limit for this merchant. Please increase the amount and try again." = "Purchase amount is below the minimum limit for this merchant. Please increase the amount and try again.";
1981-
19821970
/* Alert title */
19831971
"Purchase Failed" = "Purchase Failed";
19841972

@@ -2494,6 +2482,9 @@
24942482
/* Coinbase */
24952483
"The minimum amount you can send is %@" = "Der Mindestbetrag für eine Transaktion ist %@.";
24962484

2485+
/* DashSpend */
2486+
"The purchase limits for this merchant have changed. Please contact CTX Support for more information." = "The purchase limits for this merchant have changed. Please contact CTX Support for more information.";
2487+
24972488
/* Usernames */
24982489
"The username '%@' was blocked by the Dash Network. Please try again by requesting another username." = "The username '%@' was blocked by the Dash Network. Please try again by requesting another username.";
24992490

@@ -3013,6 +3004,9 @@
30133004
/* No comment provided by engineer. */
30143005
"You do not have any contacts at the moment" = "Zurzeit hast du keine Kontakte";
30153006

3007+
/* DashSpend */
3008+
"You do not have sufficient funds to complete this transaction" = "You do not have sufficient funds to complete this transaction";
3009+
30163010
/* Coinbase */
30173011
"You don’t have enough balance" = "Du hast nicht genug Guthaben";
30183012

0 commit comments

Comments
 (0)