fix(wallet): dont show error state if user rejects connection (#4901)
Co-authored-by: Madalina Raicu <madalina@raygroup.uk>
This commit is contained in:
parent
60ca6c2eb6
commit
872f1d300f
@ -131,7 +131,12 @@ const Error = ({
|
||||
);
|
||||
|
||||
if (error) {
|
||||
if (error.message === InjectedConnectorErrors.INVALID_CHAIN.message) {
|
||||
if (error.message === InjectedConnectorErrors.USER_REJECTED.message) {
|
||||
title = t('User rejected');
|
||||
text = t('The user rejected the wallet connection');
|
||||
} else if (
|
||||
error.message === InjectedConnectorErrors.INVALID_CHAIN.message
|
||||
) {
|
||||
title = t('Wrong network');
|
||||
text = t(
|
||||
'To complete your wallet connection, set your wallet network in your app to "%s".',
|
||||
|
@ -42,6 +42,7 @@ declare global {
|
||||
}
|
||||
|
||||
export const InjectedConnectorErrors = {
|
||||
USER_REJECTED: new Error('Connection denied'),
|
||||
VEGA_UNDEFINED: new Error('window.vega not found'),
|
||||
INVALID_CHAIN: new Error('Invalid chain'),
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user