Browse Source

Throw error if `outputs` isn't an array

master
Luke Childs 6 years ago
parent
commit
9843a31b9c
  1. 4
      src/index.js

4
src/index.js

@ -22,6 +22,10 @@ const numberToUInt64 = number => {
};
const buildOutputScript = outputs => {
if (!Array.isArray(outputs)) {
throw new TypeError(`Expected 'outputs' to be of type 'array', got: '${outputs}'.`);
}
let outputScript = [...numberToCompactSizeUInt(outputs.length)];
for (const [address, value] of outputs) {

Loading…
Cancel
Save