@@ -517,7 +517,10 @@ describe('IdentityKeyManager', function suite() {
517517
518518 it ( 'should skip occupied indices and return first unused' , async function ( ) {
519519 const fakeSdk = await fakeSdkWithOccupiedIndices ( [ 0 , 1 ] ) ;
520- const idx = await IdentityKeyManager . findNextIndex ( fakeSdk , TEST_MNEMONIC ) ;
520+ const idx = await IdentityKeyManager . findNextIndex (
521+ fakeSdk ,
522+ TEST_MNEMONIC ,
523+ ) ;
521524 expect ( idx ) . to . equal ( 2 ) ;
522525 } ) ;
523526 } ) ;
@@ -619,7 +622,10 @@ describe('AddressKeyManager', function suite() {
619622 let queriedAddress ;
620623 const fakeSdk = {
621624 addresses : {
622- get : async ( addr ) => { queriedAddress = addr ; return fakeInfo ; } ,
625+ get : async ( addr ) => {
626+ queriedAddress = addr ;
627+ return fakeInfo ;
628+ } ,
623629 } ,
624630 } ;
625631 const mgr = new AddressKeyManager (
@@ -649,7 +655,10 @@ describe('AddressKeyManager', function suite() {
649655 let queriedAddress ;
650656 const fakeSdk = {
651657 addresses : {
652- get : async ( addr ) => { queriedAddress = addr ; return fakeInfo ; } ,
658+ get : async ( addr ) => {
659+ queriedAddress = addr ;
660+ return fakeInfo ;
661+ } ,
653662 } ,
654663 } ;
655664 const mgr = new AddressKeyManager (
@@ -756,15 +765,19 @@ describe('setupDashClient()', function () {
756765 expect . fail ( 'should have thrown' ) ;
757766 } catch ( err ) {
758767 expect ( err ) . to . be . an . instanceOf ( Error ) ;
759- expect ( err . message ) . to . not . include ( 'Cannot read properties of undefined' ) ;
768+ expect ( err . message ) . to . not . include (
769+ 'Cannot read properties of undefined' ,
770+ ) ;
760771 }
761772
762773 try {
763774 addressKeyManager . getSigner ( ) ;
764775 expect . fail ( 'should have thrown' ) ;
765776 } catch ( err ) {
766777 expect ( err ) . to . be . an . instanceOf ( Error ) ;
767- expect ( err . message ) . to . not . include ( 'Cannot read properties of undefined' ) ;
778+ expect ( err . message ) . to . not . include (
779+ 'Cannot read properties of undefined' ,
780+ ) ;
768781 }
769782 } finally {
770783 clientConfig . mnemonic = saved ;
@@ -814,8 +827,14 @@ describe('setupDashClient()', function () {
814827 // proving identityIndex is forwarded. We just need it not to crash
815828 // before reaching the identity lookup.
816829 // Use requireIdentity: false to avoid the lookup and verify the index is stored.
817- const r0 = await setupDashClient ( { requireIdentity : false , identityIndex : 0 } ) ;
818- const r1 = await setupDashClient ( { requireIdentity : false , identityIndex : 1 } ) ;
830+ const r0 = await setupDashClient ( {
831+ requireIdentity : false ,
832+ identityIndex : 0 ,
833+ } ) ;
834+ const r1 = await setupDashClient ( {
835+ requireIdentity : false ,
836+ identityIndex : 1 ,
837+ } ) ;
819838 expect ( r0 . keyManager . identityIndex ) . to . equal ( 0 ) ;
820839 expect ( r1 . keyManager . identityIndex ) . to . equal ( 1 ) ;
821840 // Different indices must produce different keys
@@ -832,7 +851,10 @@ describe('setupDashClient()', function () {
832851 const saved = clientConfig . mnemonic ;
833852 try {
834853 clientConfig . mnemonic = TEST_MNEMONIC ;
835- const result = await setupDashClient ( { requireIdentity : false , identityIndex : 42 } ) ;
854+ const result = await setupDashClient ( {
855+ requireIdentity : false ,
856+ identityIndex : 42 ,
857+ } ) ;
836858 expect ( result . keyManager ) . to . be . an . instanceOf ( IdentityKeyManager ) ;
837859 expect ( result . keyManager . identityIndex ) . to . equal ( 42 ) ;
838860 expect ( result . keyManager . identityId ) . to . be . null ;
@@ -916,4 +938,3 @@ describe('dip13KeyPath()', function () {
916938 expect ( path ) . to . equal ( "m/9'/5'/5'/0'/0'/0'/0'" ) ;
917939 } ) ;
918940} ) ;
919-
0 commit comments