Remove eslint comments.
This commit is contained in:
parent
763cb8b923
commit
0729fde36f
12 changed files with 20 additions and 30 deletions
|
@ -25,7 +25,7 @@ function p2ms(a, opts) {
|
|||
opts = Object.assign({ validate: true }, opts || {});
|
||||
function isAcceptableSignature(x) {
|
||||
return (bscript.isCanonicalScriptSignature(x) ||
|
||||
(opts.allowIncomplete && x === OPS.OP_0) !== undefined); // eslint-disable-line
|
||||
(opts.allowIncomplete && x === OPS.OP_0) !== undefined);
|
||||
}
|
||||
typef({
|
||||
network: typef.maybe(typef.Object),
|
||||
|
@ -45,8 +45,8 @@ function p2ms(a, opts) {
|
|||
return;
|
||||
decoded = true;
|
||||
chunks = bscript.decompile(output);
|
||||
o.m = chunks[0] - OP_INT_BASE; // eslint-disable-line
|
||||
o.n = chunks[chunks.length - 2] - OP_INT_BASE; // eslint-disable-line
|
||||
o.m = chunks[0] - OP_INT_BASE;
|
||||
o.n = chunks[chunks.length - 2] - OP_INT_BASE;
|
||||
o.pubkeys = chunks.slice(1, -2);
|
||||
}
|
||||
lazy.prop(o, 'output', function () {
|
||||
|
@ -100,10 +100,7 @@ function p2ms(a, opts) {
|
|||
throw new TypeError('Output is invalid');
|
||||
if (chunks[chunks.length - 1] !== OPS.OP_CHECKMULTISIG)
|
||||
throw new TypeError('Output is invalid');
|
||||
if (o.m <= 0 || // eslint-disable-line
|
||||
o.n > 16 || // eslint-disable-line
|
||||
o.m > o.n || // eslint-disable-line
|
||||
o.n !== chunks.length - 3)
|
||||
if (o.m <= 0 || o.n > 16 || o.m > o.n || o.n !== chunks.length - 3)
|
||||
throw new TypeError('Output is invalid');
|
||||
if (!o.pubkeys.every(x => ecc.isPoint(x)))
|
||||
throw new TypeError('Output is invalid');
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const networks_1 = require("../networks"); // eslint-disable-line
|
||||
const networks_1 = require("../networks");
|
||||
const bscript = require("../script");
|
||||
const bcrypto = require("../crypto");
|
||||
const lazy = require("./lazy");
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const networks_1 = require("../networks"); // eslint-disable-line
|
||||
const networks_1 = require("../networks");
|
||||
const bscript = require("../script");
|
||||
const bcrypto = require("../crypto");
|
||||
const lazy = require("./lazy");
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/* eslint-disable no-new */
|
||||
|
||||
const { describe, it, beforeEach } = require('mocha')
|
||||
const assert = require('assert')
|
||||
const proxyquire = require('proxyquire')
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { Payment, PaymentOpts } from './index'; // eslint-disable-line
|
||||
import { Payment, PaymentOpts } from './index';
|
||||
import * as bscript from '../script';
|
||||
import * as lazy from './lazy';
|
||||
import { bitcoin as BITCOIN_NETWORK } from '../networks';
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { Network } from '../networks'; // eslint-disable-line
|
||||
import { Network } from '../networks';
|
||||
import { p2data as embed } from './embed';
|
||||
import { p2ms } from './p2ms';
|
||||
import { p2pk } from './p2pk';
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { Payment, PaymentOpts } from './index'; // eslint-disable-line
|
||||
import { Payment, PaymentOpts } from './index';
|
||||
import * as bscript from '../script';
|
||||
import * as lazy from './lazy';
|
||||
import { bitcoin as BITCOIN_NETWORK } from '../networks';
|
||||
|
@ -32,7 +32,7 @@ export function p2ms(a: Payment, opts?: PaymentOpts): Payment {
|
|||
return (
|
||||
bscript.isCanonicalScriptSignature(<Buffer>x) ||
|
||||
(opts!.allowIncomplete && <number>x === OPS.OP_0) !== undefined
|
||||
); // eslint-disable-line
|
||||
);
|
||||
}
|
||||
|
||||
typef(
|
||||
|
@ -58,8 +58,8 @@ export function p2ms(a: Payment, opts?: PaymentOpts): Payment {
|
|||
if (decoded) return;
|
||||
decoded = true;
|
||||
chunks = <Array<Buffer | number>>bscript.decompile(output);
|
||||
o.m = <number>chunks[0] - OP_INT_BASE; // eslint-disable-line
|
||||
o.n = <number>chunks[chunks.length - 2] - OP_INT_BASE; // eslint-disable-line
|
||||
o.m = <number>chunks[0] - OP_INT_BASE;
|
||||
o.n = <number>chunks[chunks.length - 2] - OP_INT_BASE;
|
||||
o.pubkeys = <Array<Buffer>>chunks.slice(1, -2);
|
||||
}
|
||||
|
||||
|
@ -115,12 +115,7 @@ export function p2ms(a: Payment, opts?: PaymentOpts): Payment {
|
|||
if (chunks[chunks.length - 1] !== OPS.OP_CHECKMULTISIG)
|
||||
throw new TypeError('Output is invalid');
|
||||
|
||||
if (
|
||||
o.m! <= 0 || // eslint-disable-line
|
||||
o.n! > 16 || // eslint-disable-line
|
||||
o.m! > o.n! || // eslint-disable-line
|
||||
o.n !== chunks.length - 3
|
||||
)
|
||||
if (o.m! <= 0 || o.n! > 16 || o.m! > o.n! || o.n !== chunks.length - 3)
|
||||
throw new TypeError('Output is invalid');
|
||||
if (!o.pubkeys!.every(x => ecc.isPoint(x)))
|
||||
throw new TypeError('Output is invalid');
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { Payment, PaymentOpts } from './index'; // eslint-disable-line
|
||||
import { Payment, PaymentOpts } from './index';
|
||||
import * as bscript from '../script';
|
||||
import * as lazy from './lazy';
|
||||
import { bitcoin as BITCOIN_NETWORK } from '../networks';
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { Payment, PaymentOpts } from './index'; // eslint-disable-line
|
||||
import { Payment, PaymentOpts } from './index';
|
||||
import * as bscript from '../script';
|
||||
import * as bcrypto from '../crypto';
|
||||
import * as lazy from './lazy';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { Payment, PaymentOpts } from './index'; // eslint-disable-line
|
||||
import { bitcoin as BITCOIN_NETWORK } from '../networks'; // eslint-disable-line
|
||||
import { Payment, PaymentOpts } from './index';
|
||||
import { bitcoin as BITCOIN_NETWORK } from '../networks';
|
||||
import * as bscript from '../script';
|
||||
import * as bcrypto from '../crypto';
|
||||
import * as lazy from './lazy';
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { Payment, PaymentOpts } from './index'; // eslint-disable-line
|
||||
import { Payment, PaymentOpts } from './index';
|
||||
import * as bscript from '../script';
|
||||
import * as bcrypto from '../crypto';
|
||||
import * as lazy from './lazy';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { Payment, PaymentOpts } from './index'; // eslint-disable-line
|
||||
import { bitcoin as BITCOIN_NETWORK } from '../networks'; // eslint-disable-line
|
||||
import { Payment, PaymentOpts } from './index';
|
||||
import { bitcoin as BITCOIN_NETWORK } from '../networks';
|
||||
import * as bscript from '../script';
|
||||
import * as bcrypto from '../crypto';
|
||||
import * as lazy from './lazy';
|
||||
|
|
Loading…
Reference in a new issue