forked from LaconicNetwork/icns-frontend
Add referral error case
This commit is contained in:
parent
fb69c97923
commit
85e18f1b65
@ -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.";
|
||||
|
@ -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() {
|
||||
<OwnerAlert>
|
||||
You are not owner of this name.
|
||||
<br />
|
||||
Please select the account (
|
||||
{Bech32Address.shortenAddress(nftOwnerAddress, 28)})
|
||||
Please select the account{" "}
|
||||
<AddressBold>
|
||||
({Bech32Address.shortenAddress(nftOwnerAddress, 28)})
|
||||
</AddressBold>
|
||||
</OwnerAlert>
|
||||
) : null}
|
||||
|
||||
@ -639,3 +649,7 @@ const OwnerAlert = styled.div`
|
||||
|
||||
padding-top: 1.25rem;
|
||||
`;
|
||||
|
||||
const AddressBold = styled.span`
|
||||
color: ${color.white};
|
||||
`;
|
||||
|
Loading…
Reference in New Issue
Block a user