File tree Expand file tree Collapse file tree 7 files changed +13
-24
lines changed
Expand file tree Collapse file tree 7 files changed +13
-24
lines changed Original file line number Diff line number Diff line change @@ -11,10 +11,8 @@ function combine(psbts) {
1111 throw new Error ( 'Combine: Self missing transaction' ) ;
1212 }
1313 const selfGlobalSet = getKeySet ( selfKeyVals . globalKeyVals ) ;
14- const selfInputSets = selfKeyVals . inputKeyVals . map ( input => getKeySet ( input ) ) ;
15- const selfOutputSets = selfKeyVals . outputKeyVals . map ( output =>
16- getKeySet ( output ) ,
17- ) ;
14+ const selfInputSets = selfKeyVals . inputKeyVals . map ( getKeySet ) ;
15+ const selfOutputSets = selfKeyVals . outputKeyVals . map ( getKeySet ) ;
1816 for ( const other of others ) {
1917 const otherTx = getTx ( other ) ;
2018 if (
@@ -34,9 +32,7 @@ function combine(psbts) {
3432 otherKeyVals . globalKeyVals ,
3533 ) ,
3634 ) ;
37- const otherInputSets = otherKeyVals . inputKeyVals . map ( input =>
38- getKeySet ( input ) ,
39- ) ;
35+ const otherInputSets = otherKeyVals . inputKeyVals . map ( getKeySet ) ;
4036 otherInputSets . forEach ( ( inputSet , idx ) =>
4137 inputSet . forEach (
4238 keyPusher (
@@ -46,9 +42,7 @@ function combine(psbts) {
4642 ) ,
4743 ) ,
4844 ) ;
49- const otherOutputSets = otherKeyVals . outputKeyVals . map ( output =>
50- getKeySet ( output ) ,
51- ) ;
45+ const otherOutputSets = otherKeyVals . outputKeyVals . map ( getKeySet ) ;
5246 otherOutputSets . forEach ( ( outputSet , idx ) =>
5347 outputSet . forEach (
5448 keyPusher (
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ function reverseBuffer(buffer) {
1616}
1717exports . reverseBuffer = reverseBuffer ;
1818function keyValsToBuffer ( keyVals ) {
19- const buffers = keyVals . map ( keyVal => keyValToBuffer ( keyVal ) ) ;
19+ const buffers = keyVals . map ( keyValToBuffer ) ;
2020 buffers . push ( Buffer . from ( [ 0 ] ) ) ;
2121 return Buffer . concat ( buffers ) ;
2222}
Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ function updateMaker(typeName) {
8383 ) {
8484 throw new Error ( `Key type ${ name } must be an array` ) ;
8585 }
86- if ( ! data . every ( v => check ( v ) ) ) {
86+ if ( ! data . every ( check ) ) {
8787 throwForUpdateMaker ( typeName , name , expected , data ) ;
8888 }
8989 // @ts -ignore
Original file line number Diff line number Diff line change @@ -12,10 +12,8 @@ export function combine(psbts: PsbtAttributes[]): PsbtAttributes {
1212 throw new Error ( 'Combine: Self missing transaction' ) ;
1313 }
1414 const selfGlobalSet = getKeySet ( selfKeyVals . globalKeyVals ) ;
15- const selfInputSets = selfKeyVals . inputKeyVals . map ( input => getKeySet ( input ) ) ;
16- const selfOutputSets = selfKeyVals . outputKeyVals . map ( output =>
17- getKeySet ( output ) ,
18- ) ;
15+ const selfInputSets = selfKeyVals . inputKeyVals . map ( getKeySet ) ;
16+ const selfOutputSets = selfKeyVals . outputKeyVals . map ( getKeySet ) ;
1917
2018 for ( const other of others ) {
2119 const otherTx = getTx ( other ) ;
@@ -38,9 +36,7 @@ export function combine(psbts: PsbtAttributes[]): PsbtAttributes {
3836 ) ,
3937 ) ;
4038
41- const otherInputSets = otherKeyVals . inputKeyVals . map ( input =>
42- getKeySet ( input ) ,
43- ) ;
39+ const otherInputSets = otherKeyVals . inputKeyVals . map ( getKeySet ) ;
4440 otherInputSets . forEach ( ( inputSet , idx ) =>
4541 inputSet . forEach (
4642 keyPusher (
@@ -51,9 +47,7 @@ export function combine(psbts: PsbtAttributes[]): PsbtAttributes {
5147 ) ,
5248 ) ;
5349
54- const otherOutputSets = otherKeyVals . outputKeyVals . map ( output =>
55- getKeySet ( output ) ,
56- ) ;
50+ const otherOutputSets = otherKeyVals . outputKeyVals . map ( getKeySet ) ;
5751 otherOutputSets . forEach ( ( outputSet , idx ) =>
5852 outputSet . forEach (
5953 keyPusher (
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ export function reverseBuffer(buffer: Buffer): Buffer {
1717}
1818
1919export function keyValsToBuffer ( keyVals : KeyValue [ ] ) : Buffer {
20- const buffers = keyVals . map ( keyVal => keyValToBuffer ( keyVal ) ) ;
20+ const buffers = keyVals . map ( keyValToBuffer ) ;
2121 buffers . push ( Buffer . from ( [ 0 ] ) ) ;
2222 return Buffer . concat ( buffers ) ;
2323}
Original file line number Diff line number Diff line change @@ -112,7 +112,7 @@ function updateMaker<T, Y>(
112112 ) {
113113 throw new Error ( `Key type ${ name } must be an array` ) ;
114114 }
115- if ( ! data . every ( v => check ( v ) ) ) {
115+ if ( ! data . every ( check ) ) {
116116 throwForUpdateMaker ( typeName , name , expected , data ) ;
117117 }
118118 // @ts -ignore
Original file line number Diff line number Diff line change 1919 "no-implicit-dependencies" : [true , " dev" ],
2020 "no-return-await" : true ,
2121 "no-var-requires" : false ,
22+ "no-unnecessary-callback-wrapper" : true ,
2223 "no-unused-expression" : false ,
2324 "object-literal-sort-keys" : false ,
2425 "quotemark" : [true , " single" , " avoid-escape" ],
You can’t perform that action at this time.
0 commit comments