usesendwallets
This commit is contained in:
parent
f89286ffdf
commit
6b59e1fa75
|
@ -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()
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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()
|
||||
|
||||
|
|
Loading…
Reference in New Issue