* feat: add network-switcher lib * feat: add env variables for some deployed app urls * feat: add network processing to environment hoook * refactor: network handling * refactor: remove dialog from provider and add env setter * feat: add network switcher dialog to the trading app * refactor: add network redirect to dialog connect callback * fix: lint * fix: jsonify env variable for possible networks * fix: add formatter file * fix: assign correct global state to network swicther * feat: add network-switcher lib * feat: add env variables for some deployed app urls * feat: add network processing to environment hoook * refactor: network handling * refactor: remove dialog from provider and add env setter * feat: add network switcher dialog to the trading app * refactor: add network redirect to dialog connect callback * fix: lint * fix: jsonify env variable for possible networks * fix: add formatter file * fix: assign correct global state to network swicther * fix: failing tests from UI changes * fix: lint * fix: lint Co-authored-by: Joe <joe@vega.xyz> Co-authored-by: Dexter <dexter.edwards93@gmail.com>
46 lines
1.4 KiB
TypeScript
46 lines
1.4 KiB
TypeScript
import { useTranslation } from 'react-i18next';
|
|
|
|
import { useEnvironment } from '@vegaprotocol/network-switcher';
|
|
import { useAddAssetSupported } from '../../hooks/use-add-asset-to-wallet';
|
|
import vegaVesting from '../../images/vega_vesting.png';
|
|
import { AddTokenButtonLink } from '../add-token-button/add-token-button';
|
|
import { Callout } from '@vegaprotocol/ui-toolkit';
|
|
|
|
export const AddLockedTokenAddress = () => {
|
|
const { t } = useTranslation();
|
|
const addSupported = useAddAssetSupported();
|
|
const { ADDRESSES } = useEnvironment();
|
|
return (
|
|
<Callout
|
|
title={t(
|
|
'Keep track of locked tokens in your wallet with the VEGA (VESTING) token.'
|
|
)}
|
|
>
|
|
{addSupported ? (
|
|
<>
|
|
<p className="flex justify-center">
|
|
<AddTokenButtonLink
|
|
address={ADDRESSES.lockedAddress}
|
|
symbol="VEGA🔒"
|
|
decimals={18}
|
|
image={vegaVesting}
|
|
/>
|
|
</p>
|
|
<div className="flex my-12 gap-12">
|
|
<hr className="flex-1 mt-8" />
|
|
{t('Or')} <hr className="flex-1 mt-8" />
|
|
</div>
|
|
</>
|
|
) : null}
|
|
<p className="mb-0">
|
|
{t(
|
|
'The token address is {{address}}. Hit the add token button in your ERC20 wallet and enter this address.',
|
|
{
|
|
address: ADDRESSES.lockedAddress,
|
|
}
|
|
)}
|
|
</p>
|
|
</Callout>
|
|
);
|
|
};
|