When importing ticket with universal link and there's no connectivity, show no connectivity error message instead of invalid link

pull/705/head
Hwee-Boon Yar 6 years ago
parent 4d781bcfb5
commit 9fd5afa85b
  1. 1
      AlphaWallet/Localization/en.lproj/Localizable.strings
  2. 1
      AlphaWallet/Localization/es.lproj/Localizable.strings
  3. 1
      AlphaWallet/Localization/zh-Hans.lproj/Localizable.strings
  4. 4
      AlphaWallet/Market/Coordinators/UniversalLinkCoordinator.swift

@ -254,6 +254,7 @@
"a.claim.token.success.title" = "Your ticket has been transferred and the balance will be updated shortly";
"a.claim.token.failed.title" = "Invalid ticket link";
"a.claim.token.invalidLink.tryAgain" = "Invalid Link, please try again";
"a.claim.token.noConnectivity.tryAgain" = "Not connected to the internet, please try again";
"a.claim.token.failed.notEnoughEth.title" = "You do not have enough ETH to import this ticket";
"a.claim.token.validating.title" = "Processing...";
"a.claim.token.promptImport.title" = "Import?";

@ -254,6 +254,7 @@
"a.claim.token.success.title" = "Your ticket has been transferred and the balance will be updated shortly";
"a.claim.token.failed.title" = "Invalid ticket link";
"a.claim.token.invalidLink.tryAgain" = "Invalid Link, please try again";
"a.claim.token.noConnectivity.tryAgain" = "Not connected to the internet, please try again";
"a.claim.token.failed.notEnoughEth.title" = "You do not have enough ETH to import this ticket";
"a.claim.token.validating.title" = "Processing...";
"a.claim.token.promptImport.title" = "Import?";

@ -254,6 +254,7 @@
"a.claim.token.success.title" = "你的门票已经被转让,你的剩余门票数量稍后会被更新";
"a.claim.token.failed.title" = "无效的MagicLink链接";
"a.claim.token.invalidLink.tryAgain" = "链接无效,请重试";
"a.claim.token.noConnectivity.tryAgain" = "Not connected to the internet, please try again";
"a.claim.token.failed.notEnoughEth.title" = "你没有足够的以太币来购买MagicLink内的门票";
"a.claim.token.validating.title" = "处理中...";
"a.claim.token.promptImport.title" = "导入?";

@ -141,7 +141,11 @@ class UniversalLinkCoordinator: Coordinator {
getERC875TokenBalanceCoordinator?.getERC875TokenBalance(for: recoverAddress, contract: contractAsAddress) { [weak self] result in
guard let strongSelf = self else { return }
guard let balance = try? result.dematerialize() else {
if let reachabilityManager = NetworkReachabilityManager(), !reachabilityManager.isReachable {
strongSelf.showImportError(errorMessage: R.string.localizable.aClaimTokenNoConnectivityTryAgain())
} else {
strongSelf.showImportError(errorMessage: R.string.localizable.aClaimTokenInvalidLinkTryAgain())
}
return
}
//filter null tokens

Loading…
Cancel
Save