diff --git a/src/language/en-US.json b/src/language/en-US.json index 30a5fa63c..26595a1eb 100644 --- a/src/language/en-US.json +++ b/src/language/en-US.json @@ -9,6 +9,7 @@ "general.discard": "Discard Changes", "general.default": "Default Settings", "general.ok": "Ok", + "general.restart": "Restart Wallet ", "general.required": "is required", "general.cannot0": "cannot be 0", "general.validator": "validator", @@ -346,6 +347,7 @@ "bridge.form.disclaimer": "By proceeding, I hereby acknowledge that I agree to the terms and conditions.", "bridge.step0.title": "Cronos Bridge", "bridge.step0.description": "The safest, fastest, and most secure way to transfer assets to and from Cronos.", + "bridge.step0.message": "Please restart the app and enable the new Cronos asset in order to use Cronos Bridge.", "bridge.step1.title": "Confirmation", "bridge.step1.notice1": "Please make sure you have sufficient balance for Bridge Transaction Fee. ", "bridge.step2.title": "Bridge Transaction", diff --git a/src/language/ko-KR.json b/src/language/ko-KR.json index 23c455044..ebe17c544 100644 --- a/src/language/ko-KR.json +++ b/src/language/ko-KR.json @@ -9,6 +9,7 @@ "general.discard": "변경사항 버리기", "general.default": "기본 설정", "general.ok": "확인", + "general.restart": "재시작", "general.required": "필수", "general.cannot0": "0이 될 수 없음", "general.validator": "검증인", @@ -342,6 +343,7 @@ "bridge.form.disclaimer": "계속 진행함으로써 이용 약관에 동의함을 인정합니다.", "bridge.step0.title": "Cronos 브릿지", "bridge.step0.description": "Cronos에서 자산을 전송하는 가장 빠르고 안전한 방법입니다.", + "bridge.step0.message": "크로노스 브릿지를 사용하려면, 앱을 다시 시작한 다음, 새로운 크로노스 애셋을 활성화하세요.", "bridge.step1.title": "확인", "bridge.step1.notice1": "브릿지 거래 수수료로 잔액이 충분한지 확인하세요.", "bridge.step2.title": "브릿지 트랙잭션", diff --git a/src/language/zh-CN.json b/src/language/zh-CN.json index eaa2ad1c4..8ce547ad0 100644 --- a/src/language/zh-CN.json +++ b/src/language/zh-CN.json @@ -9,6 +9,7 @@ "general.discard": "取消", "general.default": "默认配置", "general.ok": "好的", + "general.restart": "重启钱包", "general.required": "必须输入", "general.cannot0": "不能为 0", "general.validator": "验证者", @@ -346,6 +347,7 @@ "bridge.form.disclaimer": "我同意条款和条件。", "bridge.step0.title": "Cronos 跨链桥", "bridge.step0.description": "把跨链资产带到 Cronos 上最安全最快速且最有保障的方法。", + "bridge.step0.message": "请重新启动钱包并加入新支援的Cronos代币以使用 Cronos 跨链桥", "bridge.step1.title": "确认", "bridge.step1.notice1": "请确保你有足够资金支付跨链交易费用", "bridge.step2.title": "跨链交易", diff --git a/src/language/zh-HK.json b/src/language/zh-HK.json index b1d07a87c..fd61c3603 100644 --- a/src/language/zh-HK.json +++ b/src/language/zh-HK.json @@ -9,6 +9,7 @@ "general.discard": "取消", "general.default": "默認設定", "general.ok": "Ok", + "general.restart": "重啟錢包", "general.required": "必須輸入", "general.cannot0": "不能為 0", "general.validator": "驗證者", @@ -346,7 +347,8 @@ "bridge.form.disclaimer": "我同意條款及細則。", "bridge.step0.title": "Cronos 跨鏈橋", "bridge.step0.description": "把跨鏈資產帶到 Cronos 上最安全最快速且最有保障的方法。", - "bridge.step1.title": "確認", + "bridge.step0.message": "請重新啟動錢包並加入新支援的Cronos代幣以使用 Cronos 跨鏈橋", + "bridge.step1.title": "Loading...", "bridge.step1.notice1": "請確保你有足夠資金支付跨鏈交易費用", "bridge.step2.title": "跨鏈交易", "bridge.deposit.complete.title": "已完成存入 {{amount}} {{symbol}}", diff --git a/src/layouts/home/home.tsx b/src/layouts/home/home.tsx index 747722332..325654e69 100644 --- a/src/layouts/home/home.tsx +++ b/src/layouts/home/home.tsx @@ -78,6 +78,8 @@ import SuccessCheckmark from '../../components/SuccessCheckmark/SuccessCheckmark import IconLedger from '../../svg/IconLedger'; import { ISignerProvider } from '../../service/signers/SignerProvider'; import { UserAsset } from '../../models/UserAsset'; +import IconCro from '../../svg/IconCro'; +import IconEth from '../../svg/IconEth'; // import i18n from '../../language/I18n'; interface HomeLayoutProps { @@ -391,7 +393,7 @@ function HomeLayout(props: HomeLayoutProps) { notification.info({ message: t('home.createNewAsset.notification.message'), description: t('home.createNewAsset.notification.description'), - duration: 60, + duration: 120, key: newAssetAddedNotificationKey, placement: 'topRight', btn: createNewlyAddedAssets, @@ -1091,9 +1093,17 @@ function HomeLayout(props: HomeLayoutProps) { image={isLedgerCroAppConnected ? : } >
- {isLedgerCroAppConnected - ? t('home.ledgerModalPopup.tendermintAsset.description1') - : t('home.ledgerModalPopup.tendermintAsset.description2')} + {isLedgerCroAppConnected ? ( + t('create.ledgerModalPopup.tendermintAddress.description1') + ) : ( + <> + {t('create.ledgerModalPopup.tendermintAddress.description3')} +
+ +
+ Crypto.org App + + )}
: } >
- {isLedgerEthAppConnected - ? t('home.ledgerModalPopup.evmAsset.description1') - : t('home.ledgerModalPopup.evmAsset.description2')} + {isLedgerEthAppConnected ? ( + t('create.ledgerModalPopup.evmAddress.description1') + ) : ( + <> + {t('create.ledgerModalPopup.tendermintAddress.description3')} +
+ +
+ Ethereum App + + )}
diff --git a/src/pages/bridge/bridge.tsx b/src/pages/bridge/bridge.tsx index 022e90713..dcc74b27c 100644 --- a/src/pages/bridge/bridge.tsx +++ b/src/pages/bridge/bridge.tsx @@ -1,4 +1,5 @@ import React, { useState } from 'react'; +import { useHistory } from 'react-router-dom'; import './bridge.less'; import 'antd/dist/antd.css'; import { @@ -152,6 +153,8 @@ const CronosBridge = props => { const analyticsService = new AnalyticsService(session); + const history = useHistory(); + const [t] = useTranslation(); const bridgeService = new BridgeService(walletService.storageService); @@ -500,6 +503,25 @@ const CronosBridge = props => { const bridgeFromObj = SUPPORTED_BRIDGE.get(bridgeFrom); const bridgeToObj = SUPPORTED_BRIDGE.get(bridgeTo); + if (walletAllAssets.length < 2) { + return ( +
+
{t('bridge.step0.message')}
+ +
+ ); + } + switch (step) { case 0: return (