Skip to content

Commit 8fa6cc7

Browse files
committed
Fixing tests
1 parent c6c247c commit 8fa6cc7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/calls/fetch-balance-by-username.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export const fetchBalancesByUsername = async (username: string, tokenType?: stri
1717
const addresses = userMetadata.addresses || [];
1818

1919
for (const address of addresses) {
20-
const balancesInAddress = await fetchBalancesForAddress(address, tokenType);
20+
const balancesInAddress = await fetchBalancesForAddress(address, tokenType, manual);
2121
response = [
2222
...response,
2323
...balancesInAddress

src/tests/api.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,19 +113,19 @@ describe("API test", () => {
113113
});
114114

115115
test("Fetch balances for user address", async () => {
116-
const balances = await fetchBalancesForAddress('6LL7EU-CIVLSIYajnFelAQi6Uefv4lqrZBcv9bNwxFI');
116+
const balances = await fetchBalancesForAddress('6LL7EU-CIVLSIYajnFelAQi6Uefv4lqrZBcv9bNwxFI', undefined, true);
117117
const hasArconf = balances.some((item) => item.name === 'ArCoNFT-01 Edition 100' && item.balance >= 1);
118118
expect(hasArconf).toBeTruthy();
119119
});
120120

121121
test("Fetch balances for user address with filter type", async () => {
122-
const balances = await fetchBalancesForAddress('6LL7EU-CIVLSIYajnFelAQi6Uefv4lqrZBcv9bNwxFI', 'art');
122+
const balances = await fetchBalancesForAddress('6LL7EU-CIVLSIYajnFelAQi6Uefv4lqrZBcv9bNwxFI', 'art', true);
123123
const hasArconf = balances.some((item) => item.name === 'ArCoNFT-01 Edition 100' && item.balance >= 1);
124124
expect(hasArconf).toBeTruthy();
125125
});
126126

127127
test("Fetch balances given a username", async () => {
128-
const balances = await fetchBalancesByUsername('t8')
128+
const balances = await fetchBalancesByUsername('t8', undefined, true)
129129
const hasArVerify = balances?.some((item) => item.contractId === 'f6lW-sKxsc340p8eBBL2i_fnmSI_fRSFmkqvzqyUsRs');
130130
expect(hasArVerify).toBeTruthy();
131131
});

0 commit comments

Comments
 (0)