Skip to content

Commit

Permalink
Merge pull request #793 from crypto-com/dev
Browse files Browse the repository at this point in the history
Internal Release v0.5.3
  • Loading branch information
crypto-matto authored Nov 8, 2021
2 parents 8bbfa5d + a9bd29d commit 7bb10b7
Show file tree
Hide file tree
Showing 27 changed files with 410 additions and 182 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,18 @@ All notable changes to this project will be documented in this file.

*Released*

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

### Additions
- Increase Password complexity requirement to "Good"
- Update default mainnet Bridge Transfer config

### Bug fixes
- Fixed transfer failure for big amount (e.g. > 100M CRO)
- Fixed missing default memo in asset transfer
- Fixed generate-i18n command failure
- Update Testnet unbonding days change to 28 Days

## [v0.5.2] - 2021-10-28

### Additions
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "chain-desktop-wallet",
"version": "0.5.2",
"version": "0.5.3",
"description": "Crypto.com Chain Desktop Wallet App",
"repository": "github:crypto-com/chain-desktop-wallet",
"author": "Crypto.org <[email protected]>",
Expand All @@ -13,7 +13,7 @@
"@babel/helper-builder-react-jsx": "7.12.13",
"@babel/helper-builder-react-jsx-experimental": "7.12.11",
"@cosmjs/stargate": "0.24.1",
"@crypto-org-chain/chain-jslib": "1.0.2",
"@crypto-org-chain/chain-jslib": "1.0.3",
"@ledgerhq/hw-app-eth": "^6.6.0",
"@ledgerhq/hw-transport-node-hid": "^6.6.0",
"@ledgerhq/hw-transport-webhid": "5.48.0",
Expand Down
16 changes: 10 additions & 6 deletions scripts/generate_i18n.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,13 @@ async function saveToDisk(localDatas) {
});
}

console.log('Fetching sheet...');
const sheetData = await fetchSheet(SHEET_CSV_URL);
console.log('Parsing sheet...');
const parsedData = await parseSheetData(sheetData);
await saveToDisk(parsedData);
console.log('🍻 All set')
async function main() {
console.log('Fetching sheet...');
const sheetData = await fetchSheet(SHEET_CSV_URL);
console.log('Parsing sheet...');
const parsedData = await parseSheetData(sheetData);
await saveToDisk(parsedData);
console.log('🍻 All set')
}

main();
38 changes: 27 additions & 11 deletions src/components/PasswordForm/PasswordForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,18 +60,34 @@ const PasswordForm: React.FC<PasswordFormProps> = props => {
<Form.Item
name="password"
label={t('general.passwordForm.password.label')}
rules={[
{
required: true,
message: `${t('general.passwordForm.password.label')} ${t('general.required')}`,
},
rules={
props.shouldValidate
? {
pattern: /^(?=.*?[A-Za-z])(?=.*?[0-9])(?=.*?[^\w\s]).{8,}$/,
message: t('general.passwordForm.password.error1'),
}
: {},
]}
? [
{
required: true,
message: `${t('general.passwordForm.password.label')} ${t('general.required')}`,
},
{
pattern: /^(?=.*?[A-Za-z])(?=.*?[0-9])(?=.*?[^\w\s]).{8,}$/,
message: t('general.passwordForm.password.error1'),
},
() => ({
validator() {
if (strength < 3) {
return Promise.reject(new Error(t('general.passwordForm.password.error2')));
}
return Promise.resolve();
},
}),
]
: [
{
required: true,
message: `${t('general.passwordForm.password.label')} ${t('general.required')}`,
},
]
}
validateFirst
>
<Input.Password placeholder={t('general.passwordForm.password.placeholder')} />
</Form.Item>
Expand Down
20 changes: 20 additions & 0 deletions src/components/RowAmountOption/RowAmountOption.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
.row-amount-option.ant-form-item {
display: flex;
flex-direction: row !important;
justify-content: space-between !important;
width: 100%;

.ant-btn {
width: 23% !important;
height: 30px;
margin: 5px 0;
padding: 4px !important;
border: none !important;
border-radius: 25px;
box-shadow: 0 0 2px 0 #c2c2c2;

span {
font-size: 14px !important;
}
}
}
56 changes: 56 additions & 0 deletions src/components/RowAmountOption/RowAmountOption.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import React from 'react';
import './RowAmountOption.less';
import Big from 'big.js';
import { Button, FormInstance } from 'antd';
import { scaledBalance, UserAsset } from '../../models/UserAsset';

interface ValidatorPowerPercentBarProps {
form: FormInstance;
walletAsset: UserAsset;
style?;
}
const RowAmountOption: React.FC<ValidatorPowerPercentBarProps> = props => {
const { form, walletAsset, style } = props;

const onAmountOption = value => {
const optionAmount = Big(scaledBalance(walletAsset)).times(value);
form.setFieldsValue({
amount: Number(optionAmount.toNumber()),
});
};

return (
<div className="ant-row ant-form-item row-amount-option" style={style}>
<Button
onClick={() => {
onAmountOption(0.25);
}}
>
25%
</Button>
<Button
onClick={() => {
onAmountOption(0.5);
}}
>
50%
</Button>
<Button
onClick={() => {
onAmountOption(0.75);
}}
>
75%
</Button>
<Button
onClick={() => {
onAmountOption(1);
}}
>
ALL
</Button>
</div>
);
};

export default RowAmountOption;
8 changes: 5 additions & 3 deletions src/config/StaticAssets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,19 +69,21 @@ export const CRONOS_ASSET = (walletConfig: WalletConfig) => {
: 'https://cronos.crypto.org/explorer/tx',
address: isTestnet
? 'https://cronos.crypto.org/explorer/testnet3/address'
: 'https://cronos.crypto.org/explorer/tx',
: 'https://cronos.crypto.org/explorer/address',
},
explorerUrl: isTestnet
? 'https://cronos.crypto.org/explorer/testnet3'
: 'https://cronos.crypto.org/explorer',
chainId: isTestnet ? '338' : 'TO_BE_DECIDED',
chainId: isTestnet ? '338' : '25',
fee: { gasLimit: `50000`, networkFee: `20000000000` },
indexingUrl: isTestnet
? 'https://cronos.crypto.org/explorer/testnet3/api'
: 'https://cronos.crypto.org/explorer/api',
isLedgerSupportDisabled: false,
isStakingDisabled: false,
nodeUrl: isTestnet ? 'https://cronos-testnet-3.crypto.org:8545/' : 'TO_BE_DECIDED',
nodeUrl: isTestnet
? 'https://cronos-testnet-3.crypto.org:8545/'
: 'https://evm-cronos.crypto.org',
memoSupportDisabled: true,
};

Expand Down
4 changes: 2 additions & 2 deletions src/config/StaticConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ export const MODERATION_CONFIG_FILE_URL =
export const UNBLOCKING_PERIOD_IN_DAYS = {
UNDELEGATION: {
MAINNET: '28',
OTHERS: '21',
OTHERS: '28',
},
REDELEGATION: {
MAINNET: '28',
OTHERS: '21',
OTHERS: '28',
},
};

Expand Down
41 changes: 35 additions & 6 deletions src/language/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"general.passwordForm.password.label": "App Password",
"general.passwordForm.password.placeholder": "Enter App Password",
"general.passwordForm.password.error1": "The password should be at least 8 character containing a letter, a number and a special character",
"general.passwordForm.password.error2": "Please increase password complexity to \"good\" or above",
"general.passwordForm.passwordConfirm.label": "Confirm App Password",
"general.passwordForm.passwordConfirm.placeholder": "Confirm App Password",
"general.passwordForm.passwordConfirm.error1": "The Confirm App Password doesn't match",
Expand Down Expand Up @@ -74,8 +75,10 @@
"general.sessionLockModal.errorSelfDestruct": "Attempt #*N*. *break* Wallet will self-destruct after #T# more wrong attempts.",
"general.sessionLockModal.success": "Wallet unlocked successfully!",
"general.sessionLockModal.okButton": "Unlock wallet",
"general.sessionLockModal.notification.message": "App Locked",
"general.sessionLockModal.notification.description": "The app will be locked shortly",
"general.sessionLockModal.notification.message1": "App Locked",
"general.sessionLockModal.notification.description1": "The app will be locked shortly",
"general.sessionLockModal.notification.message2": "App Unlocked",
"general.sessionLockModal.notification.description2": "The app is successfully unlocked.",
"general.successModalPopup.title": "Success!",
"general.successModalPopup.timeout.description": "The transaction timed out but it will be included in the subsequent blocks",
"general.successModalPopup.nodeConnect.description": "Your node is connected!",
Expand Down Expand Up @@ -170,12 +173,12 @@
"create.ledgerModalPopup.tendermintAddress.title2": "Connect your Ledger Device",
"create.ledgerModalPopup.tendermintAddress.description1": "Your Ledger device has been connected successfully.",
"create.ledgerModalPopup.tendermintAddress.description2": "Please confirm connection by opening Crypto.org App on your Ledger Device",
"create.ledgerModalPopup.tendermintAddress.description3": "Please open the below App in your Ledger Device",
"create.ledgerModalPopup.tendermintAddress.description3": "Please open the below App on your Ledger Device",
"create.ledgerModalPopup.evmAddress.title1": "Success!",
"create.ledgerModalPopup.evmAddress.title2": "Connect your Ledger Device",
"create.ledgerModalPopup.evmAddress.description1": "Your Ledger device has been connected successfully.",
"create.ledgerModalPopup.evmAddress.description2": "Please confirm connection by opening Ethereum App on your Ledger Device",
"create.ledgerModalPopup.evmAddress.description3": "Please open the below App in your Ledger Device",
"create.ledgerModalPopup.evmAddress.description3": "Please open the below App on your Ledger Device",
"restore.title1": "Restore Wallet",
"restore.title2": "Custom Configuration",
"restore.slogan1": "Create a name and select the network for your wallet.",
Expand Down Expand Up @@ -342,8 +345,9 @@
"bridge.form.receiving": "Receiving",
"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 safe, fast and most secure way to transfer assets to and from Cronos.",
"bridge.step0.description": "The safest, fastest, and most secure way to transfer assets to and from Cronos.",
"bridge.step1.title": "Confirmation",
"bridge.step1.notice1": "Please make sure you have sufficient balance for Bridge Transaction Fee. ",
"bridge.step2.title": "Bridge Transaction",
"bridge.deposit.complete.title": "Deposit of {{amount}} {{symbol}} is completed",
"bridge.deposit.transactionID": "Transaction Hash",
Expand Down Expand Up @@ -398,6 +402,8 @@
"staking.validatorList.table.currentTokens": "Voting Power",
"staking.validatorList.table.currentCommissionRate": "Commission",
"staking.validatorList.table.cumulativeShares": "Cumulative Shares",
"staking.validatorList.table.validatorUptime": "Uptime",
"staking.validatorList.table.validatorApy": "APY",
"staking.validatorList.table.action": "Action",
"staking.formWithdralStakingReward.table.validatorName": "Name",
"staking.formWithdralStakingReward.table.rewardAmount": "Reward Amount",
Expand Down Expand Up @@ -578,5 +584,28 @@
"settings.clearStorage.modal.warning": "Are you sure you want to clear the storage? If you have not backed up your wallet mnemonic phrase, you will result in losing your funds forever.",
"settings.clearStorage.modal.disclaimer": "I understand that the only way to regain access is by restoring wallet mnemonic phrase.",
"settings.clearStorage.modal.form1.clear.label": "Please enter",
"settings.clearStorage.modal.form1.clear.error1": "Please enter"
"settings.clearStorage.modal.form1.clear.error1": "Please enter",
"settings.addressBook.manageAddress": "Manage Addresses",
"settings.addressBook.editAddress": "Edit Address",
"settings.addressBook.addAddress": "Add Address",
"settings.addressBook.message.updateFailed": "Update address failed.",
"settings.addressBook.message.addressUpdated": "Address has been updated.",
"settings.addressBook.message.addFailed": "Add address failed.",
"settings.addressBook.message.addressAdded": "Address has been added.",
"settings.addressBook.form.addressName": "Address Name",
"settings.addressBook.form.enterAddressName": "Enter address name",
"settings.addressBook.form.alreadExists": "Address already exists",
"settings.addressBook.form.enterAddress": "Enter address",
"settings.addressBook.form.update": "Update",
"settings.addressBook.addToAddressList": "Add this to my address list",
"settings.addressBook.willAddToAddressList": "This address will be added to your address list",
"settings.addressBook.edit": "Edit",
"settings.addressBook.remove": "Remove",
"settings.addressBook.hasBeenRemoved": "Address has been removed",
"settings.addressBook.message.removeFailed": "Remove address failed",
"settings.addressBook.removeAddress": "Remove Address",
"settings.addressBook.removeConfirm": "Are you sure you want to remove?",
"settings.addressBook.addNewAddress": "Add new address",
"settings.addressBook.title": "Address Book",
"settings.addressBook.address": "Address"
}
4 changes: 2 additions & 2 deletions src/language/fr-FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
"general.sessionLockModal.error": "Le mot de passe saisi est incorrect. Réessayer encore",
"general.sessionLockModal.success": "Portefeuille décryption réussi!",
"general.sessionLockModal.okButton": "Décrypter le portefeuille",
"general.sessionLockModal.notification.message": "앱 잠김",
"general.sessionLockModal.notification.description": "앱이 곧 잠깁니다.",
"general.sessionLockModal.notification.message1": "앱 잠김",
"general.sessionLockModal.notification.description1": "앱이 곧 잠깁니다.",
"general.successModalPopup.title": "Réussite!",
"general.successModalPopup.nodeConnect.description": "Votre node est connecté!",
"general.successModalPopup.createWallet.button": "Créer un portefeuille",
Expand Down
Loading

0 comments on commit 7bb10b7

Please sign in to comment.