# \[Archive\] Problem with Multi Chain Wallets provider

**URL:** <https://builder.metamask.io/t/archive-problem-with-multi-chain-wallets-provider/1340>\
**Category:** Embedded Wallets (Web3Auth)\
**Created:** [June 7, 2024, 5:47pm UTC](https://builder.metamask.io/t/archive-problem-with-multi-chain-wallets-provider/1340 "2024-06-07T17:47:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![TomTom](https://avatars.discourse-cdn.com/v4/letter/t/a9a28c/32.png) [@TomTom](https://builder.metamask.io/u/TomTom)\
**Post date:** [June 7, 2024, 5:47pm UTC](https://builder.metamask.io/t/archive-problem-with-multi-chain-wallets-provider/1340/1 "2024-06-07T17:47:40Z")

</div>

> **🏛 Archived Content from Web3Auth Community**
> 
> This topic was originally posted by **TomTom** on 6/7/2024.  
> This content has been migrated from our previous community forum to preserve valuable discussions.

* * *

Hello guys !

Currently trying to making work Multi Chain Wallets provider on the SDK Modal with NextJS by making my Context Provider Wrapper with my RPCs pass throught but It doesn’t work the way I I intended it unfortunately I might need some help on it 🙂

```typescript

"use client";
import { createContext, useContext, ReactNode } from “react”;
import { IProvider } from “@web3auth/base”;
import { useMultiChainStore } from “./useMultiChainProvider”;
import { Web3Auth } from “@web3auth/modal”;
interface MultiChainContextProps {
provider: IProvider | null;
loggedIn: boolean;
web3auth: Web3Auth | null;
login: () => Promise<void>;
logout: () => Promise<void>;
getAllAccounts: () => Promise<any>;
getAllBalances: () => Promise<any>;
getUserInfo: () => Promise<any>;
getAccounts: () => Promise<any>;
getBalance: () => Promise<any>;
sendTransaction: () => Promise<void>;
signMessage: () => Promise<void>;
}
const MultiChainContext = createContext<MultiChainContextProps | undefined>(undefined);
export const MultiChainProvider = ({ children }: { children: ReactNode }) => {
const multiChainStore = useMultiChainStore();
return (
<MultiChainContext.Provider value={multiChainStore}>
{children}
</MultiChainContext.Provider>
);
};
export const useMultiChain = (): MultiChainContextProps => {
const context = useContext(MultiChainContext);
if (!context) {
throw new Error(“useMultiChain must be used within a MultiChainProvider”);
}
return context;
};
import type {IProvider} from ‘@web3auth/base’
export default interface IRPC {

```

---

<div class="post-metadata">

**Author:** ![TomTom](https://avatars.discourse-cdn.com/v4/letter/t/a9a28c/32.png) [@TomTom](https://builder.metamask.io/u/TomTom)\
**Post date:** [June 7, 2024, 5:50pm UTC](https://builder.metamask.io/t/archive-problem-with-multi-chain-wallets-provider/1340/2 "2024-06-07T17:50:01Z")

</div>

HI !

Did you check our multichain example ?

 ![](https://github.githubassets.com/favicons/favicon.svg)

```
  <a href="https://github.com/Web3Auth/web3auth-pnp-examples/tree/main/web-no-modal-sdk/blockchain-connection-examples/multi-chain-no-modal-example" target="_blank" rel="noopener">github.com</a>

```

### [web3auth-pnp-examples/web-no-modal-sdk/blockchain-connection-examples/multi-chai...](https://github.com/Web3Auth/web3auth-pnp-examples/tree/main/web-no-modal-sdk/blockchain-connection-examples/multi-chain-no-modal-example)

Contribute to Web3Auth/web3auth-pnp-examples development by creating an account on GitHub.

Also there is a multichain guide: [Creating a Multichain Connection with Web3Auth and PnP no-modal SDK | Web3Auth](https://web3auth.io/docs/guides/pnp-no-modal-multichain)
