Skip to content

Commit ec6e041

Browse files
committed
Merge branch 'dev' of github.com:tonkeeper/android_private into dev
2 parents 94e9727 + adb66bf commit ec6e041

17 files changed

Lines changed: 320 additions & 184 deletions

File tree

apps/wallet/api/src/main/java/com/tonapps/wallet/api/entity/ConfigEntity.kt

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ data class ConfigEntity(
1616
val supportLink: String,
1717
val nftExplorer: String,
1818
val transactionExplorer: String,
19+
val accountExplorer: String,
1920
val mercuryoSecret: String,
2021
val tonapiMainnetHost: String,
2122
val tonapiTestnetHost: String,
@@ -38,6 +39,7 @@ data class ConfigEntity(
3839
val batteryBeta: Boolean,
3940
val batterySendDisabled: Boolean,
4041
val disableBatteryIapModule: Boolean,
42+
val disableBatteryCryptoRechargeModule: Boolean,
4143
val batteryMaxInputAmount: String,
4244
val batteryRefundEndpoint: String,
4345
val batteryPromoDisable: Boolean,
@@ -59,6 +61,8 @@ data class ConfigEntity(
5961
val tronSwapUrl: String,
6062
val tronSwapTitle: String,
6163
val tronApiKey: String? = null,
64+
val privacyPolicyUrl: String,
65+
val termsOfUseUrl: String
6266
): Parcelable {
6367

6468
@IgnoredOnParcel
@@ -82,6 +86,7 @@ data class ConfigEntity(
8286
supportLink = json.getString("supportLink"),
8387
nftExplorer = json.getString("NFTOnExplorerUrl"),
8488
transactionExplorer = json.getString("transactionExplorer"),
89+
accountExplorer = json.getString("accountExplorer"),
8590
mercuryoSecret = json.getString("mercuryoSecret"),
8691
tonapiMainnetHost = json.getString("tonapiMainnetHost"),
8792
tonapiTestnetHost = json.getString("tonapiTestnetHost"),
@@ -108,6 +113,7 @@ data class ConfigEntity(
108113
batteryBeta = json.optBoolean("battery_beta", true),
109114
batterySendDisabled = json.optBoolean("disable_battery_send", false),
110115
disableBatteryIapModule = json.optBoolean("disable_battery_iap_module", false),
116+
disableBatteryCryptoRechargeModule = json.optBoolean("disable_battery_crypto_recharge_module", false),
111117
batteryMaxInputAmount = json.optString("batteryMaxInputAmount", "3"),
112118
batteryRefundEndpoint = json.optString("batteryRefundEndpoint", "https://battery-refund-app.vercel.app"),
113119
batteryPromoDisable = json.optBoolean("disable_battery_promo_module", true),
@@ -134,14 +140,17 @@ data class ConfigEntity(
134140
tonkeeperApiUrl = json.optString("tonkeeper_api_url", "https://api.tonkeeper.com"),
135141
tronSwapUrl = json.optString("tron_swap_url", "https://widget.letsexchange.io/en?affiliate_id=ffzymmunvvyxyypo&coin_from=ton&coin_to=USDT-TRC20&is_iframe=true"),
136142
tronSwapTitle = json.optString("tron_swap_title", "LetsExchange"),
137-
tronApiKey = json.optString("tron_api_key")
143+
tronApiKey = json.optString("tron_api_key"),
144+
privacyPolicyUrl = json.getString("privacy_policy"),
145+
termsOfUseUrl = json.getString("terms_of_use"),
138146
)
139147

140148
constructor() : this(
141149
empty = true,
142150
supportLink = "mailto:support@tonkeeper.com",
143151
nftExplorer = "https://tonviewer.com/nft/%s",
144152
transactionExplorer = "https://tonviewer.com/transaction/%s",
153+
accountExplorer = "https://tonviewer.com/%s",
145154
mercuryoSecret = "",
146155
tonapiMainnetHost = "https://keeper.tonapi.io",
147156
tonapiTestnetHost = "https://testnet.tonapi.io",
@@ -164,6 +173,7 @@ data class ConfigEntity(
164173
batteryBeta = true,
165174
batterySendDisabled = false,
166175
disableBatteryIapModule = false,
176+
disableBatteryCryptoRechargeModule = false,
167177
batteryMaxInputAmount = "3",
168178
batteryRefundEndpoint = "https://battery-refund-app.vercel.app",
169179
batteryPromoDisable = true,
@@ -183,7 +193,9 @@ data class ConfigEntity(
183193
region = "US",
184194
tonkeeperApiUrl = "https://api.tonkeeper.com",
185195
tronSwapUrl = "https://widget.letsexchange.io/en?affiliate_id=ffzymmunvvyxyypo&coin_from=ton&coin_to=USDT-TRC20&is_iframe=true",
186-
tronSwapTitle = "LetsExchange"
196+
tronSwapTitle = "LetsExchange",
197+
privacyPolicyUrl = "https://tonkeeper.com/privacy",
198+
termsOfUseUrl = "https://tonkeeper.com/terms"
187199
)
188200

189201
fun formatTransactionExplorer(testnet: Boolean, tron: Boolean, hash: String): String {

apps/wallet/api/src/main/java/com/tonapps/wallet/api/entity/FlagsEntity.kt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ data class FlagsEntity(
99
val disableSwap: Boolean,
1010
val disableExchangeMethods: Boolean,
1111
val disableDApps: Boolean,
12-
val disableBlur: Boolean,
13-
val disableLegacyBlur: Boolean,
1412
val disableSigner: Boolean,
1513
val safeModeEnabled: Boolean,
1614
val disableStaking: Boolean,
@@ -27,8 +25,6 @@ data class FlagsEntity(
2725
disableSwap = json.optBoolean("disable_swap", false),
2826
disableExchangeMethods = json.optBoolean("disable_exchange_methods", false),
2927
disableDApps = json.optBoolean("disable_dapps", false),
30-
disableBlur = json.optBoolean("disable_blur", false),
31-
disableLegacyBlur = json.optBoolean("disable_legacy_blur", false),
3228
disableSigner = json.optBoolean("disable_signer", false),
3329
safeModeEnabled = json.optBoolean("safe_mode_enabled", false),
3430
disableStaking = json.optBoolean("disable_staking", false),
@@ -45,8 +41,6 @@ data class FlagsEntity(
4541
disableSwap = false,
4642
disableExchangeMethods = false,
4743
disableDApps = false,
48-
disableBlur = false,
49-
disableLegacyBlur = false,
5044
disableSigner = false,
5145
safeModeEnabled = false,
5246
disableStaking = false,

apps/wallet/instance/app/src/main/java/com/tonapps/tonkeeper/core/ExternalUrl.kt

Lines changed: 0 additions & 12 deletions
This file was deleted.

apps/wallet/instance/app/src/main/java/com/tonapps/tonkeeper/helper/ExternalLinkHelper.kt

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,12 @@ package com.tonapps.tonkeeper.helper
22

33
object ExternalLinkHelper {
44

5-
private fun getTonViewerPrefix(testnet: Boolean): String {
6-
return if (testnet) "https://testnet.tonviewer.com/" else "https://tonviewer.com/"
7-
}
8-
95
private fun getTronscanPrefix(testnet: Boolean): String {
106
return if (testnet) "https://test.tronscan.org/" else "https://tronscan.org/"
117
}
128

13-
fun tonToken(walletAddress: String, tokenAddress: String, testnet: Boolean): String {
14-
val prefix = getTonViewerPrefix(testnet)
15-
if (tokenAddress.equals("ton", true)) {
16-
return "$prefix$walletAddress"
17-
}
18-
return "$prefix$walletAddress/jetton/$tokenAddress"
19-
}
20-
219
fun tronToken(walletAddress: String, testnet: Boolean): String {
2210
val prefix = getTronscanPrefix(testnet)
2311
return "$prefix#/address/$walletAddress"
2412
}
25-
26-
/*
27-
val detailsUrl = if (token.isTon) {
28-
"https://tonviewer.com/${screenContext.wallet.address}".toUri()
29-
} else if (token.isTrc20) {
30-
"https://tronscan.org/#/address/${viewModel.tronAddress}".toUri()
31-
} else {
32-
"https://tonviewer.com/${screenContext.wallet.address}/jetton/${token.address}".toUri()
33-
}
34-
*/
3513
}

apps/wallet/instance/app/src/main/java/com/tonapps/tonkeeper/ui/screen/battery/refill/BatteryRefillViewModel.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ class BatteryRefillViewModel(
6767
private val isBatteryDisabled: Boolean
6868
get() = api.config.flags.disableBattery
6969

70+
private val isCryptoDisabled: Boolean
71+
get() = api.config.disableBatteryCryptoRechargeModule
72+
7073
private val _promoFlow = MutableStateFlow<String?>(null)
7174
private val promoFlow = _promoFlow.asStateFlow()
7275

@@ -129,7 +132,7 @@ class BatteryRefillViewModel(
129132

130133
val rechargeMethodsItems = uiItemsRechargeMethods(wallet)
131134

132-
if (!isBatteryDisabled && rechargeMethodsItems.isNotEmpty()) {
135+
if (!isBatteryDisabled && !isCryptoDisabled && rechargeMethodsItems.isNotEmpty()) {
133136
uiItems.addAll(uiItemsRechargeMethods(wallet))
134137
uiItems.add(Item.Space)
135138
}

apps/wallet/instance/app/src/main/java/com/tonapps/tonkeeper/ui/screen/events/compose/history/TxEventsViewModel.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ class TxEventsViewModel(
105105
eventsRepository.hiddenTxIdsFlow,
106106
) { paging, filterId, decryptedComment, hiddenTxIds ->
107107
paging.filter { item ->
108-
!hiddenTxIds.contains(item.id) && (filterId == TxFilter.All.id || item.isMatch(filterId)) && !item.progress
108+
!hiddenTxIds.contains(item.id) && (filterId == TxFilter.All.id || item.isMatch(filterId))
109109
}.map { item ->
110110
val decrypted = decryptedComment[item.id]
111111
if (decrypted.isNullOrEmpty()) {

0 commit comments

Comments
 (0)