File tree Expand file tree Collapse file tree 4 files changed +4
-4
lines changed
Expand file tree Collapse file tree 4 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ export class Celo extends AbstractEthLikeCoin {
3131
3232 async verifyTransaction ( params : VerifyTransactionOptions ) : Promise < boolean > {
3333 const { txParams } = params ;
34- if ( txParams ? .recipients ?. length !== 1 ) {
34+ if ( Array . isArray ( txParams . recipients ) && txParams . recipients . length > 1 ) {
3535 throw new Error ( `txParams should only have 1 recipient but ${ txParams ?. recipients ?. length } found` ) ;
3636 }
3737 return true ;
Original file line number Diff line number Diff line change @@ -640,7 +640,7 @@ export class Dot extends BaseCoin {
640640
641641 async verifyTransaction ( params : VerifyTransactionOptions ) : Promise < boolean > {
642642 const { txParams } = params ;
643- if ( txParams ? .recipients ?. length !== 1 ) {
643+ if ( Array . isArray ( txParams . recipients ) && txParams . recipients . length > 1 ) {
644644 throw new Error ( `txParams should only have 1 recipient but ${ txParams ?. recipients ?. length } found` ) ;
645645 }
646646 return true ;
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ export class Stx extends BaseCoin {
4747
4848 async verifyTransaction ( params : VerifyTransactionOptions ) : Promise < boolean > {
4949 const { txParams } = params ;
50- if ( txParams ? .recipients ?. length !== 1 ) {
50+ if ( Array . isArray ( txParams . recipients ) && txParams . recipients . length > 1 ) {
5151 throw new Error ( `txParams should only have 1 recipient but ${ txParams ?. recipients ?. length } found` ) ;
5252 }
5353 return true ;
Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ export class Xtz extends BaseCoin {
105105
106106 async verifyTransaction ( params : VerifyTransactionOptions ) : Promise < boolean > {
107107 const { txParams } = params ;
108- if ( txParams ? .recipients ?. length !== 1 ) {
108+ if ( Array . isArray ( txParams . recipients ) && txParams . recipients . length > 1 ) {
109109 throw new Error ( `txParams should only have 1 recipient but ${ txParams ?. recipients ?. length } found` ) ;
110110 }
111111 return true ;
You can’t perform that action at this time.
0 commit comments