Skip to content

Commit 1aad103

Browse files
authored
Merge pull request #965 from crypto-com/dev
Internal Release v0.6.7
2 parents a04d898 + adafe1c commit 1aad103

File tree

9 files changed

+48
-43
lines changed

9 files changed

+48
-43
lines changed

CHANGELOG.md

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

77
*Released*
8+
## [v0.6.7] - 2022-01-28
9+
### Bug fixes
10+
- Incorrect delegation items
11+
- Missing address index on Standard Wallets
12+
- Remove unwanted Ledger notification popup on Standard Wallets
13+
814
## [v0.6.6] - 2022-01-26
915
### Additions
1016
- Full DApp Browser Support on Cronos

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "chain-desktop-wallet",
3-
"version": "0.6.6",
3+
"version": "0.6.7",
44
"description": "Crypto.com Chain Desktop Wallet App",
55
"repository": "github:crypto-com/chain-desktop-wallet",
66
"author": "Crypto.org <[email protected]>",
@@ -342,6 +342,7 @@
342342
"tar": "6.1.9",
343343
"glob-parent": "6.0.2",
344344
"json-schema": "0.4.0",
345-
"follow-redirects": "1.14.7"
345+
"follow-redirects": "1.14.7",
346+
"simple-get": "4.0.1"
346347
}
347348
}

src/pages/assets/components/FormSend.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ const FormSend: React.FC<FormSendProps> = props => {
127127

128128
const showPasswordInput = () => {
129129
if (decryptedPhrase || currentSession.wallet.walletType === LEDGER_WALLET_TYPE) {
130-
if (!isLedgerConnected) {
130+
if (!isLedgerConnected && currentSession.wallet.walletType === LEDGER_WALLET_TYPE) {
131131
ledgerNotification(currentSession.wallet, walletAsset!);
132132
}
133133
showConfirmationModal();

src/pages/governance/governance.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ const GovernancePage = () => {
110110

111111
const showPasswordInput = () => {
112112
if (decryptedPhrase || currentSession.wallet.walletType === LEDGER_WALLET_TYPE) {
113-
if (!isLedgerConnected) {
113+
if (!isLedgerConnected && currentSession.wallet.walletType === LEDGER_WALLET_TYPE) {
114114
ledgerNotification(currentSession.wallet, userAsset!);
115115
}
116116
showConfirmationModal();

src/pages/nft/nft.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ const convertNftTransfers = (allTransfers: NftAccountTransactionData[]) => {
130130

131131
return allTransfers.map((transfer, idx) => {
132132
const data: NftTransferTabularData = {
133-
key: `${idx}-${transfer.transactionHash}-${transfer.data.recipient}-${transfer.data.denomId}-${transfer.data.tokenId}`,
133+
key: `${idx}_${transfer.transactionHash}_${transfer.data.recipient}_${transfer.data.denomId}_${transfer.data.tokenId}`,
134134
transactionHash: transfer.transactionHash,
135135
messageType: getType(transfer),
136136
denomId: transfer.data.denomId,
@@ -280,7 +280,7 @@ const FormMintNft = () => {
280280

281281
const showPasswordInput = () => {
282282
if (decryptedPhrase || currentSession.wallet.walletType === LEDGER_WALLET_TYPE) {
283-
if (!isLedgerConnected) {
283+
if (!isLedgerConnected && currentSession.wallet.walletType === LEDGER_WALLET_TYPE) {
284284
ledgerNotification(currentSession.wallet, walletAsset!);
285285
}
286286
showConfirmationModal();
@@ -1085,7 +1085,7 @@ const NftPage = () => {
10851085

10861086
const showPasswordInput = () => {
10871087
if (decryptedPhrase || currentSession.wallet.walletType === LEDGER_WALLET_TYPE) {
1088-
if (!isLedgerConnected) {
1088+
if (!isLedgerConnected && currentSession.wallet.walletType === LEDGER_WALLET_TYPE) {
10891089
ledgerNotification(currentSession.wallet, walletAsset!);
10901090
}
10911091
showConfirmationModal();

src/pages/staking/staking.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ const FormDelegationRequest = props => {
206206

207207
const showPasswordInput = () => {
208208
if (decryptedPhrase || currentSession.wallet.walletType === LEDGER_WALLET_TYPE) {
209-
if (!isLedgerConnected) {
209+
if (!isLedgerConnected && currentSession.wallet.walletType === LEDGER_WALLET_TYPE) {
210210
ledgerNotification(currentSession.wallet, walletAsset!);
211211
}
212212
showConfirmationModal();
@@ -682,7 +682,7 @@ const FormDelegationOperations = props => {
682682

683683
const showPasswordInput = () => {
684684
if (decryptedPhrase || currentSession.wallet.walletType === LEDGER_WALLET_TYPE) {
685-
if (!isLedgerConnected) {
685+
if (!isLedgerConnected && currentSession.wallet.walletType === LEDGER_WALLET_TYPE) {
686686
ledgerNotification(currentSession.wallet, defaultAsset!);
687687
}
688688
showConfirmationModal();
@@ -796,10 +796,10 @@ const FormDelegationOperations = props => {
796796

797797
function convertDelegations(allDelegations: StakingTransactionData[], currentAsset: UserAsset) {
798798
return allDelegations
799-
.map(dlg => {
799+
.map((dlg, idx) => {
800800
const stakedAmount = getUIDynamicAmount(dlg.stakedAmount, currentAsset);
801801
const data: StakingTabularData = {
802-
key: dlg.validatorAddress + dlg.stakedAmount,
802+
key: `${idx}_${dlg.validatorAddress}_${dlg.stakedAmount}`,
803803
delegatorAddress: dlg.delegatorAddress,
804804
validatorAddress: dlg.validatorAddress,
805805
stakedAmountWithSymbol: `${stakedAmount} ${currentAsset.symbol}`,
@@ -1074,7 +1074,7 @@ const FormWithdrawStakingReward = () => {
10741074
) => {
10751075
return allRewards
10761076
.filter(reward => Big(reward.amount).gte(Big(0)))
1077-
.map(reward => {
1077+
.map((reward, idx) => {
10781078
const rewardAmount = getUIDynamicAmount(reward.amount, currentAsset);
10791079
const marketPrice =
10801080
currentMarketPrice && currentMarketPrice.price ? new Big(currentMarketPrice.price) : '';
@@ -1083,7 +1083,7 @@ const FormWithdrawStakingReward = () => {
10831083
? new Big(rewardAmount).times(marketPrice).toFixed(2)
10841084
: '';
10851085
const rewardData: RewardsTabularData = {
1086-
key: `${reward.validatorAddress}${reward.amount}`,
1086+
key: `${idx}_${reward.validatorAddress}${reward.amount}`,
10871087
rewardAmount: `${rewardAmount} ${currentAsset.symbol}`,
10881088
rewardMarketPrice:
10891089
rewardMarketPrice !== '' && currentMarketPrice
@@ -1138,7 +1138,7 @@ const FormWithdrawStakingReward = () => {
11381138

11391139
const showPasswordInput = (action: string) => {
11401140
if (decryptedPhrase || currentSession.wallet.walletType === LEDGER_WALLET_TYPE) {
1141-
if (!isLedgerConnected) {
1141+
if (!isLedgerConnected && currentSession.wallet.walletType === LEDGER_WALLET_TYPE) {
11421142
ledgerNotification(currentSession.wallet, walletAsset!);
11431143
return;
11441144
}
@@ -1679,10 +1679,10 @@ const StakingPage = () => {
16791679
) => {
16801680
return (
16811681
allUnbondingDelegations
1682-
.map(dlg => {
1682+
.map((dlg, idx) => {
16831683
const unbondingAmount = getUIDynamicAmount(dlg.unbondingAmount, currentAsset);
16841684
const data: UnbondingDelegationTabularData = {
1685-
key: `${dlg.validatorAddress}_${dlg.unbondingAmount}_${dlg.completionTime}`,
1685+
key: `${idx}_${dlg.validatorAddress}_${dlg.unbondingAmount}_${dlg.completionTime}`,
16861686
delegatorAddress: dlg.delegatorAddress,
16871687
validatorAddress: dlg.validatorAddress,
16881688
completionTime: new Date(dlg.completionTime).toString(),

src/pages/wallet/wallet.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ function WalletPage() {
179179
key: 'addressIndex',
180180
children: [
181181
{
182-
title: session?.wallet.addressIndex,
182+
title: session?.wallet.addressIndex.toString(),
183183
dataIndex: 'addressIndex',
184184
},
185185
],

src/storage/StorageService.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,14 @@ export class StorageService {
339339
},
340340
};
341341

342-
// await this.updateCommonAttributes()
342+
// Manually remove `staking` records first
343+
await this.db.commonTransactionStore.remove({
344+
walletId: stakingTransactions.walletId,
345+
txType: 'staking'
346+
}, {
347+
multi: true
348+
});
349+
343350
await this.insertCommonTransactionRecords(stakingTxRecords);
344351

345352
// Insert to common Attributes store
@@ -420,7 +427,7 @@ export class StorageService {
420427
type: 'staking',
421428
},
422429
);
423-
430+
424431
return {
425432
transactions: stakingTxRecord.map(tx => tx.txData),
426433
walletId,

yarn.lock

Lines changed: 15 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6326,12 +6326,12 @@ decompress-response@^3.2.0, decompress-response@^3.3.0:
63266326
dependencies:
63276327
mimic-response "^1.0.0"
63286328

6329-
decompress-response@^4.2.0:
6330-
version "4.2.1"
6331-
resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-4.2.1.tgz"
6332-
integrity sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw==
6329+
decompress-response@^6.0.0:
6330+
version "6.0.0"
6331+
resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-6.0.0.tgz#ca387612ddb7e104bd16d85aab00d5ecf09c66fc"
6332+
integrity sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==
63336333
dependencies:
6334-
mimic-response "^2.0.0"
6334+
mimic-response "^3.1.0"
63356335

63366336
dedent@^0.7.0:
63376337
version "0.7.0"
@@ -11287,10 +11287,10 @@ mimic-response@^1.0.0, mimic-response@^1.0.1:
1128711287
resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz"
1128811288
integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==
1128911289

11290-
mimic-response@^2.0.0:
11291-
version "2.1.0"
11292-
resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-2.1.0.tgz"
11293-
integrity sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA==
11290+
mimic-response@^3.1.0:
11291+
version "3.1.0"
11292+
resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-3.1.0.tgz#2d1d59af9c1b129815accc2c46a022a5ce1fa3c9"
11293+
integrity sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==
1129411294

1129511295
min-document@^2.19.0:
1129611296
version "2.19.0"
@@ -14389,7 +14389,7 @@ readonly-date@^1.0.0:
1438914389
resolved "https://registry.yarnpkg.com/readonly-date/-/readonly-date-1.0.0.tgz"
1439014390
integrity sha512-tMKIV7hlk0h4mO3JTmmVuIlJVXjKk3Sep9Bf5OH0O+758ruuVkUy2J9SttDLm91IEX/WHlXPSpxMGjPj4beMIQ==
1439114391

14392-
recoil-nexus@^0.3.15:
14392+
1439314393
version "0.3.15"
1439414394
resolved "https://registry.yarnpkg.com/recoil-nexus/-/recoil-nexus-0.3.15.tgz#82e9b916409aef53cf2b2cc2dbae26b331f1a893"
1439514395
integrity sha512-UrV1VWZskAa/bvLmLc/W/DN11GkL9WGrB5heAtgiz8XLWvyUFfJr20uM4c7YIsssO7g1zDfM4MfbAldbGYWMYQ==
@@ -15278,21 +15278,12 @@ simple-concat@^1.0.0:
1527815278
resolved "https://registry.yarnpkg.com/simple-concat/-/simple-concat-1.0.1.tgz"
1527915279
integrity sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==
1528015280

15281-
simple-get@^2.7.0:
15282-
version "2.8.1"
15283-
resolved "https://registry.npmjs.org/simple-get/-/simple-get-2.8.1.tgz"
15284-
integrity sha512-lSSHRSw3mQNUGPAYRqo7xy9dhKmxFXIjLjp4KHpf99GEH2VH7C3AM+Qfx6du6jhfUi6Vm7XnbEVEf7Wb6N8jRw==
15285-
dependencies:
15286-
decompress-response "^3.3.0"
15287-
once "^1.3.1"
15288-
simple-concat "^1.0.0"
15289-
15290-
simple-get@^3.0.3:
15291-
version "3.1.0"
15292-
resolved "https://registry.yarnpkg.com/simple-get/-/simple-get-3.1.0.tgz"
15293-
integrity sha512-bCR6cP+aTdScaQCnQKbPKtJOKDp/hj9EDLJo3Nw4y1QksqaovlW/bnptB6/c1e+qmNIDHRK+oXFDdEqBT8WzUA==
15281+
[email protected], simple-get@^2.7.0, simple-get@^3.0.3:
15282+
version "4.0.1"
15283+
resolved "https://registry.yarnpkg.com/simple-get/-/simple-get-4.0.1.tgz#4a39db549287c979d352112fa03fd99fd6bc3543"
15284+
integrity sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==
1529415285
dependencies:
15295-
decompress-response "^4.2.0"
15286+
decompress-response "^6.0.0"
1529615287
once "^1.3.1"
1529715288
simple-concat "^1.0.0"
1529815289

0 commit comments

Comments
 (0)