mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
Remove the use of the token object from the response of the api/v2/tokens/<address>/holders endpoint. (#1696)
Fixes #1690
This commit is contained in:
@@ -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',
|
||||
};
|
||||
|
||||
+1
-4
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user