Skip to content

Commit c9b2964

Browse files
committed
Remove extra return statement
1 parent c689862 commit c9b2964

File tree

2 files changed

+22
-30
lines changed

2 files changed

+22
-30
lines changed

src/psbt.js

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -104,23 +104,19 @@ class Psbt {
104104
return this.__CACHE.__TX.locktime;
105105
}
106106
get inputs() {
107-
return this.__CACHE.__TX.ins.map(input => {
108-
return {
109-
hash: bufferutils_1.cloneBuffer(input.hash),
110-
index: input.index,
111-
script: bufferutils_1.cloneBuffer(input.script),
112-
sequence: input.sequence,
113-
witness: input.witness.map(buffer => bufferutils_1.cloneBuffer(buffer)),
114-
};
115-
});
107+
return this.__CACHE.__TX.ins.map(input => ({
108+
hash: bufferutils_1.cloneBuffer(input.hash),
109+
index: input.index,
110+
script: bufferutils_1.cloneBuffer(input.script),
111+
sequence: input.sequence,
112+
witness: input.witness.map(buffer => bufferutils_1.cloneBuffer(buffer)),
113+
}));
116114
}
117115
get outputs() {
118-
return this.__CACHE.__TX.outs.map(output => {
119-
return {
120-
script: bufferutils_1.cloneBuffer(output.script),
121-
value: output.value,
122-
};
123-
});
116+
return this.__CACHE.__TX.outs.map(output => ({
117+
script: bufferutils_1.cloneBuffer(output.script),
118+
value: output.value,
119+
}));
124120
}
125121
combine(...those) {
126122
this.data.combine(...those.map(o => o.data));

ts_src/psbt.ts

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -138,24 +138,20 @@ export class Psbt {
138138
}
139139

140140
get inputs(): Input[] {
141-
return this.__CACHE.__TX.ins.map(input => {
142-
return {
143-
hash: cloneBuffer(input.hash),
144-
index: input.index,
145-
script: cloneBuffer(input.script),
146-
sequence: input.sequence,
147-
witness: input.witness.map(buffer => cloneBuffer(buffer)),
148-
};
149-
});
141+
return this.__CACHE.__TX.ins.map(input => ({
142+
hash: cloneBuffer(input.hash),
143+
index: input.index,
144+
script: cloneBuffer(input.script),
145+
sequence: input.sequence,
146+
witness: input.witness.map(buffer => cloneBuffer(buffer)),
147+
}));
150148
}
151149

152150
get outputs(): Output[] {
153-
return this.__CACHE.__TX.outs.map(output => {
154-
return {
155-
script: cloneBuffer(output.script),
156-
value: output.value,
157-
};
158-
});
151+
return this.__CACHE.__TX.outs.map(output => ({
152+
script: cloneBuffer(output.script),
153+
value: output.value,
154+
}));
159155
}
160156

161157
combine(...those: Psbt[]): this {

0 commit comments

Comments
 (0)