Skip to content

Commit

Permalink
fix: update field with API change
Browse files Browse the repository at this point in the history
  • Loading branch information
Tien Nam Dao committed Oct 10, 2022
1 parent 7cbdc7c commit 39d5a7c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 26 deletions.
27 changes: 7 additions & 20 deletions project.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -267,26 +267,9 @@ interface Token {
}

interface AstraHolder {
address: {
contract_code: any
decompiled: boolean
fetched_coin_balance: {
value: string
}
fetched_coin_balance_block_number: number
gas_used: number
has_decompiled_code: any
hash: string
inserted_at: string
nonce: number
state: any
token_transfers_count: number
transactions_count: number
updated_at: string
verified: boolean
}
total_supply: string
tx_count: number
address: string
balance: string
txnCount: number
}

interface UseTokenHookData {
Expand All @@ -306,5 +289,9 @@ interface TokenResponse {

interface TopAstraHolderResponse {
hasNextPage: boolean
nextPageParams: {
offset: number
page: number
}
result: AstraHolder[]
}
10 changes: 4 additions & 6 deletions views/accounts/HolderRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,12 @@ export default function HolderRow({ index, account }: Props) {
>
<div className={clsx('text text-base contrast-color-70 text-center margin-right-lg')}>{index}</div>
<div className={clsx(styles.borderLeft, 'col-5 padding-left-lg block-ver-center')}>
<Typography.LinkText href={LinkMaker.token(account.address.hash)} className={['text', 'text-base']}>
{account.address.hash}
<Typography.LinkText href={LinkMaker.address(account.address)} className={['text', 'text-base']}>
{account.address}
</Typography.LinkText>
</div>
<div className={clsx(styles.borderLeft, 'col-5 padding-left-lg ')}>
<span className={clsx('money money-sm money-bold padding-right-xs')}>
{account.address.fetched_coin_balance.value}
</span>
<span className={clsx('money money-sm money-bold padding-right-xs')}>{account.balance}</span>
<span className={clsx(styles.currency, 'money money-sm money-bold')}>ASA</span>
</div>

Expand All @@ -39,7 +37,7 @@ export default function HolderRow({ index, account }: Props) {
'padding-left-lg text-center money money-xs contrast-color-70 block-ver-center col-2'
)}
>
{account.address.transactions_count || 0}
{account.txnCount}
</div>
</div>
)
Expand Down

0 comments on commit 39d5a7c

Please sign in to comment.