Updated on 2026-08-14

This commit is contained in:
Tangem 2025-12-09 14:57:54 +03:00
commit 3fc5bf8fb3
388 changed files with 5078 additions and 2871 deletions

View file

@ -83,12 +83,14 @@ sealed class AnalyticsParam {
data object Onboarding : ScreensSources("Onboarding")
data object LongTap : ScreensSources("Long Tap")
data object Markets : ScreensSources("Markets")
data object HotWallet : ScreensSources("Hot Wallet")
data object TangemPay : ScreensSources("Tangem Pay")
data object WalletSettings : ScreensSources("Wallet Settings")
data object Upgrade : ScreensSources("Upgrade")
data object HardwareWallet : ScreensSources("Hardware Wallet")
data object ImportWallet : ScreensSources("Import Wallet")
data object CreateNewWallet : ScreensSources("Create New Wallet")
data object AddNewWallet : ScreensSources("Add New Wallet")
data object CreateWallet : ScreensSources("Create Wallet")
}
sealed class TxSentFrom(val value: String) {

View file

@ -10,11 +10,11 @@ sealed class Basic(
) : Basic(
event = "Card Was Scanned",
params = mapOf(
AnalyticsParam.SOURCE to source.value,
AnalyticsParam.Key.SOURCE to source.value,
),
)
class SignedIn(
class SignedInLegacy(
currency: AnalyticsParam.WalletType,
batch: String,
signInType: SignInType,
@ -24,8 +24,8 @@ sealed class Basic(
) : Basic(
event = "Signed in",
params = buildMap {
put(AnalyticsParam.CURRENCY, currency.value)
put(AnalyticsParam.BATCH, batch)
put(AnalyticsParam.Key.CURRENCY, currency.value)
put(AnalyticsParam.Key.BATCH, batch)
put("Wallet Type", if (isImported) "Seed Phrase" else "Seedless")
put("Sign in type", signInType.name)
put("Wallets Count", walletsCount)
@ -39,10 +39,37 @@ sealed class Basic(
}
}
class SignedIn(
signInType: SignInType,
walletsCount: Int,
) : Basic(
event = "Signed in",
params = buildMap {
put("Sign in type", signInType.value)
put("Wallets Count", walletsCount.toString())
},
) {
enum class SignInType(val value: String) {
Card("Card"),
Biometric("Biometric"),
NoSecurity("No Security"),
AccessCode("Access Code"),
}
}
class ButtonBuy(
source: AnalyticsParam.ScreensSources,
) : Basic(
event = "Button - Buy",
params = buildMap {
put(AnalyticsParam.Key.SOURCE, source.value)
},
)
class ToppedUp(userWalletId: String, currency: AnalyticsParam.WalletType) :
Basic(
event = "Topped up",
params = mapOf(AnalyticsParam.CURRENCY to currency.value),
params = mapOf(AnalyticsParam.Key.CURRENCY to currency.value),
),
OneTimeAnalyticsEvent {
@ -53,16 +80,16 @@ sealed class Basic(
Basic(
event = "Transaction sent",
params = buildMap {
this[AnalyticsParam.SOURCE] = sentFrom.value
this[AnalyticsParam.Key.SOURCE] = sentFrom.value
if (sentFrom is AnalyticsParam.TxData) {
this[AnalyticsParam.BLOCKCHAIN] = sentFrom.blockchain
this[AnalyticsParam.TOKEN_PARAM] = sentFrom.token
this[AnalyticsParam.Key.BLOCKCHAIN] = sentFrom.blockchain
this[AnalyticsParam.Key.TOKEN_PARAM] = sentFrom.token
sentFrom.feeType?.value?.let {
this[AnalyticsParam.FEE_TYPE] = it
this[AnalyticsParam.Key.FEE_TYPE] = it
}
}
if (sentFrom is AnalyticsParam.TxSentFrom.Approve) {
this[AnalyticsParam.PERMISSION_TYPE] = sentFrom.permissionType
this[AnalyticsParam.Key.PERMISSION_TYPE] = sentFrom.permissionType
}
this["Memo"] = memoType.name
},
@ -79,7 +106,7 @@ sealed class Basic(
class ButtonSupport(source: AnalyticsParam.ScreensSources) : Basic(
event = "Request Support",
params = mapOf(
AnalyticsParam.SOURCE to source.value,
AnalyticsParam.Key.SOURCE to source.value,
),
)
@ -89,7 +116,7 @@ sealed class Basic(
) : Basic(
event = "Biometry Failed",
params = mapOf(
AnalyticsParam.SOURCE to source.value,
AnalyticsParam.Key.SOURCE to source.value,
"Reason" to reason.value,
),
) {

View file

@ -0,0 +1,46 @@
package com.tangem.core.analytics.models.event
import com.tangem.core.analytics.models.AnalyticsEvent
import com.tangem.core.analytics.models.AnalyticsParam
sealed class SignIn(
event: String,
params: Map<String, String> = emptyMap(),
) : AnalyticsEvent("Sign In", event, params) {
data class ScreenOpened(
val walletsCount: Int,
) : SignIn(
event = "Sign In Screen Opened",
params = mapOf(
"Wallets Count" to walletsCount.toString(),
),
)
class ButtonUnlockAllWithBiometric : SignIn(event = "Button - Unlock All With Biometric")
class ButtonWallet(
signInType: SignInType,
) : SignIn(
event = "Button - Wallet",
params = buildMap {
put("Sign in type", signInType.value)
},
) {
enum class SignInType(val value: String) {
Card("Card"),
Biometric("Biometric"),
NoSecurity("No Security"),
AccessCode("Access Code"),
}
}
data class ButtonAddWallet(
val sources: AnalyticsParam.ScreensSources,
) : SignIn(
event = "Button - Add Wallet",
params = mapOf(
AnalyticsParam.SOURCE to sources.value,
),
)
}

View file

@ -23,4 +23,6 @@ interface TrackingContextProxy {
fun addHotWalletContext()
fun removeContext()
fun proceedWithContext(userWallet: UserWallet, action: () -> Unit)
}

View file

@ -2,8 +2,6 @@
<SmellBaseline>
<ManuallySuppressedIssues/>
<CurrentIssues>
<ID>DoubleMutabilityForCollection:DevExcludedBlockchainsManager.kt$DevExcludedBlockchainsManager$private var blockchainTogglesMap: MutableMap&lt;String, Boolean&gt; by Delegates.notNull()</ID>
<ID>DoubleMutabilityForCollection:DevFeatureTogglesManager.kt$DevFeatureTogglesManager$private var featureTogglesMap: MutableMap&lt;String, Boolean&gt; by Delegates.notNull()</ID>
<ID>Indentation:ExcludedBlockchainToggles.kt$ExcludedBlockchainToggles$ </ID>
<ID>Indentation:FeatureToggles.kt$FeatureToggles$ </ID>
</CurrentIssues>

View file

@ -33,7 +33,7 @@
},
{
"name": "HOT_WALLET_ENABLED",
"version": "undefined"
"version": "5.32.0"
},
{
"name": "TANGEM_PAY_ENABLED",

View file

@ -21,6 +21,8 @@ internal class DevExcludedBlockchainsManager(
) : MutableExcludedBlockchainsManager {
private val fileBlockchainToggles: Map<String, Boolean> = getFileBlockchainToggles()
@Suppress("DoubleMutabilityForCollection")
private var blockchainTogglesMap: MutableMap<String, Boolean> by Delegates.notNull()
override val excludedBlockchainsIds: Set<String>

View file

@ -22,6 +22,8 @@ internal class DevFeatureTogglesManager(
) : MutableFeatureTogglesManager {
private val fileFeatureTogglesMap: Map<String, Boolean> = getFileFeatureToggles()
@Suppress("DoubleMutabilityForCollection")
private var featureTogglesMap: MutableMap<String, Boolean> by Delegates.notNull()
init {

View file

@ -22,6 +22,9 @@ enum class ApiEnvironment {
@Json(name = "STAGE")
STAGE,
@Json(name = "STAGE_2")
STAGE_2,
@Json(name = "MOCK")
MOCK,

View file

@ -30,6 +30,7 @@ internal class Express(
createDev2Environment(),
createDev3Environment(),
createStageEnvironment(),
createStage2Environment(),
createMockedEnvironment(),
createProdEnvironment(),
)
@ -73,6 +74,12 @@ internal class Express(
headers = createHeaders(isProd = false),
)
private fun createStage2Environment(): ApiEnvironmentConfig = ApiEnvironmentConfig(
environment = ApiEnvironment.STAGE_2,
baseUrl = "[REDACTED_ENV_URL]",
headers = createHeaders(isProd = false),
)
private fun createMockedEnvironment(): ApiEnvironmentConfig = ApiEnvironmentConfig(
environment = ApiEnvironment.MOCK,
baseUrl = "[REDACTED_ENV_URL]",

View file

@ -1,6 +1,7 @@
package com.tangem.datasource.api.common.config
import com.tangem.datasource.BuildConfig
import com.tangem.domain.staking.model.ethpool.P2PStakingConfig
import com.tangem.lib.auth.P2PEthPoolAuthProvider
import com.tangem.utils.ProviderSuspend
@ -22,12 +23,7 @@ internal class P2PEthPool(
private fun getInitialEnvironment(): ApiEnvironment {
return when (BuildConfig.BUILD_TYPE) {
MOCKED_BUILD_TYPE -> ApiEnvironment.MOCK
DEBUG_BUILD_TYPE,
INTERNAL_BUILD_TYPE,
EXTERNAL_BUILD_TYPE,
RELEASE_BUILD_TYPE,
-> ApiEnvironment.PROD
else -> error("Unknown build type [${BuildConfig.BUILD_TYPE}]")
else -> if (P2PStakingConfig.USE_TESTNET) ApiEnvironment.DEV else ApiEnvironment.PROD
}
}

View file

@ -77,6 +77,7 @@ internal class YieldSupply(
ApiEnvironment.DEV_2,
ApiEnvironment.DEV_3,
ApiEnvironment.STAGE,
ApiEnvironment.STAGE_2,
-> environmentConfigStorage.getConfigSync().yieldModuleApiKeyDev
ApiEnvironment.PROD -> environmentConfigStorage.getConfigSync().yieldModuleApiKey
} ?: error("No tangem tech api config provided")

View file

@ -23,9 +23,7 @@ interface P2PEthPoolApi {
* @param network Ethereum pool network: "mainnet" or "hoodi" (testnet)
*/
@GET("api/v1/staking/pool/{network}/vaults")
suspend fun getVaults(
@Path("network") network: String = "mainnet",
): ApiResponse<P2PEthPoolResponse<P2PEthPoolVaultsResponse>>
suspend fun getVaults(@Path("network") network: String): ApiResponse<P2PEthPoolResponse<P2PEthPoolVaultsResponse>>
/**
* Prepare deposit transaction

View file

@ -50,6 +50,12 @@ interface TangemTechApi {
@Body userTokens: UserTokensResponse,
): ApiResponse<Unit>
@PUT("/v1/wallets/{walletId}/tokens")
suspend fun saveTokens(
@Path(value = "walletId") userId: String,
@Body userTokens: UserTokensResponse,
): ApiResponse<Unit>
/** Returns referral status by [walletId] */
@GET("v1/referral/{walletId}")
suspend fun getReferralStatus(@Path("walletId") walletId: String): ApiResponse<ReferralResponse>
@ -129,6 +135,12 @@ interface TangemTechApi {
@Body body: List<WalletIdBody>,
): ApiResponse<Unit>
@PUT("/v1/user-wallets/applications/{application_id}/wallets")
suspend fun associateApplicationIdWithWalletsV2(
@Path("application_id") applicationId: String,
@Body body: AssociateApplicationIdWithWalletsBody,
): ApiResponse<Unit>
@GET("v1/user-wallets/wallets/{wallet_id}")
suspend fun getWalletById(@Path("wallet_id") walletId: String): ApiResponse<WalletResponse>

View file

@ -0,0 +1,9 @@
package com.tangem.datasource.api.tangemTech.models
import com.squareup.moshi.Json
import com.squareup.moshi.JsonClass
@JsonClass(generateAdapter = true)
data class AssociateAppWithWalletsErrorResponse(
@Json(name = "missingWalletIds") val missingWalletIds: List<String>,
)

View file

@ -0,0 +1,9 @@
package com.tangem.datasource.api.tangemTech.models
import com.squareup.moshi.Json
import com.squareup.moshi.JsonClass
@JsonClass(generateAdapter = true)
data class AssociateApplicationIdWithWalletsBody(
@Json(name = "walletIds") val walletIds: List<String>,
)

View file

@ -19,6 +19,7 @@ data class GetWalletAccountsResponse(
@Json(name = "group") val group: GroupType?,
@Json(name = "sort") val sort: SortType?,
@Json(name = "totalAccounts") val totalAccounts: Int,
@Json(name = "totalArchivedAccounts") val totalArchivedAccounts: Int,
)
}

View file

@ -15,4 +15,7 @@ interface AppCurrencyResponseStore {
/** Get [CurrenciesResponse.Currency] synchronously or null */
suspend fun getSyncOrNull(): CurrenciesResponse.Currency?
/** Store [CurrenciesResponse.Currency] */
suspend fun store(currency: CurrenciesResponse.Currency)
}

View file

@ -5,6 +5,7 @@ import com.tangem.datasource.local.preferences.AppPreferencesStore
import com.tangem.datasource.local.preferences.PreferencesKeys
import com.tangem.datasource.local.preferences.utils.getObject
import com.tangem.datasource.local.preferences.utils.getObjectSyncOrNull
import com.tangem.datasource.local.preferences.utils.storeObject
import kotlinx.coroutines.flow.Flow
/**
@ -25,4 +26,11 @@ internal class DefaultAppCurrencyResponseStore(
PreferencesKeys.SELECTED_APP_CURRENCY_KEY,
)
}
override suspend fun store(currency: CurrenciesResponse.Currency) {
appPreferencesStore.storeObject(
PreferencesKeys.SELECTED_APP_CURRENCY_KEY,
currency,
)
}
}

View file

@ -5,6 +5,7 @@ import androidx.datastore.core.DataStore
import androidx.datastore.core.DataStoreFactory
import androidx.datastore.dataStoreFile
import com.squareup.moshi.Moshi
import com.tangem.datasource.api.ethpool.models.response.P2PEthPoolAccountResponse
import com.tangem.datasource.api.stakekit.models.response.model.YieldBalanceWrapperDTO
import com.tangem.datasource.api.stakekit.models.response.model.YieldDTO
import com.tangem.datasource.local.datastore.RuntimeDataStore
@ -77,6 +78,24 @@ internal object StakingStoreModule {
return DefaultStakingActionsStore(dataStore = RuntimeDataStore())
}
@Provides
@Singleton
fun provideP2PBalancesPersistenceStore(
@NetworkMoshi moshi: Moshi,
@ApplicationContext context: Context,
dispatchers: CoroutineDispatcherProvider,
): DataStore<Map<String, Set<P2PEthPoolAccountResponse>>> {
return DataStoreFactory.create(
serializer = MoshiDataStoreSerializer(
moshi = moshi,
types = mapWithStringKeyTypes(valueTypes = setTypes<P2PEthPoolAccountResponse>()),
defaultValue = emptyMap(),
),
produceFile = { context.dataStoreFile(fileName = "p2p_balances") },
scope = CoroutineScope(context = dispatchers.io + SupervisorJob()),
)
}
@Provides
@Singleton
fun provideP2PEthPoolVaultsStore(

View file

@ -4,28 +4,32 @@ import com.tangem.datasource.api.stakekit.models.response.model.BalanceDTO
import com.tangem.datasource.api.stakekit.models.response.model.YieldBalanceWrapperDTO
import com.tangem.domain.models.StatusSource
import com.tangem.domain.models.staking.BalanceItem
import com.tangem.domain.models.staking.StakingBalance
import com.tangem.domain.models.staking.StakingID
import com.tangem.domain.models.staking.YieldBalance
import com.tangem.domain.models.staking.YieldBalanceItem
import com.tangem.utils.converter.Converter
import kotlinx.datetime.Instant
class YieldBalanceConverter(
/**
* Converts StakeKit DTO to [StakingBalance].
* Returns [StakingBalance.Data.StakeKit] for non-empty balances, [StakingBalance.Empty] otherwise.
*/
class StakingBalanceConverter(
private val source: StatusSource,
) : Converter<YieldBalanceWrapperDTO, YieldBalance?> {
) : Converter<YieldBalanceWrapperDTO, StakingBalance?> {
constructor(isCached: Boolean) : this(source = if (isCached) StatusSource.CACHE else StatusSource.ACTUAL)
override fun convert(value: YieldBalanceWrapperDTO): YieldBalance? {
override fun convert(value: YieldBalanceWrapperDTO): StakingBalance? {
val stakingId = StakingID(
integrationId = value.integrationId ?: return null,
address = value.addresses.address,
)
return if (value.balances.isEmpty()) {
YieldBalance.Empty(stakingId = stakingId, source = source)
StakingBalance.Empty(stakingId = stakingId, source = source)
} else {
YieldBalance.Data(
StakingBalance.Data.StakeKit(
stakingId = stakingId,
balance = YieldBalanceItem(
items = value.balances

View file

@ -12,6 +12,7 @@ import com.tangem.datasource.api.common.config.ApiConfig.Companion.MOCKED_BUILD_
import com.tangem.datasource.api.common.config.ApiConfig.Companion.RELEASE_BUILD_TYPE
import com.tangem.datasource.api.common.config.managers.MockEnvironmentConfigStorage.Companion.BLOCK_AID_API_KEY
import com.tangem.datasource.api.common.config.managers.MockEnvironmentConfigStorage.Companion.TANGEM_API_KEY
import com.tangem.domain.staking.model.ethpool.P2PStakingConfig
import com.tangem.lib.auth.ExpressAuthProvider
import com.tangem.lib.auth.P2PEthPoolAuthProvider
import com.tangem.lib.auth.StakeKitAuthProvider
@ -299,11 +300,17 @@ internal class ProdApiConfigsManagerTest {
}
private fun createP2PModel(): TestModel {
val (environment, baseUrl) = if (P2PStakingConfig.USE_TESTNET) {
ApiEnvironment.DEV to "https://api-test.p2p.org/"
} else {
ApiEnvironment.PROD to "https://api.p2p.org/"
}
return TestModel(
id = ApiConfig.ID.P2PEthPool,
expected = ApiEnvironmentConfig(
environment = ApiEnvironment.PROD,
baseUrl = "https://api.p2p.org/",
environment = environment,
baseUrl = baseUrl,
headers = mapOf(
"Authorization" to ProviderSuspend { "Bearer $P2P_API_KEY" },
"accept" to ProviderSuspend { "application/json" },

View file

@ -3,6 +3,10 @@
<string name="access_code_alert_skip_description">アクセスコードがないとウォレットは安全ではありません。</string>
<string name="access_code_alert_skip_ok">とにかくスキップ</string>
<string name="access_code_alert_skip_title">アクセスコードが設定されていません</string>
<string name="access_code_alert_validation_cancel">コードを変更</string>
<string name="access_code_alert_validation_description">アクセスコードは、ウォレットのロック解除・資産へのアクセス保護に使用されます</string>
<string name="access_code_alert_validation_ok">このまま使用</string>
<string name="access_code_alert_validation_title">このアクセスコードは簡単に推測される可能性があります</string>
<string name="access_code_check_title">アクセスコードを入力</string>
<string name="access_code_check_warining_delete">アクセスコードが間違っています。あと%s回間違えると、モバイルウォレットが削除されます。</string>
<string name="access_code_check_warining_lock">アクセスコードが間違っています。あと%s回失敗すると、アプリはロックされます。</string>
@ -773,6 +777,10 @@
<string name="markets_token_details_volume">取引量</string>
<string name="markets_tooltip_message">これをドラッグするか、検索窓をタップして、マーケットから直接トークンを追加します</string>
<string name="markets_tooltip_title">トークンを追加</string>
<string name="markets_yield_supply_banner_description">資産を即時アクセス可能な状態に保ったまま、パワーアップさせよう。%s</string>
<string name="markets_yield_supply_banner_title">利息モードを有効にする</string>
<string name="mobile_wallet_requires_min_os_warning_body">モバイルウォレットを作成するには、%1$sにアップデートする必要があります</string>
<string name="mobile_wallet_requires_min_os_warning_title">モバイルウォレットを使用するには、%1$s以降が必要です</string>
<string name="news_all_news">すべてのニュース</string>
<string name="news_stay_in_the_loop">最新情報を入手</string>
<string name="nfc_error_unavailable">お使いのデバイスではNFCが使用できません</string>
@ -1897,6 +1905,7 @@
<string name="yield_module_fee_policy_tangem_service_fee_title">Tangemは、生成された利息に対して15%サービス手数料も徴収します。</string>
<string name="yield_module_high_fee_error">ネットワーク手数料が下がるか、残高が最低必要額に達すると、資金は自動的にAaveに供給されます。</string>
<string name="yield_module_historical_returns">過去のリターン</string>
<string name="yield_module_main_screen_promo_banner_message">保有資産に年利%1$s%%を適用</string>
<string name="yield_module_main_view_approve_notification_description">利息モードでのトークンの承認が取り消されました。トークンを開いて再度許可してください。</string>
<string name="yield_module_main_view_approve_notification_title">トークンの承認が必要です</string>
<string name="yield_module_network_fee_unreachable_notification_description">ネットワーク接続を確認してください</string>
@ -1911,7 +1920,9 @@
<string name="yield_module_promo_screen_self_custodial_title">分散型・自己管理型</string>
<string name="yield_module_promo_screen_terms_disclaimer">このサービスを利用することにより、プロバイダー\n%1$sおよび%2$sに同意するものとします。</string>
<string name="yield_module_promo_screen_title">Aaveに接続</string>
<string name="yield_module_promo_screen_title_v2">残高に %1$s%% の年利APYを適用</string>
<string name="yield_module_promo_screen_variable_rate_info">Aave %1$s%% • 変動金利</string>
<string name="yield_module_promo_screen_variable_rate_info_v2">変動金利</string>
<string name="yield_module_provider">Aave</string>
<string name="yield_module_rate_info_sheet_chart_average">平均%s</string>
<string name="yield_module_rate_info_sheet_chart_title">昨年のリターン</string>
@ -1938,12 +1949,16 @@
<string name="yield_module_token_details_earn_notification_earning_on_your_balance_title">利息モード</string>
<string name="yield_module_token_details_earn_notification_processing">利息モードの有効化</string>
<string name="yield_module_token_details_earn_notification_title">利息モード</string>
<string name="yield_module_transaction_enter">利息モードが有効になりました</string>
<string name="yield_module_transaction_deploy_contract">利息モードコントラクトのデプロイ</string>
<string name="yield_module_transaction_enter">利息モードを有効にする</string>
<string name="yield_module_transaction_enter_subtitle">%1$sがAaveに供給されました</string>
<string name="yield_module_transaction_exit">利息モードが無効になりました</string>
<string name="yield_module_transaction_exit">利息モードを無効にする</string>
<string name="yield_module_transaction_exit_subtitle">%1$sがAaveから引き出されました</string>
<string name="yield_module_transaction_initialize">利息モードをセットアップ</string>
<string name="yield_module_transaction_reactivate">利息モードの再有効化</string>
<string name="yield_module_transaction_topup">Aaveへの供給</string>
<string name="yield_module_transaction_topup_subtitle">%1$sがAaveに供給されました</string>
<string name="yield_module_transaction_withdraw">Aaveから引き出す</string>
<string name="yield_module_transfer_mode_automatic">自動</string>
<string name="yield_module_unable_to_cover_fee_description">取引のネットワーク手数料をカバーするために、 %1$s %2$sを追加してください。</string>
<string name="yield_module_unable_to_cover_fee_title">%s手数料を支払えません</string>

View file

@ -274,7 +274,7 @@
<string name="common_from">Из</string>
<string name="common_from_wallet_name">Из %s</string>
<string name="common_generate_addresses">Синхронизировать адреса</string>
<string name="common_get_started">Начать зарабатывать</string>
<string name="common_get_started">Начать</string>
<string name="common_get_token">Получить токен</string>
<string name="common_go_to_provider">К провайдеру</string>
<string name="common_go_to_token">Перейти в токен</string>
@ -1075,7 +1075,7 @@
<string name="save_user_wallet_agreement_notice">Обратите внимание, что для совершения транзакции с вашими средствами по-прежнему потребуется ваша карта или кольцо</string>
<string name="scan_card_settings_button">Сканировать</string>
<string name="scan_card_settings_message">Отсканируйте карту или кольцо, чтобы изменить ее настройки. Изменения затронут только ту карту или кольцо, которые вы отсканировали, и не повлияют на другие устройства, привязанные к вашему кошельку.</string>
<string name="scan_card_settings_title">Приготовьте свой Tangem!</string>
<string name="scan_card_settings_title">Приготовьте устройство Tangem!</string>
<string name="security_alert_title">Уведомление безопасности</string>
<string name="seed_warning_no">Нет</string>
<string name="seed_warning_yes">Да</string>
@ -1854,9 +1854,9 @@
<string name="yield_module_token_details_earn_notification_earning_on_your_balance_title">Режим доходности</string>
<string name="yield_module_token_details_earn_notification_processing">Включение режима доходности</string>
<string name="yield_module_token_details_earn_notification_title">Режим доходности</string>
<string name="yield_module_transaction_enter">Режим доходности включен</string>
<string name="yield_module_transaction_enter">Включение режима доходности</string>
<string name="yield_module_transaction_enter_subtitle">%1$s отправлено в Aave</string>
<string name="yield_module_transaction_exit">Режим доходности выключен</string>
<string name="yield_module_transaction_exit">Отключение режима доходности</string>
<string name="yield_module_transaction_exit_subtitle">%1$s выведено из Aave</string>
<string name="yield_module_transaction_topup">Перевод средств в Aave</string>
<string name="yield_module_transaction_topup_subtitle">%1$s отправлено в Aave</string>

View file

@ -3,6 +3,10 @@
<string name="access_code_alert_skip_description">Without an access code, your wallet is not secure.</string>
<string name="access_code_alert_skip_ok">Skip anyway</string>
<string name="access_code_alert_skip_title">Access code not set</string>
<string name="access_code_alert_validation_cancel">Change code</string>
<string name="access_code_alert_validation_description">Your access code will be used to unlock your wallet and to protect access to the assets</string>
<string name="access_code_alert_validation_ok">Use anyway</string>
<string name="access_code_alert_validation_title">This access code can be easily guessed</string>
<string name="access_code_check_title">Enter access code</string>
<string name="access_code_check_warining_delete">Wrong access code. Your mobile wallet will be deleted after %s more incorrect attempts.</string>
<string name="access_code_check_warining_lock">Wrong access code. The app will be locked after %s more failed attempts</string>
@ -788,6 +792,10 @@
<string name="markets_token_details_volume">Volume</string>
<string name="markets_tooltip_message">Pull this up or tap the search bar to add tokens directly from the market</string>
<string name="markets_tooltip_title">Add tokens</string>
<string name="markets_yield_supply_banner_description">Power up your assets while supplying them with instant access. %s</string>
<string name="markets_yield_supply_banner_title">Activate Yield Mode</string>
<string name="mobile_wallet_requires_min_os_warning_body">You must update to %1$s in order to create mobile wallet</string>
<string name="mobile_wallet_requires_min_os_warning_title">Mobile Wallet requires %1$s or later</string>
<string name="news_all_news">All news</string>
<string name="news_stay_in_the_loop">Stay in the loop</string>
<string name="nfc_error_unavailable">NFC is not available on your device</string>
@ -1973,6 +1981,7 @@
<string name="yield_module_fee_policy_tangem_service_fee_title">Tangem also takes a 15% service fee on yield generated.</string>
<string name="yield_module_high_fee_error">Your funds will be automatically supplied to Aave once network fees are lower or your balance meets the minimum required amount.</string>
<string name="yield_module_historical_returns">Historical returns</string>
<string name="yield_module_main_screen_promo_banner_message">"Enable %1$s%% APY on your balance"</string>
<string name="yield_module_main_view_approve_notification_description">Approval for your token in Yield Mode has been revoked. Open the token to grant permission again.</string>
<string name="yield_module_main_view_approve_notification_title">Token approval needed</string>
<string name="yield_module_network_fee_unreachable_notification_description">Check your network connection</string>
@ -2016,12 +2025,16 @@
<string name="yield_module_token_details_earn_notification_earning_on_your_balance_title">Yield Mode</string>
<string name="yield_module_token_details_earn_notification_processing">Enabling Yield Mode</string>
<string name="yield_module_token_details_earn_notification_title">Yield Mode</string>
<string name="yield_module_transaction_enter">Yield Mode enabled</string>
<string name="yield_module_transaction_deploy_contract">Yield Mode contract deploy</string>
<string name="yield_module_transaction_enter">Yield Mode enable</string>
<string name="yield_module_transaction_enter_subtitle">%1$s supplied to Aave</string>
<string name="yield_module_transaction_exit">Yield Mode disabled</string>
<string name="yield_module_transaction_exit">Yield Mode disable</string>
<string name="yield_module_transaction_exit_subtitle">%1$s withdrawn from Aave</string>
<string name="yield_module_transaction_initialize">Yield Mode initialize</string>
<string name="yield_module_transaction_reactivate">Yield Mode reactivate</string>
<string name="yield_module_transaction_topup">Supply to Aave</string>
<string name="yield_module_transaction_topup_subtitle">%1$s supplied to Aave</string>
<string name="yield_module_transaction_withdraw">Withdraw from Aave</string>
<string name="yield_module_transfer_mode_automatic">Automatic</string>
<string name="yield_module_unable_to_cover_fee_description">Add some %1$s %2$s to cover the network fee for transactions.</string>
<string name="yield_module_unable_to_cover_fee_title">Unable to cover %s fee</string>

View file

@ -39,6 +39,30 @@ object Dialogs {
)
}
/**
* Hot wallet creation not supported dialog
*
* @param leastSupportedVersion least supported OS version name ex. "Android 10"
* @param onDismiss lambda be invoked when dialog is dismissed
*/
fun hotWalletCreationNotSupportedDialog(leastSupportedVersion: String, onDismiss: () -> Unit = {}): DialogMessage {
return DialogMessage(
title = resourceReference(
id = R.string.mobile_wallet_requires_min_os_warning_title,
formatArgs = wrappedList(leastSupportedVersion),
),
message = resourceReference(
id = R.string.mobile_wallet_requires_min_os_warning_body,
formatArgs = wrappedList(leastSupportedVersion),
),
firstAction = EventMessageAction(
title = resourceReference(R.string.common_got_it),
onClick = {},
),
onDismissRequest = onDismiss,
)
}
/**
* Universal error dialog
*/