This commit is contained in:
delivan 2022-12-21 01:39:50 +09:00
commit 806f756034
2 changed files with 24 additions and 0 deletions

View File

@ -23,3 +23,11 @@ export const VERIFICATION_THRESHOLD_MESSAGE =
export const INVALID_REFERRAL_ERROR = "Invalid referral:"; export const INVALID_REFERRAL_ERROR = "Invalid referral:";
export const INVALID_REFERRAL_MESSAGE = export const INVALID_REFERRAL_MESSAGE =
"Make sure that the referrer ICNS name has been registered."; "Make sure that the referrer ICNS name has been registered.";
export const TOO_MANY_CHAINS_IN_LEDGER_ERROR = "Output buffer too small";
export const TOO_MANY_CHAINS_IN_LEDGER_MESSAGE =
"Maximum 20 chains can be linked at a time on Ledger hardware wallet. Unselect some chains and try again.";
export const EVM_CHAIN_IN_LEDGER_ERROR = "Ledger is unsupported for this chain";
export const EVM_CHAIN_IN_LEDGER_MESSAGE =
"Ledger is unsupported for this chain. Remove EVM-based Cosmos SDK chains and try again.";

View File

@ -54,11 +54,15 @@ import {
import { import {
ACCOUNT_NOT_EXIST_ERROR, ACCOUNT_NOT_EXIST_ERROR,
ACCOUNT_NOT_EXIST_MESSAGE, ACCOUNT_NOT_EXIST_MESSAGE,
EVM_CHAIN_IN_LEDGER_ERROR,
EVM_CHAIN_IN_LEDGER_MESSAGE,
INSUFFICIENT_GAS_ERROR, INSUFFICIENT_GAS_ERROR,
INSUFFICIENT_GAS_MESSAGE, INSUFFICIENT_GAS_MESSAGE,
INVALID_REFERRAL_ERROR, INVALID_REFERRAL_ERROR,
INVALID_REFERRAL_MESSAGE, INVALID_REFERRAL_MESSAGE,
KEPLR_NOT_FOUND_ERROR, KEPLR_NOT_FOUND_ERROR,
TOO_MANY_CHAINS_IN_LEDGER_ERROR,
TOO_MANY_CHAINS_IN_LEDGER_MESSAGE,
TWITTER_LOGIN_ERROR, TWITTER_LOGIN_ERROR,
VERIFICATION_THRESHOLD_ERROR, VERIFICATION_THRESHOLD_ERROR,
VERIFICATION_THRESHOLD_MESSAGE, VERIFICATION_THRESHOLD_MESSAGE,
@ -498,6 +502,18 @@ export default function VerificationPage() {
console.log(errorMessage); console.log(errorMessage);
captureException(errorMessage); captureException(errorMessage);
if (error.message.includes(TOO_MANY_CHAINS_IN_LEDGER_ERROR)) {
setErrorMessage({ message: TOO_MANY_CHAINS_IN_LEDGER_MESSAGE });
setErrorModalOpen(true);
return;
}
if (error.message.includes(EVM_CHAIN_IN_LEDGER_ERROR)) {
setErrorMessage({ message: EVM_CHAIN_IN_LEDGER_MESSAGE });
setErrorModalOpen(true);
return;
}
setErrorMessage({ message: error.message }); setErrorMessage({ message: error.message });
setErrorModalOpen(true); setErrorModalOpen(true);
} }