Skip to content

Commit

Permalink
dep updates
Browse files Browse the repository at this point in the history
  • Loading branch information
awidearray committed Nov 10, 2024
1 parent 37fd59f commit 74e89aa
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
1 change: 0 additions & 1 deletion .babelrc

This file was deleted.

8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
"lint": "next lint"
},
"dependencies": {
"@babel/runtime": "^7.x",
"bs58": "^4.0.1",
"tslib": "^2.6.2",
"fastestsmallesttextencoderdecoder": "^1.0.22",
"@heroicons/react": "^1.0.5",
"@noble/ed25519": "^1.7.1",
"@solana/spl-token": "^0.4.9",
Expand Down Expand Up @@ -44,9 +48,9 @@
"eslint-config-next": "^13.1.5",
"postcss": "^8.4.5",
"tailwindcss": "^3.4.14",
"typescript": "^4.9.4"
"typescript": "^5.0.0"
},
"engines": {
"node": ">=16"
"node": "21.11"
}
}
18 changes: 18 additions & 0 deletions src/pages/credits.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,26 @@
import type { NextPage } from "next";
import Head from "next/head";
import CreditsView from "../views/credits";
import { PublicKey } from '@solana/web3.js';

const Credits: NextPage = (props) => {
// Add validation before creating PublicKey
const createSafePublicKey = (address: string | undefined): PublicKey | null => {
if (!address) return null;
try {
return new PublicKey(address);
} catch (e) {
console.error('Invalid public key:', e);
return null;
}
};

// Use the safe function when creating PublicKeys
const publicKey = createSafePublicKey(address);
if (!publicKey) {
return null; // or some error UI
}

return (
<div>
<Head>
Expand Down

0 comments on commit 74e89aa

Please sign in to comment.