From 6e7a21cc649bfbb9e99d27f8f7eabbdba51f4db0 Mon Sep 17 00:00:00 2001 From: armaniferrante Date: Thu, 10 Jun 2021 17:48:12 -0700 Subject: [PATCH] Update --- src/components/instructions/UnknownInstruction.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/instructions/UnknownInstruction.js b/src/components/instructions/UnknownInstruction.js index 3661eaab..5eade0d8 100644 --- a/src/components/instructions/UnknownInstruction.js +++ b/src/components/instructions/UnknownInstruction.js @@ -16,15 +16,15 @@ export default function UnknownInstruction({ instruction, onOpenAddress }) { const [anchorProgram, setAnchorProgram] = useState(null); const connection = useConnection(); const wallet = useWallet(); - const provider = new Provider(connection, wallet, {}); // Fetch the anchor IDL and generate a client. If the IDL isn't on chain, // do nothing. useEffect(() => { + const provider = new Provider(connection, wallet, {}); Program.at(instruction.programId, provider) .then(setAnchorProgram) .catch((err) => {}); - }, [instruction, setAnchorProgram, provider]); + }, [connection, wallet, instruction, setAnchorProgram]); // Format all the fields of the instruction. let formattedIx = null,