Skip to content

Commit

Permalink
fix getUserOwnedTokens (#477)
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenmarcus authored Feb 19, 2024
1 parent 87f9f9a commit 2052c68
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/data/src/api/userOwnedTokens/userOwnedTokens.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ import { getUserOwnedTokens } from './userOwnedTokens';


const props = {
accountId: 'mintbase1.near',
accountId: 'rub3n.testnet',
filters: {
orderBy: OWNED_MINTED_ORDER_BY.MINTED,
limit: 10,
offset: 0,
listedFilter: true,
},
network: 'mainnet' as Network,
network: 'testnet' as Network,
};


Expand Down
3 changes: 2 additions & 1 deletion packages/data/src/api/userOwnedTokens/userOwnedTokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ export const getUserOwnedTokens = async ({

const networkFinal = network || mbjs.keys.network;

const useHost = networkFinal
const useHost = networkFinal === 'testnet'
? META_SERVICE_HOST_TESTNET
: META_SERVICE_HOST;


try {
const res = await fetch(`${useHost}/human/${accountId}/owned?offset=${offset}&limit=${limit}&orderBy=${orderBy}&listedFilter=${listedFilter}`, {
method: 'GET',
Expand Down

0 comments on commit 2052c68

Please sign in to comment.