Updated on 2026-08-14

This commit is contained in:
Tangem 2020-03-17 15:59:21 +03:00
parent bc6eaf5dd5
commit e78270ada3

View file

@ -472,10 +472,14 @@ class VerifyCardFragment : BaseFragment(), NavigationResultListener, NfcAdapter.
private fun doPurge() {
requestPIN2Count = 0
val engine = CoinEngineFactory.create(ctx)
if (!engine!!.hasBalanceInfo()) {
val engine = CoinEngineFactory.create(ctx) ?: return
if (!engine.hasBalanceInfo()) {
return
} else if (engine.isBalanceNotZero) {
}
if (engine.isBalanceNotZero) {
Toast.makeText(context, R.string.general_error_cannot_erase_wallet_with_non_zero_balance, Toast.LENGTH_LONG).show()
return
} else if (engine.awaitingConfirmation()) {
Toast.makeText(context, R.string.general_error_cannot_erase_wallet_with_non_zero_balance, Toast.LENGTH_LONG).show()
return
}