From 8e8089ddd74199c64ff74dfec9383334504cd855 Mon Sep 17 00:00:00 2001 From: cat Date: Wed, 6 Nov 2024 22:19:16 +0800 Subject: [PATCH] feat: if custom token not found, show toast --- FRW/Modules/Wallet/CustomToken/AddCustomTokenViewModel.swift | 1 + FRW/Resource/en.lproj/Localizable.strings | 1 + 2 files changed, 2 insertions(+) diff --git a/FRW/Modules/Wallet/CustomToken/AddCustomTokenViewModel.swift b/FRW/Modules/Wallet/CustomToken/AddCustomTokenViewModel.swift index 901a43d9..fbe3b953 100644 --- a/FRW/Modules/Wallet/CustomToken/AddCustomTokenViewModel.swift +++ b/FRW/Modules/Wallet/CustomToken/AddCustomTokenViewModel.swift @@ -32,6 +32,7 @@ class AddCustomTokenViewModel: ObservableObject { try await fetchInfo(by: customAddress) HUD.dismissLoading() } catch { + HUD.error(title: "invalid_erc20".localized) log.error("[Add Custom Token] \(error.localizedDescription)") HUD.dismissLoading() } diff --git a/FRW/Resource/en.lproj/Localizable.strings b/FRW/Resource/en.lproj/Localizable.strings index 09c318c3..45cfde00 100644 --- a/FRW/Resource/en.lproj/Localizable.strings +++ b/FRW/Resource/en.lproj/Localizable.strings @@ -1046,3 +1046,4 @@ Please create backups for your wallet to ensure you retain access to your Flow a "Seed Phrase Backup" = "Seed Phrase Backup"; "Add Suggested Token" = "Add Suggested Token"; "like_import_token" = "Would you like to import this token?"; +"invalid_erc20" = "Invalid ERC20 address";