Skip to content

Commit d26c393

Browse files
committed
- fix invalid prop on Token Accounts
- more explicit prop naming
1 parent c37a1c1 commit d26c393

5 files changed

Lines changed: 13 additions & 13 deletions

File tree

src/layouts/TokenLayout/FailedTokenDetails.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@ import { PageState } from 'components';
22
import { faCoins } from 'icons/regular';
33

44
export const FailedTokenDetails = ({
5-
tokenId
5+
tokenIdentifier
66
}: {
7-
tokenId: string | undefined;
7+
tokenIdentifier: string | undefined;
88
}) => {
99
return (
1010
<PageState
1111
icon={faCoins}
1212
title='Unable to locate this token'
1313
description={
1414
<div className='px-spacer'>
15-
<span className='text-break-all'>{tokenId}</span>
15+
<span className='text-break-all'>{tokenIdentifier}</span>
1616
</div>
1717
}
1818
isError

src/layouts/TokenLayout/TokenLayout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export const TokenLayout = () => {
7777
}
7878

7979
if (failed) {
80-
return <FailedTokenDetails tokenId={identifier} />;
80+
return <FailedTokenDetails tokenIdentifier={identifier} />;
8181
}
8282

8383
if (loading) {

src/pages/TokenDetails/TokenAccounts.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ export const TokenDetailsAccounts = () => {
3131

3232
const fetchAccounts = () => {
3333
Promise.all([
34-
getTokenAccounts({ tokenId: identifier, page, size }),
35-
getTokenAccountsCount({ tokenId: identifier })
34+
getTokenAccounts({ token: identifier, page, size }),
35+
getTokenAccountsCount({ token: identifier })
3636
]).then(([tokenAccountsData, tokenAccountsCountData]) => {
3737
if (tokenAccountsData.success && tokenAccountsCountData.success) {
3838
setAccounts(tokenAccountsData.data);

src/pages/TokenDetails/TokenLockedAccounts.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export const TokenDetailsLockedAccounts = () => {
2020
const [isDataReady, setIsDataReady] = useState<boolean | undefined>();
2121

2222
const fetchTokenLockedAccounts = () => {
23-
getTokenSupply({ tokenId: identifier }).then(({ data, success }) => {
23+
getTokenSupply({ token: identifier }).then(({ data, success }) => {
2424
if (success && data?.lockedAccounts) {
2525
setTokenLockedAccounts(data.lockedAccounts);
2626
}

src/pages/TokenDetails/TokenTransactions.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export const TokenTransactions = () => {
1717
const { getTokenTransfers, getTokenTransfersCount } = useAdapter();
1818
const { id: activeNetworkId } = useSelector(activeNetworkSelector);
1919

20-
const { hash: tokenId } = useParams();
20+
const { hash: tokenIdentifier } = useParams();
2121

2222
const {
2323
fetchTransactions,
@@ -26,20 +26,20 @@ export const TokenTransactions = () => {
2626
isDataReady,
2727
dataChanged
2828
} = useFetchCustomTransfers({
29-
uuid: tokenId,
29+
uuid: tokenIdentifier,
3030
dataPromise: getTokenTransfers,
3131
dataCountPromise: getTokenTransfersCount,
3232
subscription: WebsocketSubcriptionsEnum.subscribeCustomTransfers,
3333
event: WebsocketEventsEnum.customTransferUpdate,
3434
filters: {
35-
token: tokenId
35+
token: tokenIdentifier
3636
},
37-
websocketConfig: { token: tokenId }
37+
websocketConfig: { token: tokenIdentifier }
3838
});
3939

4040
useEffect(() => {
4141
fetchTransactions();
42-
}, [activeNetworkId, tokenId]);
42+
}, [activeNetworkId, tokenIdentifier]);
4343

4444
useEffect(() => {
4545
fetchTransactions(Boolean(searchParams.toString()));
@@ -51,7 +51,7 @@ export const TokenTransactions = () => {
5151
<div className='col-12'>
5252
<TransactionsTable
5353
transactions={transactions}
54-
token={tokenId}
54+
token={tokenIdentifier}
5555
totalTransactions={totalTransactions}
5656
title={<TokenTabs />}
5757
dataChanged={dataChanged}

0 commit comments

Comments
 (0)