Updated on 2026-08-14
This commit is contained in:
parent
4e1a0d6c1f
commit
00740e4313
9 changed files with 16 additions and 13 deletions
2
.idea/codeStyles/Project.xml
generated
2
.idea/codeStyles/Project.xml
generated
|
|
@ -29,7 +29,6 @@
|
||||||
<codeStyleSettings language="Groovy">
|
<codeStyleSettings language="Groovy">
|
||||||
<option name="LINE_COMMENT_AT_FIRST_COLUMN" value="false" />
|
<option name="LINE_COMMENT_AT_FIRST_COLUMN" value="false" />
|
||||||
<option name="LINE_COMMENT_ADD_SPACE" value="true" />
|
<option name="LINE_COMMENT_ADD_SPACE" value="true" />
|
||||||
<option name="LINE_COMMENT_ADD_SPACE_ON_REFORMAT" value="true" />
|
|
||||||
<option name="KEEP_BLANK_LINES_IN_DECLARATIONS" value="1" />
|
<option name="KEEP_BLANK_LINES_IN_DECLARATIONS" value="1" />
|
||||||
<option name="KEEP_BLANK_LINES_IN_CODE" value="1" />
|
<option name="KEEP_BLANK_LINES_IN_CODE" value="1" />
|
||||||
<option name="KEEP_BLANK_LINES_BEFORE_RBRACE" value="0" />
|
<option name="KEEP_BLANK_LINES_BEFORE_RBRACE" value="0" />
|
||||||
|
|
@ -174,7 +173,6 @@
|
||||||
<option name="RIGHT_MARGIN" value="120" />
|
<option name="RIGHT_MARGIN" value="120" />
|
||||||
<option name="LINE_COMMENT_AT_FIRST_COLUMN" value="false" />
|
<option name="LINE_COMMENT_AT_FIRST_COLUMN" value="false" />
|
||||||
<option name="LINE_COMMENT_ADD_SPACE" value="true" />
|
<option name="LINE_COMMENT_ADD_SPACE" value="true" />
|
||||||
<option name="LINE_COMMENT_ADD_SPACE_ON_REFORMAT" value="true" />
|
|
||||||
<option name="KEEP_BLANK_LINES_IN_DECLARATIONS" value="0" />
|
<option name="KEEP_BLANK_LINES_IN_DECLARATIONS" value="0" />
|
||||||
<option name="KEEP_BLANK_LINES_IN_CODE" value="0" />
|
<option name="KEEP_BLANK_LINES_IN_CODE" value="0" />
|
||||||
<option name="KEEP_BLANK_LINES_BEFORE_RBRACE" value="0" />
|
<option name="KEEP_BLANK_LINES_BEFORE_RBRACE" value="0" />
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,8 @@ sealed class WalletWarning(
|
||||||
val showingPosition: Int,
|
val showingPosition: Int,
|
||||||
) {
|
) {
|
||||||
data class ExistentialDeposit(
|
data class ExistentialDeposit(
|
||||||
val blockchainFullName: String,
|
val currencyName: String,
|
||||||
|
val currencySymbols: String,
|
||||||
val existentialDepositString: String,
|
val existentialDepositString: String,
|
||||||
) : WalletWarning(1)
|
) : WalletWarning(1)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -376,9 +376,13 @@ data class WalletData(
|
||||||
private fun assembleBlockchainWarnings(walletWarnings: MutableList<WalletWarning>) {
|
private fun assembleBlockchainWarnings(walletWarnings: MutableList<WalletWarning>) {
|
||||||
if (!currency.isBlockchain()) return
|
if (!currency.isBlockchain()) return
|
||||||
|
|
||||||
val blockchainFullName = currency.blockchain.fullName
|
|
||||||
if (existentialDepositString != null) {
|
if (existentialDepositString != null) {
|
||||||
walletWarnings.add(WalletWarning.ExistentialDeposit(blockchainFullName, existentialDepositString))
|
val warning = WalletWarning.ExistentialDeposit(
|
||||||
|
currencyName = currency.currencyName,
|
||||||
|
currencySymbols = currency.currencySymbol,
|
||||||
|
existentialDepositString = existentialDepositString,
|
||||||
|
)
|
||||||
|
walletWarnings.add(warning)
|
||||||
}
|
}
|
||||||
if (walletRent != null) {
|
if (walletRent != null) {
|
||||||
walletWarnings.add(WalletWarning.Rent(walletRent))
|
walletWarnings.add(WalletWarning.Rent(walletRent))
|
||||||
|
|
|
||||||
|
|
@ -18,13 +18,13 @@ class WalletWarningConverter(
|
||||||
is WalletWarning.ExistentialDeposit -> {
|
is WalletWarning.ExistentialDeposit -> {
|
||||||
context.getString(
|
context.getString(
|
||||||
R.string.warning_existential_deposit_message,
|
R.string.warning_existential_deposit_message,
|
||||||
message.blockchainFullName, message.existentialDepositString
|
message.currencyName, message.currencySymbols, message.existentialDepositString,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
is WalletWarning.BalanceNotEnoughForFee -> {
|
is WalletWarning.BalanceNotEnoughForFee -> {
|
||||||
context.getString(
|
context.getString(
|
||||||
R.string.token_details_send_blocked_fee_format,
|
R.string.token_details_send_blocked_fee_format,
|
||||||
message.blockchainFullName, message.blockchainFullName
|
message.blockchainFullName, message.blockchainFullName,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
WalletWarning.TransactionInProgress -> {
|
WalletWarning.TransactionInProgress -> {
|
||||||
|
|
@ -33,7 +33,7 @@ class WalletWarningConverter(
|
||||||
is WalletWarning.Rent -> {
|
is WalletWarning.Rent -> {
|
||||||
context.getString(
|
context.getString(
|
||||||
R.string.solana_rent_warning,
|
R.string.solana_rent_warning,
|
||||||
message.walletRent.minRentValue, message.walletRent.rentExemptValue
|
message.walletRent.minRentValue, message.walletRent.rentExemptValue,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -86,5 +86,5 @@
|
||||||
<string name="card_settings_reset_card_to_factory">Reset to Factory Settings</string>
|
<string name="card_settings_reset_card_to_factory">Reset to Factory Settings</string>
|
||||||
<string name="card_settings_reset_card_to_factory_footer">Factory Reset will completely delete the wallet from the selected card. You will not be able to restore the current wallet or use the card to recover the access code.</string>
|
<string name="card_settings_reset_card_to_factory_footer">Factory Reset will completely delete the wallet from the selected card. You will not be able to restore the current wallet or use the card to recover the access code.</string>
|
||||||
<string name="wallet_connect_select_network">Select network</string>
|
<string name="wallet_connect_select_network">Select network</string>
|
||||||
<string name="warning_existential_deposit_message">%s network has a concept of Existential Deposit. If your account drops below %s it will be deactivated and any remaining funds will be destroyed.</string>
|
<string name="warning_existential_deposit_message">%s network has a concept of Existential Deposit. If your account drops below %s %s it will be deactivated and any remaining funds will be destroyed.</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
@ -86,5 +86,5 @@
|
||||||
<string name="card_settings_reset_card_to_factory">Reset to Factory Settings</string>
|
<string name="card_settings_reset_card_to_factory">Reset to Factory Settings</string>
|
||||||
<string name="card_settings_reset_card_to_factory_footer">Factory Reset will completely delete the wallet from the selected card. You will not be able to restore the current wallet or use the card to recover the access code.</string>
|
<string name="card_settings_reset_card_to_factory_footer">Factory Reset will completely delete the wallet from the selected card. You will not be able to restore the current wallet or use the card to recover the access code.</string>
|
||||||
<string name="wallet_connect_select_network">Select network</string>
|
<string name="wallet_connect_select_network">Select network</string>
|
||||||
<string name="warning_existential_deposit_message">%s network has a concept of Existential Deposit. If your account drops below %s it will be deactivated and any remaining funds will be destroyed.</string>
|
<string name="warning_existential_deposit_message">%s network has a concept of Existential Deposit. If your account drops below %s %s it will be deactivated and any remaining funds will be destroyed.</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
@ -86,5 +86,5 @@
|
||||||
<string name="card_settings_reset_card_to_factory">Reset to Factory Settings</string>
|
<string name="card_settings_reset_card_to_factory">Reset to Factory Settings</string>
|
||||||
<string name="card_settings_reset_card_to_factory_footer">Factory Reset will completely delete the wallet from the selected card. You will not be able to restore the current wallet or use the card to recover the access code.</string>
|
<string name="card_settings_reset_card_to_factory_footer">Factory Reset will completely delete the wallet from the selected card. You will not be able to restore the current wallet or use the card to recover the access code.</string>
|
||||||
<string name="wallet_connect_select_network">Select network</string>
|
<string name="wallet_connect_select_network">Select network</string>
|
||||||
<string name="warning_existential_deposit_message">%s network has a concept of Existential Deposit. If your account drops below %s it will be deactivated and any remaining funds will be destroyed.</string>
|
<string name="warning_existential_deposit_message">%s network has a concept of Existential Deposit. If your account drops below %s %s it will be deactivated and any remaining funds will be destroyed.</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
@ -97,5 +97,5 @@
|
||||||
<string name="card_settings_reset_card_to_factory">Сброс к заводским настройкам</string>
|
<string name="card_settings_reset_card_to_factory">Сброс к заводским настройкам</string>
|
||||||
<string name="card_settings_reset_card_to_factory_footer">Сброс к заводским настройкам приведет к полному удалению кошелька с выбранной карты. Вы не сможете восстановить текущий кошелек или использовать эту карту для восстановления кода доступа.</string>
|
<string name="card_settings_reset_card_to_factory_footer">Сброс к заводским настройкам приведет к полному удалению кошелька с выбранной карты. Вы не сможете восстановить текущий кошелек или использовать эту карту для восстановления кода доступа.</string>
|
||||||
<string name="wallet_connect_select_network">Выберите сеть</string>
|
<string name="wallet_connect_select_network">Выберите сеть</string>
|
||||||
<string name="warning_existential_deposit_message">Сеть %s использует концепцию экзистенциального депозита. Если баланс вашего счета опустится ниже %s, он будет деактивирован, а все оставшиеся средства будут уничтожены.</string>
|
<string name="warning_existential_deposit_message">Сеть %s использует концепцию экзистенциального депозита. Если баланс вашего счета опустится ниже %s %s, он будет деактивирован, а все оставшиеся средства будут уничтожены.</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
||||||
|
|
@ -99,5 +99,5 @@
|
||||||
<string name="card_settings_reset_card_to_factory">Reset to Factory Settings</string>
|
<string name="card_settings_reset_card_to_factory">Reset to Factory Settings</string>
|
||||||
<string name="card_settings_reset_card_to_factory_footer">Factory Reset will completely delete the wallet from the selected card. You will not be able to restore the current wallet or use the card to recover the access code.</string>
|
<string name="card_settings_reset_card_to_factory_footer">Factory Reset will completely delete the wallet from the selected card. You will not be able to restore the current wallet or use the card to recover the access code.</string>
|
||||||
<string name="wallet_connect_select_network">Select network</string>
|
<string name="wallet_connect_select_network">Select network</string>
|
||||||
<string name="warning_existential_deposit_message">%s network has a concept of Existential Deposit. If your account drops below %s it will be deactivated and any remaining funds will be destroyed.</string>
|
<string name="warning_existential_deposit_message">%s network has a concept of Existential Deposit. If your account drops below %s %s it will be deactivated and any remaining funds will be destroyed.</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue