Skip to content

Commit

Permalink
Add heimdall backend url as env var
Browse files Browse the repository at this point in the history
  • Loading branch information
portdeveloper committed Apr 17, 2024
1 parent 8b222cc commit 59ede15
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/nextjs/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ NEXT_PUBLIC_POLYGON_ETHERSCAN_API_KEY=
NEXT_PUBLIC_ARBITRUM_ETHERSCAN_API_KEY=
NEXT_PUBLIC_SCROLL_ETHERSCAN_API_KEY=
NEXT_PUBLIC_BASE_ETHERSCAN_API_KEY=
NEXT_PUBLIC_HEIMDALL_URL=

NEXT_PUBLIC_ALCHEMY_API_KEY=
NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID=
2 changes: 1 addition & 1 deletion packages/nextjs/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ const Home: NextPage = () => {
const fetchAbiFromHeimdall = async (contractAddress: string) => {
setIsFetchingAbi(true);
try {
const response = await fetch(`https://heimdall-api.fly.dev/${network}/${contractAddress}`);
const response = await fetch(`https://${process.env.NEXT_PUBLIC_HEIMDALL_URL}/${network}/${contractAddress}`);
const abi = await response.json();
if (abi.length === 0) {
notification.error("Failed to fetch ABI from Heimdall. Please try again or enter ABI manually.");
Expand Down

0 comments on commit 59ede15

Please sign in to comment.