UNPKG

@lifi/widget

Version:

LI.FI Widget for cross-chain bridging and swapping. It will drive your multi-chain strategy and attract new users from everywhere.

26 lines (22 loc) 576 B
import { shallow } from 'zustand/shallow' import { createWithEqualityFn } from 'zustand/traditional' import type { SendToWalletStore } from './types.js' export const useSendToWalletStore = createWithEqualityFn<SendToWalletStore>( (set) => ({ showSendToWallet: false, setSendToWallet: (value) => set({ showSendToWallet: value, }), }), Object.is ) export const useSendToWalletActions = () => { const actions = useSendToWalletStore( (store) => ({ setSendToWallet: store.setSendToWallet, }), shallow ) return actions }