Skip to content

Commit

Permalink
refactor: remove unncessary try..catch block
Browse files Browse the repository at this point in the history
  • Loading branch information
iamcrazycoder committed Jul 26, 2023
1 parent 3f56236 commit 77ef418
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions packages/sdk/src/wallet/Ordit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,21 +228,15 @@ export class Ordit {

const psbtHex = psbt.toHex();

//TODO: check if psbt has been signed
if (finalized) {
psbt.finalizeAllInputs();

try {
if (finalized) {
psbt.finalizeAllInputs();

const signedHex = psbt.extractTransaction().toHex();

return signedHex;
}
const signedHex = psbt.extractTransaction().toHex();

return psbtHex;
} catch (error) {
throw new Error("Cannot finalize the inputs.", error);
return signedHex;
}

return psbtHex;
}

signMessage(message: string) {
Expand Down

0 comments on commit 77ef418

Please sign in to comment.