UNPKG

@frak-labs/components

Version:

Frak Wallet components, helping any person to interact with the Frak wallet.

19 lines (18 loc) 594 B
import { displayEmbeddedWallet } from "@frak-labs/core-sdk/actions"; //#region src/actions/embeddedWallet.ts async function openEmbeddedWallet(targetInteraction, placement) { if (!window.FrakSetup?.client) { console.error("Frak client not found"); return; } const modalWalletConfig = window.FrakSetup?.modalWalletConfig ?? {}; await displayEmbeddedWallet(window.FrakSetup.client, targetInteraction ? { ...modalWalletConfig, metadata: { ...modalWalletConfig.metadata, targetInteraction } } : modalWalletConfig, placement); } //#endregion export { openEmbeddedWallet as t };