Skip to content

Commit

Permalink
fix(hook): clear error state on send (#42)
Browse files Browse the repository at this point in the history
clear error state on send
  • Loading branch information
G9000 authored Jul 20, 2023
1 parent 3e89a3d commit 1361e7c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/sado-connect/src/hooks/useSend.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export function useSend(): [SendFunction, string | null] {

const send: SendFunction = async (toAddress, satoshis) => {
try {
setError(null);
if (!address || !publicKey) throw new Error("No wallet is connected");

const psbtTemplate: CreatePsbtOptions = {
Expand Down

0 comments on commit 1361e7c

Please sign in to comment.