Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
armaniferrante committed Jun 11, 2021
1 parent fe45856 commit 6e7a21c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/instructions/UnknownInstruction.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 6e7a21c

Please sign in to comment.