diff --git a/README.md b/README.md
index 37f7a896..00b9e4d9 100644
--- a/README.md
+++ b/README.md
@@ -1,8 +1,8 @@
@@ -87,41 +87,56 @@ Here's a full example to get you started. If you're using `next.js` versions `^1
Be sure to secure your key to prevent unauthorized use in the Covalent platform by restricting usage to specific URLs.
```tsx
-// 'use client';
-// If using Next.js, put your API key in a .env.local file
-
-
-
-
-
-
+'use client'
+import "@covalenthq/goldrush-kit/styles.css";
+import {
+ GoldRushProvider,
+ NFTWalletTokenListView,
+ TokenBalancesListView,
+ TokenTransfersListView,
+ AddressActivityListView,
+} from "@covalenthq/goldrush-kit";
+
+export default function GoldRushExample() {
+ return (
+
+
+
+
+
+
+
+
+ )
+}
+
```
## GoldRush Templates
diff --git a/package-lock.json b/package-lock.json
index 608b4814..bc4874cc 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,15 +1,15 @@
{
"name": "@covalenthq/goldrush-kit",
- "version": "0.2.7",
+ "version": "0.3.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@covalenthq/goldrush-kit",
- "version": "0.2.7",
+ "version": "0.3.1",
"license": "Apache-2.0",
"dependencies": {
- "@covalenthq/client-sdk": "^0.6.6",
+ "@covalenthq/client-sdk": "^0.7.3",
"@headlessui/react": "^1.7.17",
"@radix-ui/react-avatar": "^1.0.4",
"@radix-ui/react-checkbox": "^1.0.4",
@@ -33,7 +33,7 @@
},
"devDependencies": {
"@babel/core": "^7.23.2",
- "@covalenthq/client-sdk": "^0.7.2",
+ "@covalenthq/client-sdk": "^0.7.3",
"@storybook/addon-essentials": "^7.5.3",
"@storybook/addon-interactions": "^7.5.3",
"@storybook/addon-links": "^7.5.3",
@@ -2074,9 +2074,9 @@
}
},
"node_modules/@covalenthq/client-sdk": {
- "version": "0.7.2",
- "resolved": "https://registry.npmjs.org/@covalenthq/client-sdk/-/client-sdk-0.7.2.tgz",
- "integrity": "sha512-p8YEJh3pBMhmQErsfMZ7gxrvWHe5jnnQvCLsh7EhKjsErLwdjTxd7eL55f2Nk06ek9bD9b/bP8x4pXfVv4RzmA==",
+ "version": "0.7.3",
+ "resolved": "https://registry.npmjs.org/@covalenthq/client-sdk/-/client-sdk-0.7.3.tgz",
+ "integrity": "sha512-iteU8sSr2adt0Tb9N4H2FnYS6yySyUeUUICYC3QjSTmzGYLnEm0efOOt+NMzJqDUyrbG1+Vf1rDGIrmVfU70Nw==",
"dev": true,
"dependencies": {
"@rollup/plugin-commonjs": "^25.0.4",
diff --git a/package.json b/package.json
index 32b071ec..bae7298f 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"_id": "goldrush-kit@0.0.1",
"name": "@covalenthq/goldrush-kit",
- "version": "0.2.7",
+ "version": "0.3.2",
"types": "dist/index.d.ts",
"exports": {
".": {
@@ -78,14 +78,14 @@
"vite-plugin-dts": "^1.7.3",
"vite-plugin-lib-inject-css": "^1.3.0",
"vite-tsconfig-paths": "^4.2.1",
- "@covalenthq/client-sdk": "^0.7.2"
+ "@covalenthq/client-sdk": "^0.7.4"
},
"peerDependencies": {
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"dependencies": {
- "@covalenthq/client-sdk": "^0.6.6",
+ "@covalenthq/client-sdk": "^0.7.5",
"@headlessui/react": "^1.7.17",
"@radix-ui/react-avatar": "^1.0.4",
"@radix-ui/react-checkbox": "^1.0.4",
diff --git a/src/components/Organisms/NFTs/NFTCollectionTokenListView/NFTCollectionTokenListView.tsx b/src/components/Organisms/NFTs/NFTCollectionTokenListView/NFTCollectionTokenListView.tsx
index 8276b2dd..8d107d07 100644
--- a/src/components/Organisms/NFTs/NFTCollectionTokenListView/NFTCollectionTokenListView.tsx
+++ b/src/components/Organisms/NFTs/NFTCollectionTokenListView/NFTCollectionTokenListView.tsx
@@ -1,4 +1,7 @@
-import { GRK_SIZES } from "@/utils/constants/shared.constants";
+import {
+ GRK_SIZES,
+ allowedCacheChains,
+} from "@/utils/constants/shared.constants";
import { type Option, Some, None } from "@/utils/option";
import type {
MarketFloorPriceItem,
@@ -46,6 +49,8 @@ export const NFTCollectionTokenListView: React.FC<
const handleNftsToken = async () => {
setResult(None);
let response;
+
+ const cache = !allowedCacheChains.includes(chain_name);
try {
response =
await covalentClient.NftService.getTokenIdsForContractWithMetadataByPage(
@@ -54,6 +59,7 @@ export const NFTCollectionTokenListView: React.FC<
{
pageNumber: paginator.pageNumber,
pageSize: paginator.pageSize,
+ withUncached: cache,
}
);
setError({ error: false, error_message: "" });
diff --git a/src/components/Organisms/NFTs/NFTDetailView/NFTDetailView.tsx b/src/components/Organisms/NFTs/NFTDetailView/NFTDetailView.tsx
index 39b8a88d..e2f74c9c 100644
--- a/src/components/Organisms/NFTs/NFTDetailView/NFTDetailView.tsx
+++ b/src/components/Organisms/NFTs/NFTDetailView/NFTDetailView.tsx
@@ -7,7 +7,10 @@ import { type NFTDetailViewProps } from "@/utils/types/organisms.types";
import { type NftTokenContract } from "@covalenthq/client-sdk";
import { useEffect, useState } from "react";
import { Skeleton } from "@/components/ui/skeleton";
-import { GRK_SIZES } from "@/utils/constants/shared.constants";
+import {
+ GRK_SIZES,
+ allowedCacheChains,
+} from "@/utils/constants/shared.constants";
export const NFTDetailView: React.FC = ({
chain_name,
@@ -20,15 +23,18 @@ export const NFTDetailView: React.FC = ({
useEffect(() => {
let response;
+ const cache = !allowedCacheChains.includes(chain_name);
(async () => {
try {
response =
await covalentClient.NftService.getNftMetadataForGivenTokenIdForContract(
chain_name,
collection_address,
- token_id
+ token_id,
+ {
+ withUncached: cache,
+ }
);
-
setResult(new Some(response.data.items[0]));
} catch (error) {
console.error(
diff --git a/src/components/Organisms/NFTs/NFTWalletTokenListView/NFTWalletTokenListView.tsx b/src/components/Organisms/NFTs/NFTWalletTokenListView/NFTWalletTokenListView.tsx
index 1c0c5bea..7fd54b0b 100644
--- a/src/components/Organisms/NFTs/NFTWalletTokenListView/NFTWalletTokenListView.tsx
+++ b/src/components/Organisms/NFTs/NFTWalletTokenListView/NFTWalletTokenListView.tsx
@@ -1,4 +1,7 @@
-import { GRK_SIZES } from "@/utils/constants/shared.constants";
+import {
+ GRK_SIZES,
+ allowedCacheChains,
+} from "@/utils/constants/shared.constants";
import { type Option, Some, None } from "@/utils/option";
import type { ChainItem } from "@covalenthq/client-sdk";
import {
@@ -38,16 +41,6 @@ export const NFTWalletTokenListView: React.FC = ({
const handleNftsToken = async () => {
setResult(None);
const promises = chain_names.map(async (chain) => {
- const allowedCacheChains = [
- "bsc-mainnet",
- "eth-mainnet",
- "bsc-testnet",
- "eth-sepolia",
- "gnosis-mainnet",
- "gnosis-testnet",
- "matic-mainnet",
- "matic-mumbai",
- ];
const cache = !allowedCacheChains.includes(chain);
let response;
try {
diff --git a/src/static/grk-banner.png b/src/static/grk-banner.png
deleted file mode 100644
index 7e555780..00000000
Binary files a/src/static/grk-banner.png and /dev/null differ
diff --git a/src/static/grk-kit-banner.png b/src/static/grk-kit-banner.png
new file mode 100644
index 00000000..a5d20476
Binary files /dev/null and b/src/static/grk-kit-banner.png differ
diff --git a/src/utils/constants/shared.constants.ts b/src/utils/constants/shared.constants.ts
index 58831d57..b0c81a03 100644
--- a/src/utils/constants/shared.constants.ts
+++ b/src/utils/constants/shared.constants.ts
@@ -339,3 +339,14 @@ export enum CURRENCY {
USD,
NATIVE,
}
+
+export const allowedCacheChains = [
+ "bsc-mainnet",
+ "eth-mainnet",
+ "bsc-testnet",
+ "eth-sepolia",
+ "gnosis-mainnet",
+ "gnosis-testnet",
+ "matic-mainnet",
+ "matic-mumbai",
+];