usesendwallets

This commit is contained in:
k00b 2024-11-27 19:39:20 -06:00
parent f89286ffdf
commit 6b59e1fa75
3 changed files with 6 additions and 6 deletions

View File

@ -13,7 +13,7 @@ import { usePaidMutation } from './use-paid-mutation'
import { ACT_MUTATION } from '@/fragments/paidAction'
import { meAnonSats } from '@/lib/apollo'
import { BoostItemInput } from './adv-post-form'
import { useWalletsWithPayments } from '@/wallets/index'
import { useSendWallets } from '@/wallets/index'
const defaultTips = [100, 1000, 10_000, 100_000]
@ -89,7 +89,7 @@ function BoostForm ({ step, onSubmit, children, item, oValue, inputRef, act = 'B
export default function ItemAct ({ onClose, item, act = 'TIP', step, children, abortSignal }) {
const inputRef = useRef(null)
const { me } = useMe()
const wallets = useWalletsWithPayments()
const wallets = useSendWallets()
const [oValue, setOValue] = useState()
useEffect(() => {
@ -260,7 +260,7 @@ export function useAct ({ query = ACT_MUTATION, ...options } = {}) {
}
export function useZap () {
const wallets = useWalletsWithPayments()
const wallets = useSendWallets()
const act = useAct()
const strike = useLightning()
const toaster = useToast()

View File

@ -218,7 +218,7 @@ export function useWallet (name) {
return wallets.find(w => w.def.name === name)
}
export function useWalletsWithPayments () {
export function useSendWallets () {
const { wallets } = useWallets()
// return the first enabled wallet that is available and can send
return wallets

View File

@ -1,5 +1,5 @@
import { useCallback } from 'react'
import { useWalletsWithPayments } from '@/wallets'
import { useSendWallets } from '@/wallets'
import { formatSats } from '@/lib/format'
import { useInvoice } from '@/components/payment'
import { FAST_POLL_INTERVAL } from '@/lib/constants'
@ -11,7 +11,7 @@ import { canSend } from './common'
import { useWalletLoggerFactory } from './logger'
export function useWalletPayment () {
const wallets = useWalletsWithPayments()
const wallets = useSendWallets()
const sendPayment = useSendPayment()
const invoiceHelper = useInvoice()