Skip to content

Commit

Permalink
add hasSendWallet to bounty pay (#1806)
Browse files Browse the repository at this point in the history
  • Loading branch information
riccardobl authored Jan 5, 2025
1 parent 95950cd commit 0750a7b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion components/pay-bounty.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { useRoot } from './root'
import { ActCanceledError, useAct } from './item-act'
import { useLightning } from './lightning'
import { useToast } from './toast'
import { useSendWallets } from '@/wallets/index'

export const payBountyCacheMods = {
onPaid: (cache, { data }) => {
Expand Down Expand Up @@ -49,7 +50,9 @@ export default function PayBounty ({ children, item }) {
const root = useRoot()
const strike = useLightning()
const toaster = useToast()
const variables = { id: item.id, sats: root.bounty, act: 'TIP' }
const wallets = useSendWallets()

const variables = { id: item.id, sats: root.bounty, act: 'TIP', hasSendWallet: wallets.length > 0 }
const act = useAct({
variables,
optimisticResponse: { act: { __typename: 'ItemActPaidAction', result: { ...variables, path: item.path } } },
Expand Down

0 comments on commit 0750a7b

Please sign in to comment.