Skip to content

Commit

Permalink
Merge pull request #802 from crypto-com/dev
Browse files Browse the repository at this point in the history
Internal Release v0.5.4
  • Loading branch information
crypto-eddy authored Nov 9, 2021
2 parents 7bb10b7 + cac6eeb commit dc4e26e
Show file tree
Hide file tree
Showing 8 changed files with 62 additions and 9 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ All notable changes to this project will be documented in this file.

*Released*

## [v0.5.4] - 2021-11-09

### Bug fixes
- Fixed Cronos Bridge page crashes when Cronos asset is not enabled yet.

## [v0.5.3] - 2021-11-08

### Additions
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "chain-desktop-wallet",
"version": "0.5.3",
"version": "0.5.4",
"description": "Crypto.com Chain Desktop Wallet App",
"repository": "github:crypto-com/chain-desktop-wallet",
"author": "Crypto.org <[email protected]>",
Expand Down
2 changes: 2 additions & 0 deletions src/language/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
2 changes: 2 additions & 0 deletions src/language/ko-KR.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"general.discard": "변경사항 버리기",
"general.default": "기본 설정",
"general.ok": "확인",
"general.restart": "재시작",
"general.required": "필수",
"general.cannot0": "0이 될 수 없음",
"general.validator": "검증인",
Expand Down Expand Up @@ -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": "브릿지 트랙잭션",
Expand Down
2 changes: 2 additions & 0 deletions src/language/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"general.discard": "取消",
"general.default": "默认配置",
"general.ok": "好的",
"general.restart": "重启钱包",
"general.required": "必须输入",
"general.cannot0": "不能为 0",
"general.validator": "验证者",
Expand Down Expand Up @@ -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": "跨链交易",
Expand Down
4 changes: 3 additions & 1 deletion src/language/zh-HK.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"general.discard": "取消",
"general.default": "默認設定",
"general.ok": "Ok",
"general.restart": "重啟錢包",
"general.required": "必須輸入",
"general.cannot0": "不能為 0",
"general.validator": "驗證者",
Expand Down Expand Up @@ -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}}",
Expand Down
32 changes: 25 additions & 7 deletions src/layouts/home/home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -1091,9 +1093,17 @@ function HomeLayout(props: HomeLayoutProps) {
image={isLedgerCroAppConnected ? <SuccessCheckmark /> : <IconLedger />}
>
<div className="description">
{isLedgerCroAppConnected
? t('home.ledgerModalPopup.tendermintAsset.description1')
: t('home.ledgerModalPopup.tendermintAsset.description2')}
{isLedgerCroAppConnected ? (
t('create.ledgerModalPopup.tendermintAddress.description1')
) : (
<>
{t('create.ledgerModalPopup.tendermintAddress.description3')}
<div className="ledger-app-icon">
<IconCro style={{ color: '#fff' }} />
</div>
Crypto.org App
</>
)}
</div>
</LedgerModalPopup>
<LedgerModalPopup
Expand Down Expand Up @@ -1131,9 +1141,17 @@ function HomeLayout(props: HomeLayoutProps) {
image={isLedgerEthAppConnected ? <SuccessCheckmark /> : <IconLedger />}
>
<div className="description">
{isLedgerEthAppConnected
? t('home.ledgerModalPopup.evmAsset.description1')
: t('home.ledgerModalPopup.evmAsset.description2')}
{isLedgerEthAppConnected ? (
t('create.ledgerModalPopup.evmAddress.description1')
) : (
<>
{t('create.ledgerModalPopup.tendermintAddress.description3')}
<div className="ledger-app-icon">
<IconEth style={{ color: '#fff' }} />
</div>
Ethereum App
</>
)}
</div>
</LedgerModalPopup>
</Layout>
Expand Down
22 changes: 22 additions & 0 deletions src/pages/bridge/bridge.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { useState } from 'react';
import { useHistory } from 'react-router-dom';
import './bridge.less';
import 'antd/dist/antd.css';
import {
Expand Down Expand Up @@ -152,6 +153,8 @@ const CronosBridge = props => {

const analyticsService = new AnalyticsService(session);

const history = useHistory();

const [t] = useTranslation();

const bridgeService = new BridgeService(walletService.storageService);
Expand Down Expand Up @@ -500,6 +503,25 @@ const CronosBridge = props => {
const bridgeFromObj = SUPPORTED_BRIDGE.get(bridgeFrom);
const bridgeToObj = SUPPORTED_BRIDGE.get(bridgeTo);

if (walletAllAssets.length < 2) {
return (
<div>
<div className="item">{t('bridge.step0.message')}</div>
<Button
type="primary"
onClick={() => {
history.go(0);
}}
style={{
width: '200px',
}}
>
{t('general.restart')}
</Button>
</div>
);
}

switch (step) {
case 0:
return (
Expand Down

0 comments on commit dc4e26e

Please sign in to comment.