Skip to content

Commit 0750a7b

Browse files
authored
add hasSendWallet to bounty pay (#1806)
1 parent 95950cd commit 0750a7b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

components/pay-bounty.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { useRoot } from './root'
99
import { ActCanceledError, useAct } from './item-act'
1010
import { useLightning } from './lightning'
1111
import { useToast } from './toast'
12+
import { useSendWallets } from '@/wallets/index'
1213

1314
export const payBountyCacheMods = {
1415
onPaid: (cache, { data }) => {
@@ -49,7 +50,9 @@ export default function PayBounty ({ children, item }) {
4950
const root = useRoot()
5051
const strike = useLightning()
5152
const toaster = useToast()
52-
const variables = { id: item.id, sats: root.bounty, act: 'TIP' }
53+
const wallets = useSendWallets()
54+
55+
const variables = { id: item.id, sats: root.bounty, act: 'TIP', hasSendWallet: wallets.length > 0 }
5356
const act = useAct({
5457
variables,
5558
optimisticResponse: { act: { __typename: 'ItemActPaidAction', result: { ...variables, path: item.path } } },

0 commit comments

Comments
 (0)