Updated on 2026-08-14

This commit is contained in:
Tangem 2022-11-30 11:29:27 +03:00
parent 06afe233fb
commit 9eab9e1a6e
25 changed files with 43 additions and 45 deletions

View file

@ -12,9 +12,11 @@ import com.tangem.wallet.R
class ApproveWcSessionDialog {
companion object {
fun create(session: WalletConnectSession, networks: List<Blockchain>, context: Context): AlertDialog {
val sessionBlockchain = requireNotNull(session.wallet.blockchain) { "session network is null" }
val message = context.getString(
R.string.wallet_connect_request_session_start,
session.peerMeta.name,
sessionBlockchain.fullName,
session.peerMeta.url,
)
return AlertDialog.Builder(context).apply {
@ -22,7 +24,7 @@ class ApproveWcSessionDialog {
setMessage(message)
setPositiveButton(context.getText(R.string.common_start)) { _, _ ->
store.dispatch(GlobalAction.HideDialog)
store.dispatch(WalletConnectAction.ChooseNetwork(session.wallet.blockchain!!))
store.dispatch(WalletConnectAction.ChooseNetwork(sessionBlockchain))
}
if (networks.size > 1) {
setNeutralButton(context.getText(R.string.wallet_connect_select_network)) { _, _ ->

View file

@ -18,7 +18,7 @@ class RequestFeeErrorDialog {
val errorMessage = dialog.error.customMessage
return AlertDialog.Builder(context).apply {
setTitle(R.string.send_error_fee_request_failed)
setTitle(R.string.common_fee_error)
setMessage(context.getString(R.string.alert_failed_to_send_transaction_message, errorMessage))
setNegativeButton(R.string.alert_button_send_feedback) { _, _ ->
store.dispatch(GlobalAction.SendEmail(SendTransactionFailedEmail(errorMessage)))

View file

@ -128,7 +128,7 @@ class BalanceWidget(
tvErrorTitle.text = fragment.getText(R.string.wallet_error_no_account)
tvErrorDescriptions.text =
fragment.getString(
R.string.wallet_error_no_account_subtitle_format,
R.string.no_account_generic,
data.amountToCreateAccount, data.currencySymbol
)
}

View file

@ -340,7 +340,7 @@ class WalletDetailsFragment : Fragment(R.layout.fragment_wallet_details),
lBalanceError.tvErrorTitle.text = getText(R.string.wallet_error_no_account)
lBalanceError.tvErrorDescriptions.text =
getString(
R.string.wallet_error_no_account_subtitle_format,
R.string.no_account_generic,
data.amountToCreateAccount, data.currencySymbol,
)
}

View file

@ -14,7 +14,7 @@ class SignedHashesWarningDialog {
return AlertDialog.Builder(context).apply {
setTitle(context.getString(R.string.warning_important_security_info))
setMessage(R.string.alert_signed_hashes_message)
setPositiveButton(R.string.alert_button_i_understand) { _, _ ->
setPositiveButton(R.string.common_understand) { _, _ ->
store.dispatch(WalletAction.Warnings.CheckHashesCount.SaveCardId)
store.dispatch(
GlobalAction.HideWarningMessage(