Skip to content

Commit

Permalink
remove idl parsing when loading programs
Browse files Browse the repository at this point in the history
  • Loading branch information
ngundotra committed Oct 16, 2024
1 parent 8e4589e commit 47d19a7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/providers/anchor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,10 @@ function useIdlFromAnchorProgramSeed(programAddress: string, url: string): Idl |
}

export function useAnchorProgram(programAddress: string, url: string): { program: Program | null; idl: Idl | null } {
const idlFromBinary = useIdlFromSolanaProgramBinary(programAddress);
// TODO(ngundotra): Rewrite this to be more efficient
// const idlFromBinary = useIdlFromSolanaProgramBinary(programAddress);
const idlFromAnchorProgram = useIdlFromAnchorProgramSeed(programAddress, url);
const idl = idlFromBinary ?? idlFromAnchorProgram;
const idl = idlFromAnchorProgram;
const program: Program<Idl> | null = useMemo(() => {
if (!idl) return null;
try {
Expand Down

0 comments on commit 47d19a7

Please sign in to comment.