UNPKG

@aptos-labs/wallet-adapter-core

Version:
31 lines (26 loc) 896 B
import { AptosConnectAppleWallet, AptosConnectGoogleWallet, } from "@aptos-connect/wallet-adapter-plugin"; import { DappConfig, AdapterWallet } from "./WalletCore"; export function getSDKWallets(dappConfig?: DappConfig) { const sdkWallets: AdapterWallet[] = []; // Need to check window is defined for AptosConnect if (typeof window !== "undefined") { sdkWallets.push( new AptosConnectGoogleWallet({ network: dappConfig?.network, dappId: dappConfig?.aptosConnectDappId, ...dappConfig?.aptosConnect, }), new AptosConnectAppleWallet({ network: dappConfig?.network, dappId: dappConfig?.aptosConnectDappId, ...dappConfig?.aptosConnect, }) ); } // Add new SDK wallet plugins (ones that should be installed as packages) here: // Ex. sdkWallets.push(new YourSDKWallet(dappConfig)) return sdkWallets; }