Skip to content

Commit

Permalink
add support for custom wallets
Browse files Browse the repository at this point in the history
  • Loading branch information
microchipgnu committed Jul 25, 2023
1 parent dd986d8 commit 71d6e9a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/auth/src/wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
WALLET_CONNECTION_TIMEOUT,
} from './constants';

import type { WalletSelector, AccountState } from '@near-wallet-selector/core';
import type { WalletSelector, AccountState, WalletModuleFactory } from '@near-wallet-selector/core';
import type { WalletSelectorModal } from '@near-wallet-selector/modal-ui';
import { SUPPORTED_NEAR_WALLETS } from './wallets.setup';
import { ERROR_MESSAGES } from './errorMessages';
Expand All @@ -33,14 +33,15 @@ export let walletSelectorComponents: WalletSelectorComponents = {
* Set up wallet selector components. Returns the modal
* See also docs on {@link https://github.com/near/wallet-selector/ | near wallet selector}
*/
export const setupWalletSelectorComponents = async (network?, contractAddress?): Promise<WalletSelectorComponents> => {
export const setupWalletSelectorComponents = async (network?, contractAddress?, options?: { additionalWallets?: Array<WalletModuleFactory> }): Promise<WalletSelectorComponents> => {

const selector = await setupWalletSelector({
network: network,
debug: mbjs.keys.debugMode,
modules: [
...(await setupDefaultWallets()),
...SUPPORTED_NEAR_WALLETS,
...options?.additionalWallets,
],
});

Expand Down

0 comments on commit 71d6e9a

Please sign in to comment.