Skip to content

Commit

Permalink
customize wallets
Browse files Browse the repository at this point in the history
  • Loading branch information
ogous committed Dec 13, 2024
1 parent e7c028b commit aa0988a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions web/src/components/buttons/connectButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export default function ConnectButton() {
<ThirdWebButton
client={config.thirdweb.client}
chain={config.thirdweb.chain}
wallets={config.thirdweb.wallets}
appMetadata={config.thirdweb.appMetadata}
accountAbstraction={config.thirdweb.accountAbstraction}
/>
Expand Down
1 change: 1 addition & 0 deletions web/src/components/buttons/donateButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export default function DonateButton() {
connect({
client: config.thirdweb.client,
chain: config.thirdweb.chain,
wallets: config.thirdweb.wallets,
appMetadata: config.thirdweb.appMetadata,
accountAbstraction: config.thirdweb.accountAbstraction,
});
Expand Down
12 changes: 12 additions & 0 deletions web/src/config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { abi } from "#/abis/donation";
import { createThirdwebClient } from "thirdweb";
import { getContract } from "thirdweb";
import { createWallet, inAppWallet } from "thirdweb/wallets";

const net = (process.env.NEXT_PUBLIC_NET ?? "testnet") as "mainnet" | "testnet";
const clientId = process.env.NEXT_PUBLIC_THIRDWEB_ID;
Expand Down Expand Up @@ -41,6 +42,16 @@ const metadata = {
"blockchain",
],
};
const wallets = [
inAppWallet({
smartAccount: {
chain: chains.superposition[net],
sponsorGas: true,
},
}),
createWallet("io.metamask"),
createWallet("io.rabby"),
];
const thirdwebClient = createThirdwebClient({
clientId,
});
Expand Down Expand Up @@ -83,6 +94,7 @@ export const config = {
chain: chains.superposition[net],
sponsorGas: true,
},
wallets,
appMetadata: {
name: metadata.title as string,
url: metadata.metadataBase?.href,
Expand Down

0 comments on commit aa0988a

Please sign in to comment.