>
@@ -374,30 +371,43 @@ const SelectedForm = ({
throw new Error('No connector selected');
};
-export const GetWalletButton = ({ className }: { className?: string }) => {
- const { MOZILLA_EXTENSION_URL, CHROME_EXTENSION_URL } = useEnvironment();
+export const GetWalletButton = ({
+ chromeExtensionUrl,
+ mozillaExtensionUrl,
+ className,
+}: {
+ chromeExtensionUrl?: string;
+ mozillaExtensionUrl?: string;
+ className?: string;
+}) => {
const isItChrome = window.navigator.userAgent.includes('Chrome');
const isItMozilla =
window.navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
+
const onClick = () => {
if (isItMozilla) {
- window.open(MOZILLA_EXTENSION_URL, '_blank');
+ window.open(mozillaExtensionUrl, '_blank');
return;
}
if (isItChrome) {
- window.open(CHROME_EXTENSION_URL, '_blank');
+ window.open(chromeExtensionUrl, '_blank');
}
};
const buttonContent = (
<>
-
+
{t('Get the Vega Wallet')}
ALPHA
-
+ {chromeExtensionUrl && mozillaExtensionUrl && (
+
+ )}
>
);
@@ -452,7 +462,7 @@ const ConnectionOption = ({
icon={icon}
fill
>
-
{text}
+
{text}
);
};
@@ -508,7 +518,7 @@ const CustomUrlInput = ({
onClick={() => onSelect('jsonRpc')}
/>
{isDesktopWalletRunning !== null && (
-
+
{isDesktopWalletRunning ? (