diff --git a/constants/error-message.ts b/constants/error-message.ts index 19e633e..b50f388 100644 --- a/constants/error-message.ts +++ b/constants/error-message.ts @@ -19,3 +19,7 @@ export const ACCOUNT_NOT_EXIST_MESSAGE = export const VERIFICATION_THRESHOLD_ERROR = "verfication is below threshold:"; export const VERIFICATION_THRESHOLD_MESSAGE = "Verifier consensus failed. Verifiers may be offline. Please try again later."; + +export const INVALID_REFERRAL_ERROR = "Invalid referral:"; +export const INVALID_REFERRAL_MESSAGE = + "Make sure that the referrer ICNS name has been registered."; diff --git a/pages/verification/index.tsx b/pages/verification/index.tsx index 8311e24..1ca5caa 100644 --- a/pages/verification/index.tsx +++ b/pages/verification/index.tsx @@ -56,6 +56,8 @@ import { ACCOUNT_NOT_EXIST_MESSAGE, INSUFFICIENT_GAS_ERROR, INSUFFICIENT_GAS_MESSAGE, + INVALID_REFERRAL_ERROR, + INVALID_REFERRAL_MESSAGE, KEPLR_NOT_FOUND_ERROR, TWITTER_LOGIN_ERROR, VERIFICATION_THRESHOLD_ERROR, @@ -454,6 +456,12 @@ export default function VerificationPage() { return; } + if (message.includes(INVALID_REFERRAL_ERROR)) { + setErrorMessage({ message: INVALID_REFERRAL_MESSAGE }); + setErrorModalOpen(true); + return; + } + setErrorMessage({ message: (error?.response?.data as QueryError).message, }); @@ -528,8 +536,10 @@ export default function VerificationPage() { You are not owner of this name.
- Please select the account ( - {Bech32Address.shortenAddress(nftOwnerAddress, 28)}) + Please select the account{" "} + + ({Bech32Address.shortenAddress(nftOwnerAddress, 28)}) +
) : null} @@ -639,3 +649,7 @@ const OwnerAlert = styled.div` padding-top: 1.25rem; `; + +const AddressBold = styled.span` + color: ${color.white}; +`;