Skip to content
This repository was archived by the owner on Aug 30, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/react.thirdwebsdkproviderprops.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ export interface ThirdwebSDKProviderProps extends Pick<ThirdwebProviderProps, "d
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [provider](./react.thirdwebsdkproviderprops.provider.md) | | ChainOrRpc \| SignerOrProvider | |
| [queryClient](./react.thirdwebsdkproviderprops.queryclient.md) | | QueryClient | |
| [signer?](./react.thirdwebsdkproviderprops.signer.md) | | Signer | <i>(Optional)</i> |

11 changes: 11 additions & 0 deletions docs/react.thirdwebsdkproviderprops.queryclient.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@thirdweb-dev/react](./react.md) &gt; [ThirdwebSDKProviderProps](./react.thirdwebsdkproviderprops.md) &gt; [queryClient](./react.thirdwebsdkproviderprops.queryclient.md)

## ThirdwebSDKProviderProps.queryClient property

<b>Signature:</b>

```typescript
queryClient: QueryClient;
```
2 changes: 2 additions & 0 deletions etc/react.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,8 @@ export interface ThirdwebSDKProviderProps extends Pick<ThirdwebProviderProps, "d
// (undocumented)
provider: ChainOrRpc | SignerOrProvider;
// (undocumented)
queryClient: QueryClient;
// (undocumented)
signer?: Signer;
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/react",
"version": "2.6.0-0",
"version": "2.6.0-1",
"repository": {
"type": "git",
"url": "git+https://github.com:thirdweb-dev/react.git"
Expand Down
31 changes: 17 additions & 14 deletions src/Provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -411,17 +411,16 @@ export const ThirdwebProvider = <
<ThirdwebConfigProvider
value={{ rpcUrlMap: _rpcUrlMap, supportedChains: _supporrtedChains }}
>
<QueryClientProvider client={queryClientWithDefault}>
<WagmiProvider {...wagmiProps}>
<ThirdwebSDKProviderWagmiWrapper
desiredChainId={desiredChainId}
sdkOptions={sdkOptionsWithDefaults}
storageInterface={storageInterface}
>
{children}
</ThirdwebSDKProviderWagmiWrapper>
</WagmiProvider>
</QueryClientProvider>
<WagmiProvider {...wagmiProps}>
<ThirdwebSDKProviderWagmiWrapper
queryClient={queryClientWithDefault}
desiredChainId={desiredChainId}
sdkOptions={sdkOptionsWithDefaults}
storageInterface={storageInterface}
>
{children}
</ThirdwebSDKProviderWagmiWrapper>
</WagmiProvider>
</ThirdwebConfigProvider>
);
};
Expand All @@ -433,6 +432,7 @@ export interface ThirdwebSDKProviderProps
> {
signer?: Signer;
provider: ChainOrRpc | SignerOrProvider;
queryClient: QueryClient;
}

const ThirdwebSDKProviderWagmiWrapper: React.FC<
Expand Down Expand Up @@ -472,6 +472,7 @@ export const ThirdwebSDKProvider: React.FC<
storageInterface,
provider,
signer,
queryClient,
children,
}) => {
const sdk = useMemo(() => {
Expand Down Expand Up @@ -499,9 +500,11 @@ export const ThirdwebSDKProvider: React.FC<
);

return (
<ThirdwebSDKContext.Provider value={ctxValue}>
{children}
</ThirdwebSDKContext.Provider>
<QueryClientProvider client={queryClient}>
<ThirdwebSDKContext.Provider value={ctxValue}>
{children}
</ThirdwebSDKContext.Provider>
</QueryClientProvider>
);
};

Expand Down