{t(`${window.location.host} now has access to your Wallet, however you don't
have sufficient permissions to retrieve your public keys. Got to your wallet to approve new permissions.`)}
>
);
}
return null;
};
const Center = ({ children }: { children: ReactNode }) => {
return (
);
if (error) {
if (error.code === ClientErrors.NO_SERVICE.code) {
title = t('No wallet detected');
text = t(`No wallet application running at ${connectorUrl}`);
} else if (error.code === ClientErrors.WRONG_NETWORK.code) {
title = t('Wrong network');
text = `To complete your wallet connection, set your wallet network in your app to "${appChainId}".`;
} else if (error.code === ServiceErrors.CONNECTION_DECLINED) {
title = t('Connection declined');
text = t('Your wallet connection was rejected');
} else if (error.code === ServiceErrors.NO_HEALTHY_NODE) {
title = error.message;
text = (
<>
{capitalize(error.data)}
{'. '}
{t('Read the docs to troubleshoot')}
>
);
} else if (error.code === ServiceErrors.REQUEST_PROCESSING) {
title = t('Connection in progress');
text = t('Approve the connection from your Vega wallet app.');
tryAgain = null;
} else if (error.code === 0) {
title = t('Wrong network');
text = (
<>
{t(`To complete your wallet connection, set your wallet network in your
app to ${appChainId}.`)}
>
);
} else {
title = error.message;
text = `${error.data} (${error.code})`;
}
}
return (
<>
{title}