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;
|
return this.__CACHE.__TX.locktime;
|
||||||
}
|
}
|
||||||
get inputs() {
|
get inputs() {
|
||||||
return this.__CACHE.__TX.ins.map(input => {
|
return this.__CACHE.__TX.ins.map(input => ({
|
||||||
return {
|
hash: bufferutils_1.cloneBuffer(input.hash),
|
||||||
hash: bufferutils_1.cloneBuffer(input.hash),
|
index: input.index,
|
||||||
index: input.index,
|
script: bufferutils_1.cloneBuffer(input.script),
|
||||||
script: bufferutils_1.cloneBuffer(input.script),
|
sequence: input.sequence,
|
||||||
sequence: input.sequence,
|
witness: input.witness.map(buffer => bufferutils_1.cloneBuffer(buffer)),
|
||||||
witness: input.witness.map(buffer => bufferutils_1.cloneBuffer(buffer)),
|
}));
|
||||||
};
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
get outputs() {
|
get outputs() {
|
||||||
return this.__CACHE.__TX.outs.map(output => {
|
return this.__CACHE.__TX.outs.map(output => ({
|
||||||
return {
|
script: bufferutils_1.cloneBuffer(output.script),
|
||||||
script: bufferutils_1.cloneBuffer(output.script),
|
value: output.value,
|
||||||
value: output.value,
|
}));
|
||||||
};
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
combine(...those) {
|
combine(...those) {
|
||||||
this.data.combine(...those.map(o => o.data));
|
this.data.combine(...those.map(o => o.data));
|
||||||
|
|
|
@ -138,24 +138,20 @@ export class Psbt {
|
||||||
}
|
}
|
||||||
|
|
||||||
get inputs(): Input[] {
|
get inputs(): Input[] {
|
||||||
return this.__CACHE.__TX.ins.map(input => {
|
return this.__CACHE.__TX.ins.map(input => ({
|
||||||
return {
|
hash: cloneBuffer(input.hash),
|
||||||
hash: cloneBuffer(input.hash),
|
index: input.index,
|
||||||
index: input.index,
|
script: cloneBuffer(input.script),
|
||||||
script: cloneBuffer(input.script),
|
sequence: input.sequence,
|
||||||
sequence: input.sequence,
|
witness: input.witness.map(buffer => cloneBuffer(buffer)),
|
||||||
witness: input.witness.map(buffer => cloneBuffer(buffer)),
|
}));
|
||||||
};
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
get outputs(): Output[] {
|
get outputs(): Output[] {
|
||||||
return this.__CACHE.__TX.outs.map(output => {
|
return this.__CACHE.__TX.outs.map(output => ({
|
||||||
return {
|
script: cloneBuffer(output.script),
|
||||||
script: cloneBuffer(output.script),
|
value: output.value,
|
||||||
value: output.value,
|
}));
|
||||||
};
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
combine(...those: Psbt[]): this {
|
combine(...those: Psbt[]): this {
|
||||||
|
|
Loading…
Add table
Reference in a new issue