From bb76c6a1387960f7e045e548c9e5a631c68ad5af Mon Sep 17 00:00:00 2001 From: k00b Date: Wed, 26 Mar 2025 10:23:17 -0500 Subject: [PATCH] prevent resubmission of bounty payments --- components/pay-bounty.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/components/pay-bounty.js b/components/pay-bounty.js index 7547b79a..9619d43b 100644 --- a/components/pay-bounty.js +++ b/components/pay-bounty.js @@ -1,5 +1,4 @@ import React from 'react' -import Button from 'react-bootstrap/Button' import styles from './pay-bounty.module.css' import ActionTooltip from './action-tooltip' import { useMe } from './me' @@ -10,6 +9,7 @@ import { ActCanceledError, useAct } from './item-act' import { useLightning } from './lightning' import { useToast } from './toast' import { useSendWallets } from '@/wallets/index' +import { Form, SubmitButton } from './form' export const payBountyCacheMods = { onPaid: (cache, { data }) => { @@ -90,11 +90,12 @@ export default function PayBounty ({ children, item }) {
Pay this bounty to {item.user.name}?
-
- -
+ {/* initial={{ id: item.id }} is a hack to allow SubmitButton to be used as a button */} +
handlePayBounty(onClose)} initial={{ id: item.id }}> + + pay + +
)) }}