Skip to content
This repository has been archived by the owner on Jun 3, 2022. It is now read-only.

Commit

Permalink
Fix tests (#800)
Browse files Browse the repository at this point in the history
  • Loading branch information
monstrobishi authored Feb 22, 2022
1 parent 1712760 commit 5d41bd7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 14 deletions.
23 changes: 11 additions & 12 deletions packages/whale-api-client/__tests__/api/poolpairs.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ describe('poolswap 24h', () => {
},
volume: {
d30: 11.028806333434215,
h24: 11.028806333434215
h24: 10.146501826759481
}
})
})
Expand Down Expand Up @@ -601,7 +601,7 @@ describe('poolswap aggregated', () => {
amounts: { 2: '9.50000000' }
},
block: expect.any(Object),
bucket: 1645660800,
bucket: expect.any(Number),
id: expect.any(String),
key:
'10-86400'
Expand All @@ -613,7 +613,7 @@ describe('poolswap aggregated', () => {
}
},
block: expect.any(Object),
bucket: 1645574400,
bucket: expect.any(Number),
id: expect.any(String),
key: '10-86400'
},
Expand All @@ -622,37 +622,36 @@ describe('poolswap aggregated', () => {
amounts: {}
},
block: expect.any(Object),
bucket: 1645401600,
bucket: expect.any(Number),
id: expect.any(String),
key: '10-86400'
}

])

const hourAggregated: ApiPagedResponse<PoolSwapAggregated> = await client.poolpairs.listPoolSwapAggregates('10', PoolSwapAggregatedInterval.ONE_HOUR, 10)
const hourAggregated: ApiPagedResponse<PoolSwapAggregated> = await client.poolpairs.listPoolSwapAggregates('10', PoolSwapAggregatedInterval.ONE_HOUR, 3)
expect([...hourAggregated]).toStrictEqual([
{
aggregated: { amounts: { 2: '9.50000000' } },
aggregated: { amounts: { 2: '1.10000000' } },
block: expect.any(Object),
bucket: 1645660800,
bucket: expect.any(Number),
id: expect.any(String),
key: '10-3600'
},
{
aggregated: { amounts: { 2: '29.00000000' } },
aggregated: { amounts: { 2: '1.20000000' } },
block: expect.any(Object),
bucket: 1645574400,
bucket: expect.any(Number),
id: expect.any(String),
key: '10-3600'
},
{
aggregated: { amounts: {} },
aggregated: { amounts: { 2: '1.20000000' } },
block: expect.any(Object),
bucket: 1645444800,
bucket: expect.any(Number),
id: expect.any(String),
key: '10-3600'
}

])
})
})
4 changes: 2 additions & 2 deletions src/module.indexer/model/dftx/pool.pair.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ describe('poolswap 30d', () => {
{
id: expect.any(String),
key: '2-86400',
bucket: 1645660800,
bucket: expect.any(Number),
aggregated: {
amounts: {
1: '23.90000000'
Expand All @@ -399,7 +399,7 @@ describe('poolswap 30d', () => {
{
id: expect.any(String),
key: '2-86400',
bucket: 1645574400,
bucket: expect.any(Number),
aggregated: {
amounts: {
1: '29.00000000'
Expand Down

0 comments on commit 5d41bd7

Please sign in to comment.