Skip to content

Commit

Permalink
Remove the use of the token object from the response of the `api/v2/t…
Browse files Browse the repository at this point in the history
…okens/<address>/holders` endpoint. (#1696)

Fixes #1690
  • Loading branch information
tom2drum authored Mar 18, 2024
1 parent c4f6b56 commit 754a976
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 12 deletions.
6 changes: 0 additions & 6 deletions mocks/tokens/tokenHolders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,14 @@ import type { TokenHolders } from 'types/api/token';

import { withName, withoutName } from 'mocks/address/address';

import { tokenInfoERC1155a, tokenInfoERC20a } from './tokenInfo';

export const tokenHoldersERC20: TokenHolders = {
items: [
{
address: withName,
token: tokenInfoERC20a,
value: '107014805905725000000',
},
{
address: withoutName,
token: tokenInfoERC20a,
value: '207014805905725000000',
},
],
Expand All @@ -27,13 +23,11 @@ export const tokenHoldersERC1155: TokenHolders = {
items: [
{
address: withName,
token: tokenInfoERC1155a,
value: '107014805905725000000',
token_id: '12345',
},
{
address: withoutName,
token: tokenInfoERC1155a,
value: '207014805905725000000',
token_id: '12345',
},
Expand Down
2 changes: 0 additions & 2 deletions stubs/token.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,11 @@ export const TOKEN_COUNTERS: TokenCounters = {

export const TOKEN_HOLDER_ERC_20: TokenHolder = {
address: ADDRESS_PARAMS,
token: TOKEN_INFO_ERC_20,
value: '1021378038331138520',
};

export const TOKEN_HOLDER_ERC_1155: TokenHolder = {
address: ADDRESS_PARAMS,
token: TOKEN_INFO_ERC_1155,
token_id: '12345',
value: '1021378038331138520',
};
Expand Down
5 changes: 1 addition & 4 deletions types/api/token.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,9 @@ export type TokenHolderBase = {
value: string;
}

export type TokenHolderERC20ERC721 = TokenHolderBase & {
token: TokenInfo<'ERC-20'> | TokenInfo<'ERC-721'>;
}
export type TokenHolderERC20ERC721 = TokenHolderBase

export type TokenHolderERC1155 = TokenHolderBase & {
token: TokenInfo<'ERC-1155'>;
token_id: string;
}

Expand Down

0 comments on commit 754a976

Please sign in to comment.