File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -592,7 +592,7 @@ export class GatewayApiClient {
592592 throw new Error ( 'Invalid OP_RETURN hash' ) ;
593593 }
594594
595- let psbtBase64 : string ;
595+ let psbtBase64 : string = '' ;
596596 if (
597597 params . fromUserAddress &&
598598 typeof params . fromChain === 'string' &&
@@ -618,7 +618,13 @@ export class GatewayApiClient {
618618 } ;
619619 }
620620
621- throw new Error ( 'Failed to create bitcoin psbt. Please check `fromChain` and `fromUserAddress` parameters.' ) ;
621+ if ( ! psbtBase64 ) {
622+ throw new Error (
623+ 'Failed to create bitcoin psbt. Please check `fromChain` and `fromUserAddress` parameters.'
624+ ) ;
625+ }
626+
627+ throw new Error ( 'Failed to create bitcoin psbt due to an unexpected error.' ) ;
622628 }
623629
624630 /**
You can’t perform that action at this time.
0 commit comments