Skip to content

Commit ff07174

Browse files
committed
Lint
1 parent 870d9cb commit ff07174

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,4 @@ ENVIO_PASSWORD=testing
5757

5858
# Holdings History API (server-only)
5959
DATABASE_URL=
60+
HOLDINGS_TEST_WALLET_ADDRESS=

api/holdings/history.test.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { beforeEach, describe, expect, it, vi } from 'vitest'
33
const ensureSchemaInitializedMock = vi.fn()
44
const checkRateLimitMock = vi.fn()
55
const getHistoricalHoldingsChartMock = vi.fn()
6+
const TEST_WALLET_ADDRESS = process.env.HOLDINGS_TEST_WALLET_ADDRESS ?? '0x1111111111111111111111111111111111111111'
67

78
vi.mock('../lib/holdings', () => ({
89
ensureSchemaInitialized: ensureSchemaInitializedMock,
@@ -53,7 +54,7 @@ describe('holdings history route', () => {
5354

5455
it('returns zero-filled settled history for wallets that only have same-day activity', async () => {
5556
getHistoricalHoldingsChartMock.mockResolvedValue({
56-
address: '0xA7b6f3d18db39F65C8056d0892Af76c07d15Fc5a',
57+
address: 'TEST_WALLET_ADDRESS',
5758
periodDays: 365,
5859
timeframe: '1y',
5960
denomination: 'usd',
@@ -68,7 +69,7 @@ describe('holdings history route', () => {
6869
const req = {
6970
method: 'GET',
7071
query: {
71-
address: '0xA7b6f3d18db39F65C8056d0892Af76c07d15Fc5a'
72+
address: 'TEST_WALLET_ADDRESS'
7273
},
7374
headers: {}
7475
} as any
@@ -78,7 +79,7 @@ describe('holdings history route', () => {
7879

7980
expect(res.statusCode).toBe(200)
8081
expect(res.body).toEqual({
81-
address: '0xA7b6f3d18db39F65C8056d0892Af76c07d15Fc5a',
82+
address: 'TEST_WALLET_ADDRESS',
8283
version: 'all',
8384
denomination: 'usd',
8485
timeframe: '1y',

0 commit comments

Comments
 (0)