Skip to content

Commit

Permalink
remove metamask default
Browse files Browse the repository at this point in the history
  • Loading branch information
jinglescode committed Oct 17, 2024
1 parent 26d7c7f commit fbebbc3
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ function Right() {
example += ` label={"Connect a Wallet"}\n`;
example += ` isDark={isDark}\n`;
example += ` onConnected={afterConnectedWallet}\n`;
example += ` metamask={{ network: "preprod" }}\n`;
example += ` />\n`;
example += ` </>\n`;
example += ` );\n`;
Expand All @@ -150,7 +151,11 @@ function Right() {
code={example}
childrenAfterCodeFunctions={true}
>
<CardanoWallet label={"Connect a Wallet"} isDark={isDark} />
<CardanoWallet
label={"Connect a Wallet"}
isDark={isDark}
metamask={{ network: "preprod" }}
/>
</LiveCodeDemo>
);
}
4 changes: 1 addition & 3 deletions packages/mesh-react/src/cardano-wallet/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ export const CardanoWallet = ({
label = "Connect Wallet",
onConnected = undefined,
isDark = false,
metamask = {
network: "preprod",
},
metamask = undefined,
extensions = [],
}: ButtonProps) => {
const [isDarkMode, setIsDarkMode] = useState(false);
Expand Down
7 changes: 2 additions & 5 deletions packages/mesh-react/src/hooks/useWalletList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,13 @@ import type { Wallet } from "@meshsdk/common";
import { BrowserWallet } from "@meshsdk/wallet";

export const useWalletList = ({
metamask = {
network: "preprod",
},
metamask = undefined,
}: {
metamask?: {
network: string;
}
};
} = {}) => {
const [wallets, setWallets] = useState<Wallet[]>([]);

useEffect(() => {
async function get() {
setWallets(await BrowserWallet.getAvailableWallets({ metamask }));
Expand Down
4 changes: 1 addition & 3 deletions packages/mesh-wallet/src/browser/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,7 @@ export class BrowserWallet implements IInitiator, ISigner, ISubmitter {
* @returns a list of wallet names
*/
static async getAvailableWallets({
metamask = {
network: "preprod",
},
metamask = undefined,
}: {
metamask?: {
network: string;
Expand Down

0 comments on commit fbebbc3

Please sign in to comment.