diff --git a/docs/src/components/UploadKit/index.tsx b/docs/src/components/UploadKit/index.tsx index 0bcbad9..e0001c3 100644 --- a/docs/src/components/UploadKit/index.tsx +++ b/docs/src/components/UploadKit/index.tsx @@ -38,7 +38,7 @@ const uploadOptions: UploadKitOptions = { operatorAddress: '0x89A1CC91B642DECbC4789474694C606E0E0c420b', endpoint: 'https://gnfd-testnet-sp1.bnbchain.org', }, - visibility: 'VISIBILITY_TYPE_PRIVATE', + visibility: 'VISIBILITY_TYPE_PUBLIC_READ', }; export default function App() { diff --git a/examples/uploadkit-with-nextjs-rainbowkit/src/app/providers.tsx b/examples/uploadkit-with-nextjs-rainbowkit/src/app/providers.tsx index eefe095..afaae2b 100644 --- a/examples/uploadkit-with-nextjs-rainbowkit/src/app/providers.tsx +++ b/examples/uploadkit-with-nextjs-rainbowkit/src/app/providers.tsx @@ -32,7 +32,7 @@ const wagmiConfig = createConfig({ const uploadOptions: UploadKitOptions = { client: client, - visibility: 'VISIBILITY_TYPE_PRIVATE', + visibility: 'VISIBILITY_TYPE_PUBLIC_READ', }; export default function Providers({ children }: { children: React.ReactNode }) { diff --git a/examples/uploadkit-with-nextjs-walletkit/src/app/providers.tsx b/examples/uploadkit-with-nextjs-walletkit/src/app/providers.tsx index 9a0255c..83ef947 100644 --- a/examples/uploadkit-with-nextjs-walletkit/src/app/providers.tsx +++ b/examples/uploadkit-with-nextjs-walletkit/src/app/providers.tsx @@ -33,7 +33,7 @@ const options: WalletKitOptions = { const uploadOptions: UploadKitOptions = { client: client, - visibility: 'VISIBILITY_TYPE_PRIVATE', + visibility: 'VISIBILITY_TYPE_PUBLIC_READ', }; export default function Providers({ children }: { children: React.ReactNode }) { diff --git a/examples/uploadkit-with-remix-rainbowkit/app/root.tsx b/examples/uploadkit-with-remix-rainbowkit/app/root.tsx index 057d7c2..604412b 100644 --- a/examples/uploadkit-with-remix-rainbowkit/app/root.tsx +++ b/examples/uploadkit-with-remix-rainbowkit/app/root.tsx @@ -58,7 +58,7 @@ export const loader: LoaderFunction = () => { const uploadOptions: UploadKitOptions = { client: client, - visibility: 'VISIBILITY_TYPE_PRIVATE', + visibility: 'VISIBILITY_TYPE_PUBLIC_READ', }; export default function App() { const { ENV } = useLoaderData(); diff --git a/packages/uploadkit/dev/App.tsx b/packages/uploadkit/dev/App.tsx index c7f2ac3..e798715 100644 --- a/packages/uploadkit/dev/App.tsx +++ b/packages/uploadkit/dev/App.tsx @@ -50,7 +50,7 @@ const uploadOptions: UploadKitOptions = { operatorAddress: '0x89A1CC91B642DECbC4789474694C606E0E0c420b', endpoint: 'https://gnfd-testnet-sp1.bnbchain.org', }, - visibility: 'VISIBILITY_TYPE_PRIVATE', + visibility: 'VISIBILITY_TYPE_PUBLIC_READ', // onError: console.log, }; @@ -64,7 +64,7 @@ export default function App() {
- +
diff --git a/packages/uploadkit/src/components/UploadButton/index.tsx b/packages/uploadkit/src/components/UploadButton/index.tsx index 3c568d9..e529fbc 100644 --- a/packages/uploadkit/src/components/UploadButton/index.tsx +++ b/packages/uploadkit/src/components/UploadButton/index.tsx @@ -30,16 +30,13 @@ export const UploadButton = (props: ButtonProps) => { const { totalFee } = useTotalFee(); const { address, connector } = useAccount(); const { - options: { seedString, sp, visibility, bucketName, onError }, + options: { client, seedString, sp, visibility, bucketName, onError }, } = useUploadKitContext(); const { isGnfd, uploadButtonDisabled } = useUploadDisable(); const { state: { loading }, dispatch, } = useUpload(); - const { - options: { client }, - } = useUploadKitContext(); const setLoading = (show: boolean) => { dispatch({ type: 'SET_IS_LOADING',