Remove extra return statement
This commit is contained in:
parent
c68986231c
commit
c9b2964546
2 changed files with 22 additions and 30 deletions
26
src/psbt.js
26
src/psbt.js
|
@ -104,23 +104,19 @@ class Psbt {
|
|||
return this.__CACHE.__TX.locktime;
|
||||
}
|
||||
get inputs() {
|
||||
return this.__CACHE.__TX.ins.map(input => {
|
||||
return {
|
||||
hash: bufferutils_1.cloneBuffer(input.hash),
|
||||
index: input.index,
|
||||
script: bufferutils_1.cloneBuffer(input.script),
|
||||
sequence: input.sequence,
|
||||
witness: input.witness.map(buffer => bufferutils_1.cloneBuffer(buffer)),
|
||||
};
|
||||
});
|
||||
return this.__CACHE.__TX.ins.map(input => ({
|
||||
hash: bufferutils_1.cloneBuffer(input.hash),
|
||||
index: input.index,
|
||||
script: bufferutils_1.cloneBuffer(input.script),
|
||||
sequence: input.sequence,
|
||||
witness: input.witness.map(buffer => bufferutils_1.cloneBuffer(buffer)),
|
||||
}));
|
||||
}
|
||||
get outputs() {
|
||||
return this.__CACHE.__TX.outs.map(output => {
|
||||
return {
|
||||
script: bufferutils_1.cloneBuffer(output.script),
|
||||
value: output.value,
|
||||
};
|
||||
});
|
||||
return this.__CACHE.__TX.outs.map(output => ({
|
||||
script: bufferutils_1.cloneBuffer(output.script),
|
||||
value: output.value,
|
||||
}));
|
||||
}
|
||||
combine(...those) {
|
||||
this.data.combine(...those.map(o => o.data));
|
||||
|
|
|
@ -138,24 +138,20 @@ export class Psbt {
|
|||
}
|
||||
|
||||
get inputs(): Input[] {
|
||||
return this.__CACHE.__TX.ins.map(input => {
|
||||
return {
|
||||
hash: cloneBuffer(input.hash),
|
||||
index: input.index,
|
||||
script: cloneBuffer(input.script),
|
||||
sequence: input.sequence,
|
||||
witness: input.witness.map(buffer => cloneBuffer(buffer)),
|
||||
};
|
||||
});
|
||||
return this.__CACHE.__TX.ins.map(input => ({
|
||||
hash: cloneBuffer(input.hash),
|
||||
index: input.index,
|
||||
script: cloneBuffer(input.script),
|
||||
sequence: input.sequence,
|
||||
witness: input.witness.map(buffer => cloneBuffer(buffer)),
|
||||
}));
|
||||
}
|
||||
|
||||
get outputs(): Output[] {
|
||||
return this.__CACHE.__TX.outs.map(output => {
|
||||
return {
|
||||
script: cloneBuffer(output.script),
|
||||
value: output.value,
|
||||
};
|
||||
});
|
||||
return this.__CACHE.__TX.outs.map(output => ({
|
||||
script: cloneBuffer(output.script),
|
||||
value: output.value,
|
||||
}));
|
||||
}
|
||||
|
||||
combine(...those: Psbt[]): this {
|
||||
|
|
Loading…
Add table
Reference in a new issue