Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] let me filter on token meta, and program loader #240

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/renderer/components/ProgramChangeView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ export enum KnownProgramID {
SystemProgram = '11111111111111111111111111111111',
SerumDEXV3 = '9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin',
TokenProgram = 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA',
MetaplexTokenMetadata = 'metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s',
BPFUpgradeableLoader = 'BPFLoaderUpgradeab1e11111111111111111111111',
NativeLoader = 'NativeLoader1111111111111111111111111111111',
}

interface PinnedAccountMap {
Expand Down Expand Up @@ -230,7 +233,13 @@ function ProgramChangeView() {
{Object.entries(KnownProgramID).map(([name, value]) => (
<Chip
key={name}
onClick={() => setProgramID(value)}
onClick={() => {
setProgramID(value);
// TODO: need to reset the counts use to generate getTopAccounts when the user switches filter
// TODO: or make the count structure contain what its counting, so the user can switch and not lose those aggregations.
// TODO: which thus also supports the idea that count&max aggregations should be like db indexs - sortes separately from the original data.
setDisplayList([]);
}}
active={programID === value}
>
{name}
Expand Down