Skip to content

Commit

Permalink
fix(signPsbt): window not closing
Browse files Browse the repository at this point in the history
  • Loading branch information
kyranjamie committed Jan 29, 2025
1 parent bdde723 commit c51198b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/pages/rpc-sign-psbt/use-rpc-sign-psbt.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { useNavigate } from 'react-router-dom';

import { RpcErrorCode } from '@btckit/types';
import { hexToBytes } from '@noble/hashes/utils';
import { bytesToHex } from '@stacks/common';

Expand All @@ -10,6 +9,7 @@ import {
useCalculateBitcoinFiatValue,
useCryptoCurrencyMarketDataMeanAverage,
} from '@leather.io/query';
import { RpcErrorCode } from '@leather.io/rpc';
import {
formatMoney,
formatMoneyPadded,
Expand Down Expand Up @@ -132,6 +132,7 @@ export function useRpcSignPsbt() {
tabId,
makeRpcSuccessResponse('signPsbt', { id: requestId, result: { hex: bytesToHex(psbt) } })
);
closeWindow();
return;
}

Expand Down Expand Up @@ -159,7 +160,6 @@ export function useRpcSignPsbt() {

return;
}
closeWindow();
} catch (e) {
return navigate(RouteUrls.RequestError, {
state: { message: isError(e) ? e.message : '', title: 'Failed to sign' },
Expand Down

0 comments on commit c51198b

Please sign in to comment.