Skip to content

Commit

Permalink
Fix signOnly psbt request
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanvl committed Nov 19, 2024
1 parent 3777277 commit 0a580d0
Showing 1 changed file with 12 additions and 21 deletions.
33 changes: 12 additions & 21 deletions views/ClientRequest/ClientPSBT.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import sb from 'satoshi-bitcoin';

import { BigButton } from '../../components/Button';
import { OriginBadge } from '../../components/OriginBadge';
import { ToastRender } from '../../components/ToastRender';
import { WalletAddress } from '../../components/WalletAddress';
import { MESSAGE_TYPES } from '../../scripts/helpers/constants';
import { sendMessage } from '../../scripts/helpers/message';
Expand Down Expand Up @@ -177,26 +176,18 @@ export function ClientPSBT({
}
);
} else {
sendMessage(
{
message: MESSAGE_TYPES.CLIENT_REQUEST_PSBT_RESPONSE,
data: { signedRawTx, originTabId, origin },
},
() => {
Toast.show({
duration: 3000,
render: () => {
return (
<ToastRender
description='Transaction Signed'
status='success'
/>
);
},
});
handleWindowClose();
}
);
if (signedRawTx) {
handleResponse({
toastMessage: 'Transaction Signed',
toastTitle: 'Success',
data: { signedRawTx },
});
} else {
handleFailedTransaction({
title: 'Error',
description: 'Failed to sign transaction.',
});
}
}
} else {
handleFailedTransaction({
Expand Down

0 comments on commit 0a580d0

Please sign in to comment.