Updated on 2026-08-14

This commit is contained in:
Tangem 2022-08-16 21:37:00 +04:00
parent 9720a85ab4
commit 8e4adf2c0c

View file

@ -22,9 +22,8 @@ import timber.log.Timber
*/
suspend fun WalletManager.safeUpdate(): Result<Wallet> = try {
val scanResponse = store.state.globalState.scanResponse
?: error("Scan response must not be null")
if (scanResponse.isDemoCard() || TestActions.testAmountInjectionForWalletManagerEnabled) {
if (scanResponse?.isDemoCard() == true || TestActions.testAmountInjectionForWalletManagerEnabled) {
delay(500)
TestActions.testAmountInjectionForWalletManagerEnabled = false
Result.Success(wallet)