Fix lint errors

This commit is contained in:
Elliot Lee
2019-10-28 17:01:32 -07:00
parent 5cf01ba099
commit 789497b07e
2 changed files with 21 additions and 22 deletions

View File

@@ -66,7 +66,7 @@ function scaleValue(value, multiplier, extra = 0) {
* `false` if no tag should be used; * `false` if no tag should be used;
* `undefined` if the input could not specify whether a tag should be used. * `undefined` if the input could not specify whether a tag should be used.
*/ */
interface ClassicAccountAndTag { export interface ClassicAccountAndTag {
classicAccount: string, classicAccount: string,
tag: number | false | undefined tag: number | false | undefined
} }
@@ -299,6 +299,5 @@ export {
prepareTransaction, prepareTransaction,
common, common,
setCanonicalFlag, setCanonicalFlag,
getClassicAccountAndTag, getClassicAccountAndTag
ClassicAccountAndTag
} }

View File

@@ -1114,7 +1114,7 @@ describe('X-address Usage', function () {
}).catch(done); // Finish test with assertion failure immediately instead of waiting for timeout. }).catch(done); // Finish test with assertion failure immediately instead of waiting for timeout.
} catch (err) { } catch (err) {
done(new Error('Expected method to reject, but method threw. Thrown: ' + err)); done(new Error('Expected method to reject, but method threw. Thrown: ' + err));
}; }
}); });
it('rejects promise and does not throw when field is missing', function (done) { it('rejects promise and does not throw when field is missing', function (done) {
@@ -1143,7 +1143,7 @@ describe('X-address Usage', function () {
}).catch(done); // Finish test with assertion failure immediately instead of waiting for timeout. }).catch(done); // Finish test with assertion failure immediately instead of waiting for timeout.
} catch (err) { } catch (err) {
done(new Error('Expected method to reject, but method threw. Thrown: ' + err)); done(new Error('Expected method to reject, but method threw. Thrown: ' + err));
}; }
}); });
it('rejects promise and does not throw when fee exceeds maxFeeXRP', function (done) { it('rejects promise and does not throw when fee exceeds maxFeeXRP', function (done) {
@@ -1177,7 +1177,7 @@ describe('X-address Usage', function () {
}).catch(done); // Finish test with assertion failure immediately instead of waiting for timeout. }).catch(done); // Finish test with assertion failure immediately instead of waiting for timeout.
} catch (err) { } catch (err) {
done(new Error('Expected method to reject, but method threw. Thrown: ' + err)); done(new Error('Expected method to reject, but method threw. Thrown: ' + err));
}; }
}); });
it('preparePayment - XRP to XRP no partial', function (done) { it('preparePayment - XRP to XRP no partial', function (done) {
@@ -1192,7 +1192,7 @@ describe('X-address Usage', function () {
}).catch(done); // Finish test with assertion failure immediately instead of waiting for timeout. }).catch(done); // Finish test with assertion failure immediately instead of waiting for timeout.
} catch (err) { } catch (err) {
done(new Error('Expected method to reject, but method threw. Thrown: ' + err)); done(new Error('Expected method to reject, but method threw. Thrown: ' + err));
}; }
}); });
it('preparePayment - address must match payment.source.address', function (done) { it('preparePayment - address must match payment.source.address', function (done) {
@@ -1207,7 +1207,7 @@ describe('X-address Usage', function () {
}).catch(done); // Finish test with assertion failure immediately instead of waiting for timeout. }).catch(done); // Finish test with assertion failure immediately instead of waiting for timeout.
} catch (err) { } catch (err) {
done(new Error('Expected method to reject, but method threw. Thrown: ' + err)); done(new Error('Expected method to reject, but method threw. Thrown: ' + err));
}; }
}); });
it('preparePayment - mismatched X-address tag', function (done) { it('preparePayment - mismatched X-address tag', function (done) {
@@ -1239,7 +1239,7 @@ describe('X-address Usage', function () {
}).catch(done); // Finish test with assertion failure immediately instead of waiting for timeout. }).catch(done); // Finish test with assertion failure immediately instead of waiting for timeout.
} catch (err) { } catch (err) {
done(new Error('Expected method to reject, but method threw. Thrown: ' + err)); done(new Error('Expected method to reject, but method threw. Thrown: ' + err));
}; }
}); });
it('preparePayment - mismatched X-address account', function (done) { it('preparePayment - mismatched X-address account', function (done) {
@@ -1270,7 +1270,7 @@ describe('X-address Usage', function () {
}).catch(done); // Finish test with assertion failure immediately instead of waiting for timeout. }).catch(done); // Finish test with assertion failure immediately instead of waiting for timeout.
} catch (err) { } catch (err) {
done(new Error('Expected method to reject, but method threw. Thrown: ' + err)); done(new Error('Expected method to reject, but method threw. Thrown: ' + err));
}; }
}); });
it('preparePayment - wrong amount', function (done) { it('preparePayment - wrong amount', function (done) {
@@ -1285,7 +1285,7 @@ describe('X-address Usage', function () {
}).catch(done); // Finish test with assertion failure immediately instead of waiting for timeout. }).catch(done); // Finish test with assertion failure immediately instead of waiting for timeout.
} catch (err) { } catch (err) {
done(new Error('Expected method to reject, but method threw. Thrown: ' + err)); done(new Error('Expected method to reject, but method threw. Thrown: ' + err));
}; }
}); });
it('preparePayment - throws when fee exceeds 2 XRP', function (done) { it('preparePayment - throws when fee exceeds 2 XRP', function (done) {
@@ -1305,7 +1305,7 @@ describe('X-address Usage', function () {
}).catch(done); // Finish test with assertion failure immediately instead of waiting for timeout. }).catch(done); // Finish test with assertion failure immediately instead of waiting for timeout.
} catch (err) { } catch (err) {
done(new Error('Expected method to reject, but method threw. Thrown: ' + err)); done(new Error('Expected method to reject, but method threw. Thrown: ' + err));
}; }
}); });
}); });
@@ -1408,7 +1408,7 @@ describe('X-address Usage', function () {
}).catch(done); // Finish test with assertion failure immediately instead of waiting for timeout. }).catch(done); // Finish test with assertion failure immediately instead of waiting for timeout.
} catch (err) { } catch (err) {
done(new Error('Expected method to reject, but method threw. Thrown: ' + err)); done(new Error('Expected method to reject, but method threw. Thrown: ' + err));
}; }
}); });
it('prepareOrderCancellation', function () { it('prepareOrderCancellation', function () {
@@ -1447,7 +1447,7 @@ describe('X-address Usage', function () {
}).catch(done); // Finish test with assertion failure immediately instead of waiting for timeout. }).catch(done); // Finish test with assertion failure immediately instead of waiting for timeout.
} catch (err) { } catch (err) {
done(new Error('Expected method to reject, but method threw. Thrown: ' + err)); done(new Error('Expected method to reject, but method threw. Thrown: ' + err));
}; }
}); });
it('prepareTrustline - simple', function () { it('prepareTrustline - simple', function () {
@@ -1482,7 +1482,7 @@ describe('X-address Usage', function () {
}).catch(done); // Finish test with assertion failure immediately instead of waiting for timeout. }).catch(done); // Finish test with assertion failure immediately instead of waiting for timeout.
} catch (err) { } catch (err) {
done(new Error('Expected method to reject, but method threw. Thrown: ' + err)); done(new Error('Expected method to reject, but method threw. Thrown: ' + err));
}; }
}); });
it('prepareSettings', function () { it('prepareSettings', function () {
@@ -1579,7 +1579,7 @@ describe('X-address Usage', function () {
}).catch(done); // Finish test with assertion failure immediately instead of waiting for timeout. }).catch(done); // Finish test with assertion failure immediately instead of waiting for timeout.
} catch (err) { } catch (err) {
done(new Error('Expected method to reject, but method threw. Thrown: ' + err)); done(new Error('Expected method to reject, but method threw. Thrown: ' + err));
}; }
}); });
it('prepareSettings - signers no weights', function () { it('prepareSettings - signers no weights', function () {
@@ -1635,7 +1635,7 @@ describe('X-address Usage', function () {
}).catch(done); // Finish test with assertion failure immediately instead of waiting for timeout. }).catch(done); // Finish test with assertion failure immediately instead of waiting for timeout.
} catch (err) { } catch (err) {
done(new Error('Expected method to reject, but method threw. Thrown: ' + err)); done(new Error('Expected method to reject, but method threw. Thrown: ' + err));
}; }
}); });
it('prepareEscrowCreation', function () { it('prepareEscrowCreation', function () {
@@ -1670,7 +1670,7 @@ describe('X-address Usage', function () {
}).catch(done); // Finish test with assertion failure immediately instead of waiting for timeout. }).catch(done); // Finish test with assertion failure immediately instead of waiting for timeout.
} catch (err) { } catch (err) {
done(new Error('Expected method to reject, but method threw. Thrown: ' + err)); done(new Error('Expected method to reject, but method threw. Thrown: ' + err));
}; }
}); });
it('prepareEscrowExecution', function () { it('prepareEscrowExecution', function () {
@@ -1703,7 +1703,7 @@ describe('X-address Usage', function () {
}).catch(done); // Finish test with assertion failure immediately instead of waiting for timeout. }).catch(done); // Finish test with assertion failure immediately instead of waiting for timeout.
} catch (err) { } catch (err) {
done(new Error('Expected method to reject, but method threw. Thrown: ' + err)); done(new Error('Expected method to reject, but method threw. Thrown: ' + err));
}; }
}); });
it('prepareEscrowExecution - no fulfillment', function (done) { it('prepareEscrowExecution - no fulfillment', function (done) {
@@ -1718,7 +1718,7 @@ describe('X-address Usage', function () {
}).catch(done); // Finish test with assertion failure immediately instead of waiting for timeout. }).catch(done); // Finish test with assertion failure immediately instead of waiting for timeout.
} catch (err) { } catch (err) {
done(new Error('Expected method to reject, but method threw. Thrown: ' + err)); done(new Error('Expected method to reject, but method threw. Thrown: ' + err));
}; }
}); });
it('prepareEscrowCancellation', function () { it('prepareEscrowCancellation', function () {
@@ -2302,7 +2302,7 @@ describe('X-address Usage', function () {
}).catch(done); // Finish test with assertion failure immediately instead of waiting for timeout. }).catch(done); // Finish test with assertion failure immediately instead of waiting for timeout.
} catch (err) { } catch (err) {
done(new Error('Expected method to reject, but method threw. Thrown: ' + err)); done(new Error('Expected method to reject, but method threw. Thrown: ' + err));
}; }
}); });
it('rejects Promise on preparePaymentChannelClaim with no signature', function (done) { it('rejects Promise on preparePaymentChannelClaim with no signature', function (done) {
@@ -2317,7 +2317,7 @@ describe('X-address Usage', function () {
}).catch(done); // Finish test with assertion failure immediately instead of waiting for timeout. }).catch(done); // Finish test with assertion failure immediately instead of waiting for timeout.
} catch (err) { } catch (err) {
done(new Error('Expected method to reject, but method threw. Thrown: ' + err)); done(new Error('Expected method to reject, but method threw. Thrown: ' + err));
}; }
}); });
it('sign', function () { it('sign', function () {