@@ -10,7 +10,7 @@ import { generateMnemonic } from "bip39";
1010
1111import { setUp , tearDown } from "../__support__/setup" ;
1212
13- export const generateWallets = quantity => {
13+ export const generateWallets = ( quantity ) => {
1414 const wallets : { address : string ; passphrase : string ; publicKey : string } [ ] = [ ] ;
1515
1616 for ( let i = 0 ; i < quantity ; i ++ ) {
@@ -56,13 +56,13 @@ beforeAll(async () => {
5656 app = await setUp ( ) ;
5757 api = new ApiHelpers ( app ) ;
5858
59- delegates = secrets . map ( secret => {
59+ delegates = secrets . map ( ( secret ) => {
6060 const publicKey : string = Identities . PublicKey . fromPassphrase ( secret ) ;
6161 const address : string = Identities . Address . fromPassphrase ( secret ) ;
6262
6363 const transaction : { amount : string } = Managers . configManager
6464 . get ( "genesisBlock" )
65- . transactions . find ( transaction => transaction . recipientId === address && transaction . type === 0 ) ;
65+ . transactions . find ( ( transaction ) => transaction . recipientId === address && transaction . type === 0 ) ;
6666
6767 return {
6868 secret,
@@ -705,7 +705,7 @@ describe("API 2.0 - Transactions", () => {
705705 expect ( response . data . data . invalid [ 0 ] ) . toBe ( transactions [ 1 ] . id ) ;
706706 } ) ;
707707
708- it . each ( [ 3 , 5 , 8 ] ) ( "should accept and broadcast %i transactions emptying a wallet" , async txNumber => {
708+ it . each ( [ 3 , 5 , 8 ] ) ( "should accept and broadcast %i transactions emptying a wallet" , async ( txNumber ) => {
709709 const sender = delegates [ txNumber ] ; // use txNumber so that we use a different delegate for each test case
710710 const receivers = generateWallets ( 2 ) ;
711711 const amountPlusFee = Math . floor ( + sender . balance / txNumber ) ;
@@ -730,16 +730,18 @@ describe("API 2.0 - Transactions", () => {
730730
731731 expect ( response ) . toBeSuccessfulResponse ( ) ;
732732
733- expect ( response . data . data . accept . sort ( ) ) . toEqual ( allTransactions . map ( transaction => transaction . id ) . sort ( ) ) ;
733+ expect ( response . data . data . accept . sort ( ) ) . toEqual (
734+ allTransactions . map ( ( transaction ) => transaction . id ) . sort ( ) ,
735+ ) ;
734736 expect ( response . data . data . broadcast . sort ( ) ) . toEqual (
735- allTransactions . map ( transaction => transaction . id ) . sort ( ) ,
737+ allTransactions . map ( ( transaction ) => transaction . id ) . sort ( ) ,
736738 ) ;
737739 expect ( response . data . data . invalid ) . toHaveLength ( 0 ) ;
738740 } ) ;
739741
740742 it . each ( [ 3 , 5 , 8 ] ) (
741743 "should not accept the last of %i transactions emptying a wallet when the last one is 1 satoshi too much" ,
742- async txNumber => {
744+ async ( txNumber ) => {
743745 const sender = delegates [ txNumber + 1 ] ; // use txNumber + 1 so that we don't use the same delegates as the above test
744746 const receivers = generateWallets ( 2 ) ;
745747 const amountPlusFee = Math . floor ( + sender . balance / txNumber ) ;
@@ -769,12 +771,12 @@ describe("API 2.0 - Transactions", () => {
769771 expect ( response ) . toBeSuccessfulResponse ( ) ;
770772
771773 expect ( response . data . data . accept . sort ( ) ) . toEqual (
772- transactions . map ( transaction => transaction . id ) . sort ( ) ,
774+ transactions . map ( ( transaction ) => transaction . id ) . sort ( ) ,
773775 ) ;
774776 expect ( response . data . data . broadcast . sort ( ) ) . toEqual (
775- transactions . map ( transaction => transaction . id ) . sort ( ) ,
777+ transactions . map ( ( transaction ) => transaction . id ) . sort ( ) ,
776778 ) ;
777- expect ( response . data . data . invalid ) . toEqual ( lastTransaction . map ( transaction => transaction . id ) ) ;
779+ expect ( response . data . data . invalid ) . toEqual ( lastTransaction . map ( ( transaction ) => transaction . id ) ) ;
778780 } ,
779781 ) ;
780782 } ) ;
0 commit comments