Don't fetch token transaction history for accounts with many holdings (#12304)

This commit is contained in:
Justin Starry 2020-09-17 11:27:56 +08:00 committed by GitHub
parent 123e2a1cc1
commit 8d6af087a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -37,6 +37,12 @@ export function TokenHistoryCard({ pubkey }: { pubkey: PublicKey }) {
const tokens = ownedTokens.data?.tokens;
if (tokens === undefined || tokens.length === 0) return null;
if (tokens.length > 25) {
return (
<ErrorCard text="Token transaction history is not available for accounts with over 25 token accounts" />
);
}
return <TokenHistoryTable tokens={tokens} />;
}