Skip to content

Commit c53f4e5

Browse files
authored
Merge pull request #1394 from crypto-com/dev
Internal Release v1.4.5
2 parents 9adc9b4 + cf298e0 commit c53f4e5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+391
-414
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
55
*Unreleased*
66

77
*Released*
8+
## [v1.4.5] - 2023-10-24
9+
### Additions
10+
- Rebranding of Cronos POS Chain
11+
- Security enhancement & package dependencies bump
812
## [v1.4.4] - 2023-09-21
913
### Additions
1014
- Security enhancement on DApp Browser

electron/main.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,9 @@ function createWindow() {
141141
// Open default browser when direct to external
142142
win.webContents.on('new-window', function (e, url) {
143143
e.preventDefault();
144+
if (!isValidURL(url)) {
145+
return;
146+
}
144147
require('electron').shell.openExternal(url);
145148
});
146149

@@ -200,6 +203,13 @@ app.on('web-contents-created', (event, contents) => {
200203
event.preventDefault();
201204
}
202205
})
206+
207+
// bolcks 301/302 redirect if the url is not valid
208+
contents.on('will-redirect', (event, url) => {
209+
if (!isValidURL(url)) {
210+
event.preventDefault();
211+
}
212+
})
203213
}
204214
})
205215

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "chain-desktop-wallet",
3-
"version": "1.4.4",
3+
"version": "1.4.5",
44
"description": "Crypto.com DeFi Desktop Wallet App",
55
"repository": "github:crypto-com/chain-desktop-wallet",
66
"author": "Crypto.com <contact@crypto.com>",
@@ -9,7 +9,7 @@
99
"main": "build/electron/main.js",
1010
"private": true,
1111
"scripts": {
12-
"run-audit": "yarn audit-ci --high -a 1005059",
12+
"run-audit": "yarn audit-ci --high -a 1005059 1094228 1094439",
1313
"start": "node scripts/start.js",
1414
"build": "cross-env NODE_OPTIONS=--max_old_space_size=8192 && yarn clean-builds && node scripts/build.js",
1515
"test": "node scripts/test.js --watchAll=false",
@@ -120,7 +120,6 @@
120120
"@types/chai-as-promised": "7.1.3",
121121
"@types/crypto-js": "4.0.1",
122122
"@types/d3": "7.4.0",
123-
"@types/electron": "1.6.10",
124123
"@types/electron-devtools-installer": "2.2.0",
125124
"@types/jest": "26.0.16",
126125
"@types/jsdom": "16.2.10",
@@ -392,6 +391,8 @@
392391
"@sideway/formula": "3.0.1",
393392
"cookiejar": "2.1.4",
394393
"decode-uri-component": "0.2.2",
395-
"word-wrap": "1.2.4"
394+
"word-wrap": "1.2.4",
395+
"@babel/traverse": "7.23.2",
396+
"get-func-name": "2.0.0"
396397
}
397398
}

src/components/AssetIcon/index.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export const ICON_CRO_TENDERMINT = './assets/icon-cronos-tendermint.svg';
1010
export const ICON_CRO_EVM = './assets/icon-cronos-evm.svg';
1111
export const ICON_ETH_EVM = './assets/icon-eth-evm.svg';
1212
export const ICON_ATOM_TENDERMINT = './assets/icon-atom-tendermint.svg';
13-
export const ICON_BRIDGE_CRYPTO_ORG = './assets/icon-bridge-crypto-org.svg';
13+
export const ICON_BRIDGE_CRONOS_TENDERMINT = './assets/icon-bridge-crypto-org.svg';
1414
export const ICON_BRIDGE_CRONOS = './assets/icon-bridge-cronos.svg';
1515
export const ICON_BRIDGE_COSMOSHUB = './assets/icon-atom-tendermint.svg';
1616

@@ -42,11 +42,11 @@ export const AssetIcon = (props: { asset: UserAsset }) => {
4242

4343
export const BridgeIcon = (props: { bridgeValue: string | undefined }) => {
4444
const { bridgeValue } = props;
45-
let icon = ICON_BRIDGE_CRYPTO_ORG;
45+
let icon = ICON_BRIDGE_CRONOS_TENDERMINT;
4646

4747
switch (bridgeValue) {
48-
case 'CRYPTO_ORG':
49-
icon = ICON_BRIDGE_CRYPTO_ORG;
48+
case 'CRONOS_TENDERMINT':
49+
icon = ICON_BRIDGE_CRONOS_TENDERMINT;
5050
break;
5151
case 'CRONOS':
5252
icon = ICON_BRIDGE_CRONOS;

src/components/LedgerNotification/LedgerNotification.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export function ledgerNotification(wallet: Wallet, asset: UserAsset) {
3030
const ledgerAddress = await device.getAddress(
3131
addressIndex,
3232
addressprefix,
33-
asset.config?.tendermintNetwork?.chainName ?? SupportedChainName.CRYPTO_ORG,
33+
asset.config?.tendermintNetwork?.chainName ?? SupportedChainName.CRONOS_TENDERMINT,
3434
derivationPathStandard ?? DerivationPathStandard.BIP44,
3535
true,
3636
);
@@ -99,7 +99,7 @@ export function ledgerNotification(wallet: Wallet, asset: UserAsset) {
9999
{i18n.t('receive.notification.ledgerConnect.description')}
100100
<br /> -{' '}
101101
<a
102-
href="https://crypto.org/docs/wallets/ledger_desktop_wallet.html#ledger-connection-troubleshoot"
102+
href="https://cronos-pos.org/docs/wallets/ledger_desktop_wallet.html#ledger-connection-troubleshoot"
103103
target="_blank"
104104
rel="noreferrer"
105105
>
@@ -245,7 +245,7 @@ export function ledgerNotificationWithoutCheck(
245245
{i18n.t('receive.notification.ledgerConnect.description')}
246246
<br /> -{' '}
247247
<a
248-
href="https://crypto.org/docs/wallets/ledger_desktop_wallet.html#ledger-connection-troubleshoot"
248+
href="https://cronos-pos.org/docs/wallets/ledger_desktop_wallet.html#ledger-connection-troubleshoot"
249249
target="_blank"
250250
rel="noreferrer"
251251
>

src/config/StaticAssets.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export const CRONOS_TENDERMINT_ASSET = (walletConfig: WalletConfig) => {
7777
defaultNodeUrl: isTestnet
7878
? 'https://rpc-c5.crypto.org'
7979
: 'https://rpc.mainnet.crypto.org',
80-
chainName: SupportedChainName.CRYPTO_ORG,
80+
chainName: SupportedChainName.CRONOS_TENDERMINT,
8181
chainId: isTestnet ? 'testnet-croeseid-5' : MainNetConfig.network.chainId,
8282
addressPrefix: isTestnet ? 'tcro' : 'cro',
8383
validatorPubKeyPrefix: isTestnet ? 'tcrocnclconspub' : 'crocnclconspub',
@@ -102,10 +102,10 @@ export const CRONOS_TENDERMINT_ASSET = (walletConfig: WalletConfig) => {
102102
return {
103103
balance: '0',
104104
description:
105-
'Cronos (CRO) is the native token of the Crypto.org Chain. The Crypto.org Chain was created to build a network of cryptocurrency projects, and develop merchants’ ability to accept crypto as a form of payment. The Crypto.org Chain is a high performing native blockchain solution, which will make the transaction flows between crypto users and merchants accepting crypto seamless, cost-efficient and secure.\\r\\n\\r\\nBusinesses can use Crypto.org pay Checkout and/or Invoice to enable customers to complete checkout and pay for goods and services with cryptocurrencies using the Crypto.org Wallet App. Businesses receive all their payments instantly in CRO or stable coins, or in fiat.',
105+
'Cronos (CRO) is the native token of the Cronos POS Chain. The Cronos POS Chain was created to build a network of cryptocurrency projects, and develop merchants’ ability to accept crypto as a form of payment. The Cronos POS Chain is a high performing native blockchain solution, which will make the transaction flows between crypto users and merchants accepting crypto seamless, cost-efficient and secure.\\r\\n\\r\\nBusinesses can use Cronos POS pay Checkout and/or Invoice to enable customers to complete checkout and pay for goods and services with cryptocurrencies using the Crypto.org Wallet App. Businesses receive all their payments instantly in CRO or stable coins, or in fiat.',
106106
icon_url: ICON_CRO_TENDERMINT,
107107
identifier: getRandomId(),
108-
name: SupportedChainName.CRYPTO_ORG,
108+
name: SupportedChainName.CRONOS_TENDERMINT,
109109
symbol: isTestnet ? TestNetCroeseid5Config.network.coin.croDenom.toString().toUpperCase() : MainNetConfig.network.coin.croDenom.toString().toUpperCase(),
110110
mainnetSymbol: 'CRO', // This is to be used solely for markets data since testnet market prices is always non existent
111111
stakedBalance: '0',
@@ -273,7 +273,7 @@ export const getDefaultUserAssetConfig = (asset: UserAsset | undefined, session:
273273
switch (`${assetType}-${name}`) {
274274
case `${UserAssetType.TENDERMINT}-${SupportedChainName.COSMOS_HUB}`:
275275
return ATOM_TENDERMINT_ASSET(config);
276-
case `${UserAssetType.TENDERMINT}-${SupportedChainName.CRYPTO_ORG}`:
276+
case `${UserAssetType.TENDERMINT}-${SupportedChainName.CRONOS_TENDERMINT}`:
277277
return CRONOS_TENDERMINT_ASSET(config);
278278
case `${UserAssetType.EVM}-${SupportedChainName.CRONOS}`:
279279
return CRONOS_EVM_ASSET(config);

src/config/StaticConfig.ts

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ import { CroNetwork } from '@crypto-org-chain/chain-jslib/lib/dist/core/cro';
33
export const INTERCOM_APP_ID = 'yrt83fbd';
44

55
export const APP_DB_NAMESPACE = 'data-store';
6-
export const MARKET_API_BASE_URL = 'https://crypto.org/api';
6+
export const MARKET_API_BASE_URL = 'https://cronos-pos.org/api';
77
export const COINBASE_TICKER_API_BASE_URL = 'https://api.coinbase.com/v2/';
88
export const CRYPTO_COM_PRICE_API_BASE_URL = {
99
V1: 'https://price-api.crypto.com/price/v1/',
1010
V2: 'https://price-api.crypto.com/price/v2/',
1111
};
1212
export const NV_GRAPHQL_API_ENDPOINT = 'https://crypto.com/nft-api/graphql';
1313
export const IPFS_MIDDLEWARE_SERVER_UPLOAD_ENDPOINT =
14-
'https://crypto.org/ipfs-middleware-server/uploads';
14+
'https://cronos-pos.org/ipfs-middleware-server/uploads';
1515
export const NCW_NFT_MIDDLEWARE_SERVER_ENDPOINT =
1616
'https://cronos.org/ncw-quandra-api-middleware-server';
1717
export const DEFAULT_CLIENT_MEMO = 'client:chain-desktop-app';
@@ -221,7 +221,7 @@ SUPPORTED_CURRENCY.set('BRL', { value: 'BRL', label: 'BRL - R$', symbol: 'R$' })
221221
SUPPORTED_CURRENCY.set('TRY', { value: 'TRY', label: 'TRY - ₺', symbol: '₺' });
222222

223223
export enum SupportedChainName {
224-
CRYPTO_ORG = 'Crypto.org Chain',
224+
CRONOS_TENDERMINT = 'Cronos POS Chain',
225225
CRONOS = 'Cronos Chain',
226226
COSMOS_HUB = 'Cosmos Hub Chain',
227227
ETHEREUM = 'Ethereum Chain',
@@ -315,7 +315,7 @@ export const NFT_WRAPPED_ETH_DENOM_SCHEMA = {
315315
properties: {
316316
isExternal: {
317317
type: 'boolean',
318-
description: 'Describes whether the NFT is external or internal to the Crypto.org chain',
318+
description: 'Describes whether the NFT is external or internal to the Cronos POS Chain',
319319
},
320320
network: {
321321
type: 'string',
@@ -338,13 +338,13 @@ const TestNetConfig: WalletConfig = {
338338
name: NetworkName.TESTNET,
339339
derivationPath: 'm/44\'/1\'/0\'/0/0',
340340
explorer: {
341-
baseUrl: 'https://crypto.org/explorer/croeseid',
342-
tx: 'https://crypto.org/explorer/croeseid/tx',
343-
address: 'https://crypto.org/explorer/croeseid/account',
344-
validator: 'https://crypto.org/explorer/croeseid/validator',
341+
baseUrl: 'https://cronos-pos.org/explorer/croeseid',
342+
tx: 'https://cronos-pos.org/explorer/croeseid/tx',
343+
address: 'https://cronos-pos.org/explorer/croeseid/account',
344+
validator: 'https://cronos-pos.org/explorer/croeseid/validator',
345345
},
346-
explorerUrl: 'https://crypto.org/explorer/croeseid',
347-
indexingUrl: 'https://crypto.org/explorer/croeseid/api/v1/',
346+
explorerUrl: 'https://cronos-pos.org/explorer/croeseid',
347+
indexingUrl: 'https://cronos-pos.org/explorer/croeseid/api/v1/',
348348
nodeUrl: CroNetwork.Testnet.defaultNodeUrl,
349349
network: CroNetwork.Testnet,
350350
disableDefaultClientMemo: false,
@@ -395,13 +395,13 @@ export const TestNetCroeseid4Config: WalletConfig = {
395395
name: NetworkName.TESTNET,
396396
derivationPath: 'm/44\'/1\'/0\'/0/0',
397397
explorer: {
398-
baseUrl: 'https://crypto.org/explorer/croeseid4',
399-
tx: 'https://crypto.org/explorer/croeseid4/tx',
400-
address: 'https://crypto.org/explorer/croeseid4/account',
401-
validator: 'https://crypto.org/explorer/croeseid4/validator',
398+
baseUrl: 'https://cronos-pos.org/explorer/croeseid4',
399+
tx: 'https://cronos-pos.org/explorer/croeseid4/tx',
400+
address: 'https://cronos-pos.org/explorer/croeseid4/account',
401+
validator: 'https://cronos-pos.org/explorer/croeseid4/validator',
402402
},
403-
explorerUrl: 'https://crypto.org/explorer/croeseid4',
404-
indexingUrl: 'https://crypto.org/explorer/croeseid4/api/v1/',
403+
explorerUrl: 'https://cronos-pos.org/explorer/croeseid4',
404+
indexingUrl: 'https://cronos-pos.org/explorer/croeseid4/api/v1/',
405405
nodeUrl: TestnetCroeseid4.defaultNodeUrl,
406406
network: TestnetCroeseid4,
407407
disableDefaultClientMemo: false,
@@ -413,7 +413,7 @@ export const TestNetCroeseid4Config: WalletConfig = {
413413
},
414414
tendermintNetwork: {
415415
...TestnetCroeseid4,
416-
chainName: SupportedChainName.CRYPTO_ORG,
416+
chainName: SupportedChainName.CRONOS_TENDERMINT,
417417
node: {
418418
clientUrl: 'https://rpc-testnet-croeseid-4.crypto.org',
419419
proxyUrl: 'https://rest-testnet-croeseid-4.crypto.org',
@@ -427,13 +427,13 @@ export const TestNetCroeseid5Config: WalletConfig = {
427427
name: NetworkName.TESTNET,
428428
derivationPath: 'm/44\'/1\'/0\'/0/0',
429429
explorer: {
430-
baseUrl: 'https://crypto.org/explorer/croeseid5',
431-
tx: 'https://crypto.org/explorer/croeseid5/tx',
432-
address: 'https://crypto.org/explorer/croeseid5/account',
433-
validator: 'https://crypto.org/explorer/croeseid5/validator',
430+
baseUrl: 'https://cronos-pos.org/explorer/croeseid5',
431+
tx: 'https://cronos-pos.org/explorer/croeseid5/tx',
432+
address: 'https://cronos-pos.org/explorer/croeseid5/account',
433+
validator: 'https://cronos-pos.org/explorer/croeseid5/validator',
434434
},
435-
explorerUrl: 'https://crypto.org/explorer/croeseid5',
436-
indexingUrl: 'https://crypto.org/explorer/croeseid5/api/v1/',
435+
explorerUrl: 'https://cronos-pos.org/explorer/croeseid5',
436+
indexingUrl: 'https://cronos-pos.org/explorer/croeseid5/api/v1/',
437437
nodeUrl: TestnetCroeseid5.defaultNodeUrl,
438438
network: TestnetCroeseid5,
439439
disableDefaultClientMemo: false,
@@ -445,7 +445,7 @@ export const TestNetCroeseid5Config: WalletConfig = {
445445
},
446446
tendermintNetwork: {
447447
...TestnetCroeseid5,
448-
chainName: SupportedChainName.CRYPTO_ORG,
448+
chainName: SupportedChainName.CRONOS_TENDERMINT,
449449
node: {
450450
clientUrl: 'https://rpc-c5.crypto.org',
451451
proxyUrl: 'https://rest-c5.crypto.org'
@@ -459,13 +459,13 @@ export const MainNetConfig: WalletConfig = {
459459
derivationPath: 'm/44\'/394\'/0\'/0/0',
460460
nodeUrl: 'https://rpc.mainnet.crypto.org',
461461
explorer: {
462-
baseUrl: 'https://crypto.org/explorer',
463-
tx: 'https://crypto.org/explorer/tx',
464-
address: 'https://crypto.org/explorer/account',
465-
validator: 'https://crypto.org/explorer/validator',
462+
baseUrl: 'https://cronos-pos.org/explorer/',
463+
tx: 'https://cronos-pos.org/explorer/tx',
464+
address: 'https://cronos-pos.org/explorer/account',
465+
validator: 'https://cronos-pos.org/explorer/validator',
466466
},
467-
explorerUrl: 'https://crypto.org/explorer',
468-
indexingUrl: 'https://crypto.org/explorer/api/v1/',
467+
explorerUrl: 'https://cronos-pos.org/explorer',
468+
indexingUrl: 'https://cronos-pos.org/explorer/api/v1/',
469469
network: {
470470
...CroNetwork.Mainnet,
471471
defaultNodeUrl: 'https://rpc.mainnet.crypto.org',
@@ -481,7 +481,7 @@ export const MainNetConfig: WalletConfig = {
481481
tendermintNetwork: {
482482
...CroNetwork.Mainnet,
483483
defaultNodeUrl: 'https://rpc.mainnet.crypto.org',
484-
chainName: SupportedChainName.CRYPTO_ORG,
484+
chainName: SupportedChainName.CRONOS_TENDERMINT,
485485
rpcUrl: 'https://rpc.mainnet.crypto.org',
486486
node: {
487487
clientUrl: 'https://rpc.mainnet.crypto.org',

src/config/whitelist_tokens_20220602.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11277,7 +11277,7 @@
1127711277
"blockchain_symbol": "CRO",
1127811278
"trading_symbol": "CRO",
1127911279
"code": "CRO",
11280-
"explorer": "https://crypto.org/explorer/tx/",
11280+
"explorer": "https://cronos-pos.org/explorer/tx/",
1128111281
"is_erc20": false,
1128211282
"gas_limit": 500000,
1128311283
"token_decimal_value": "1000000",
@@ -11291,7 +11291,7 @@
1129111291
"denom": "basecro",
1129211292
"parent": "cro-asset",
1129311293
"chain": "cro",
11294-
"balance_explorer_url": "https://crypto.org/explorer/account/",
11294+
"balance_explorer_url": "https://cronos-pos.org/explorer/account/",
1129511295
"enabled": true,
1129611296
"is_new": false,
1129711297
"withdrawal_eta": ["6 secs"],

src/hooks/useLedgerStatus.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export const useLedgerStatus = (props: Props) => {
2121
useEffect(() => {
2222
const checkIsLedgerConnected = () => {
2323
if (assetType === UserAssetType.TENDERMINT || assetType === UserAssetType.IBC) {
24-
if(chainName === SupportedChainName.CRYPTO_ORG) {
24+
if(chainName === SupportedChainName.CRONOS_TENDERMINT) {
2525
setIsLedgerConnected(ledgerConnectedApp === LedgerConnectedApp.CRYPTO_ORG);
2626
} else if(chainName === SupportedChainName.COSMOS_HUB) {
2727
setIsLedgerConnected(ledgerConnectedApp === LedgerConnectedApp.COSMOS);

src/language/ar-AE.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@
153153
"general.walletconnect.disconnect": "قطع الاتصال",
154154
"general.walletconnect.connect.desc6": "يمكنك الآن الوصول إلى DApp على متصفح الويب الخاص بك",
155155
"general.walletconnect.connect.desc7": "عنوان المحفظة",
156-
"welcome.slogan": "محفظة سطح مكتب عامة وopen-source على سلسلة Crypto.org.",
156+
"welcome.slogan": "محفظة سطح مكتب عامة وopen-source على سلسلة Cronos POS.",
157157
"welcome.button": "للبدء",
158158
"welcome.block": "هذا المنتج غير متوفر حاليا في بلدك أو منطقتك.",
159159
"signup.title": "تم إنشاء كلمة مرور التطبيق بنجاح",
@@ -476,7 +476,7 @@
476476
"governance.modal1.label3": "تصويت",
477477
"governance.modal2.instructions.part2.discord": "Discord",
478478
"nft.title": "معلوماتي",
479-
"nft.description": "نظرة عامة على مجموعة NFT الخاصة بك على Crypto.org Chain & Cronos Chain.",
479+
"nft.description": "نظرة عامة على مجموعة NFT الخاصة بك على Cronos POS Chain & Cronos Chain.",
480480
"nft.tab1": "مجموعة NFT",
481481
"nft.tab3": "تلقي NFT",
482482
"nft.fileUploadValidator.error1": "مطلوب تحميل الملفات",

0 commit comments

Comments
 (0)