Skip to content

Commit

Permalink
Malformed nft (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
gane5h authored Dec 3, 2023
1 parent 31b6538 commit 69f729e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,8 @@ export const NFTWalletTokenListView: React.FC<NFTWalletTokenListViewProps> = ({
<Card className="w-[230px] rounded border">
<CardContent>
<img
className={`block h-[10rem] w-full rounded-t ${
it.external_data
? "object-cover"
: "p-2"
}`}
src={
it.external_data
? it.external_data.image_512
: "https://www.datocms-assets.com/86369/1685489960-nft.svg"
}
className={`block h-[10rem] w-full rounded-t ${it.external_data?.image_512 ? "object-cover" : "p-2"}`}
src={it.external_data?.image_512 ? it.external_data.image_512 : "https://www.datocms-assets.com/86369/1685489960-nft.svg"}
onError={(e) => {
e.currentTarget.classList.remove(
"object-cover"
Expand Down Expand Up @@ -151,8 +143,12 @@ export const NFTWalletTokenListView: React.FC<NFTWalletTokenListViewProps> = ({
/>
),
Some: (result) => {
let nft_length = 0;
for (const i of result) {
nft_length += i.nft_data.length;
}
return (
<span>{result.length}</span>
<span>{nft_length}</span>
);
},
})}{" "}
Expand Down
2 changes: 2 additions & 0 deletions src/utils/store/Goldrush.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import type { ReactNode } from "react";
import { createContext, useContext, useMemo } from "react";
import { updateTheme } from "../functions";
import { CovalentClient } from "@covalenthq/client-sdk";
import { Toaster } from "@/components/ui/toaster";

interface GoldrushContextType {
covalentClient: CovalentClient;
Expand Down Expand Up @@ -149,6 +150,7 @@ export const GoldRushProvider: React.FC<GoldRushProviderProps> = ({
return (
<GoldRushContext.Provider value={{ covalentClient: covalentClient }}>
{children}
<Toaster />
</GoldRushContext.Provider>
);
};
Expand Down

0 comments on commit 69f729e

Please sign in to comment.