Skip to content

Commit

Permalink
feat(useSendV2): set rbf default to false (#312)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevzzsk authored Jul 11, 2024
1 parent a152054 commit 171315b
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion packages/ord-connect/src/hooks/useSendV2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ type SendParams = {
satoshis: number;
feeRate: number;
relay?: boolean;
rbf?: boolean;
};

type SendResponse = {
Expand All @@ -24,7 +25,13 @@ export function useSendV2() {
const [isLoading, setIsLoading] = useState<boolean>(false);

const send: SendFunction = useCallback(
async ({ toAddress, satoshis, feeRate, relay = true }: SendParams) => {
async ({
toAddress,
satoshis,
feeRate,
relay = true,
rbf = false,
}: SendParams) => {
setIsLoading(true);

try {
Expand All @@ -51,6 +58,8 @@ export function useSendV2() {
],
});

psbtBuilder.setRBF(rbf);

await psbtBuilder.prepare();

const signedPsbt = await signPsbt({
Expand Down

0 comments on commit 171315b

Please sign in to comment.