Commit 754a976b authored by tom goriunov's avatar tom goriunov Committed by GitHub

Remove the use of the token object from the response of the...

Remove the use of the token object from the response of the `api/v2/tokens/<address>/holders` endpoint. (#1696)

Fixes #1690
parent c4f6b563
......@@ -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',
},
],
......@@ -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',
},
......
......@@ -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',
};
......
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment