Skip to content

Commit

Permalink
fix wallet setups
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenmarcus committed Jul 29, 2024
1 parent b51c902 commit 593ad6a
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions packages/react/src/wallet/wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ const walletUrls = {
mainnet: 'https://wallet.mintbase.xyz',
};

const BitteWalletUrls = {
testnet: 'https://testnet.wallet.bitte.ai/',
mainnet: 'https://wallet.bitte.ai/',
};

// eslint-disable-next-line max-len
export const setupMintbaseWalletSelector = async (
callbackUrl,
Expand All @@ -77,15 +82,21 @@ export const setupMintbaseWalletSelector = async (
): Promise<WalletSelectorComponents> => {


const baseModuleWallet = {
const BitteModuleWallet = {
walletUrl: walletUrls[network],
callbackUrl: callbackUrl,
contractId: contractAddress,
};

const MbModuleWallet = {
walletUrl: walletUrls[network],
callbackUrl: callbackUrl,
contractId: contractAddress,
};

if (onlyMbWallet === false) {
const moduleWallet = {
...baseModuleWallet,
...MbModuleWallet,
successUrl: successUrl || window.location.href,
failureUrl: successUrl || window.location.href,
};
Expand All @@ -104,10 +115,10 @@ export const setupMintbaseWalletSelector = async (
network: network,
modules: [
setupBitteWallet(
baseModuleWallet,
BitteModuleWallet,
),
setupMintbaseWallet(
baseModuleWallet,
MbModuleWallet,
),
...(options?.additionalWallets || []),
],
Expand Down

0 comments on commit 593ad6a

Please sign in to comment.