Skip to content

Commit b0f32a5

Browse files
authored
Merge pull request #1378 from crypto-com/dev
Internal Release v1.4.3
2 parents 3040706 + f291b78 commit b0f32a5

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed

CHANGELOG.md

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

77
*Released*
8+
## [v1.4.3] - 2023-09-13
9+
### Bug Fixes
10+
- Fix malfunctioned Staking services
811
## [v1.4.2] - 2023-07-19
912
### Additions
1013
- Security enhancement & package dependencies bump

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "chain-desktop-wallet",
3-
"version": "1.4.2",
3+
"version": "1.4.3",
44
"description": "Crypto.com DeFi Desktop Wallet App",
55
"repository": "github:crypto-com/chain-desktop-wallet",
66
"author": "Crypto.com <contact@crypto.com>",

src/service/rpc/ChainIndexingAPI.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ describe('Testing ChainIndexingApi', () => {
142142
it('should return estimated rewards for a user account, , apy = 10%, period = 12 Months', async () => {
143143
const nodeRpcService = ChainIndexingAPI.init('https://crypto.org/explorer/api/v1');
144144
moxios.wait(() => {
145-
const validatorListReq = moxios.requests.get('get', 'validators?limit=1000000');
145+
const validatorListReq = moxios.requests.get('get', 'validators?limit=1000');
146146
const accountInfoReq = moxios.requests.get(
147147
'get',
148148
'accounts/cro1gaf3jqqzvrxvgc4u4vr6x0tlf6kcm703zqa34a',
@@ -327,7 +327,7 @@ describe('Testing ChainIndexingApi', () => {
327327
it('should return estimated rewards for a user account, apy = 10%, period = 6 Months', async () => {
328328
const nodeRpcService = ChainIndexingAPI.init('https://crypto.org/explorer/api/v1');
329329
moxios.wait(() => {
330-
const validatorListReq = moxios.requests.get('get', 'validators?limit=1000000');
330+
const validatorListReq = moxios.requests.get('get', 'validators?limit=1000');
331331
const accountInfoReq = moxios.requests.get(
332332
'get',
333333
'accounts/cro1gaf3jqqzvrxvgc4u4vr6x0tlf6kcm703zqa34a',

src/service/rpc/ChainIndexingAPI.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ import { croNftApi, MintByCDCRequest } from './NftApi';
3535
import { splitToChunks } from '../../utils/utils';
3636
import { UserAsset } from '../../models/UserAsset';
3737

38+
const VALIDATOR_FETCH_LIMIT = 1000;
39+
3840
export interface IChainIndexingAPI {
3941
fetchAllTransferTransactions(
4042
baseAssetSymbol: string,
@@ -167,7 +169,7 @@ export class ChainIndexingAPI implements IChainIndexingAPI {
167169
const transferListResponse = await this.axiosClient.get<TransferListResponse>(
168170
`/accounts/${address}/messages?order=height.desc&filter.msgType=${msgType.join(
169171
',',
170-
)}&limit=1000`,
172+
)}&limit=${VALIDATOR_FETCH_LIMIT}`,
171173
);
172174

173175
function getStatus(transfer: TransferResult) {
@@ -459,7 +461,7 @@ export class ChainIndexingAPI implements IChainIndexingAPI {
459461

460462
private async getValidatorDetails(validatorAddr: string) {
461463
const validatorList = await this.axiosClient.get<ValidatorListResponse>(
462-
'validators?limit=1000000',
464+
`validators?limit=${VALIDATOR_FETCH_LIMIT}`,
463465
);
464466

465467
if (validatorList.data.pagination.total_page > 1) {
@@ -481,9 +483,8 @@ export class ChainIndexingAPI implements IChainIndexingAPI {
481483

482484
public async getValidatorsDetail(validatorAddrList: string[]) {
483485
const recentBlocks = '100';
484-
const limit = '10000';
485486
const validatorList = await this.axiosClient.get<ValidatorListResponse>(
486-
`validators?recentBlocks=${recentBlocks}&limit=${limit}`,
487+
`validators?recentBlocks=${recentBlocks}&limit=${VALIDATOR_FETCH_LIMIT}`,
487488
);
488489

489490
if (validatorList.data.pagination.total_page > 1) {
@@ -501,7 +502,7 @@ export class ChainIndexingAPI implements IChainIndexingAPI {
501502

502503
public async getValidatorsAverageApy(validatorAddrList: string[]) {
503504
const validatorList = await this.axiosClient.get<ValidatorListResponse>(
504-
'validators?limit=1000000',
505+
`validators?limit=${VALIDATOR_FETCH_LIMIT}`,
505506
);
506507

507508
if (validatorList.data.pagination.total_page > 1) {

0 commit comments

Comments
 (0)