In @0x/order-utils: Add signerAddress and signature to ExchangeRevertErrors.SignatureError.

In `@0x/contracts-exchange`: Add `signerAddress` and `signature` to `SignatureError` reverts.
This commit is contained in:
Lawrence Forman
2019-04-11 18:13:55 -04:00
committed by Amir Bandeali
parent ac18359410
commit a0223835b8
10 changed files with 142 additions and 106 deletions

View File

@@ -265,6 +265,8 @@ describe('Exchange core', () => {
const expectedError = new ExchangeRevertErrors.SignatureError(
ExchangeRevertErrors.SignatureErrorCode.BadSignature,
orderHashHex,
signedOrder.makerAddress,
invalidSigHex,
);
const tx = exchangeWrapper.fillOrderAsync(signedOrder, takerAddress);
return expect(tx).to.revertWith(expectedError);
@@ -299,6 +301,8 @@ describe('Exchange core', () => {
const expectedError = new ExchangeRevertErrors.SignatureError(
ExchangeRevertErrors.SignatureErrorCode.WalletError,
orderHashHex,
signedOrder.makerAddress,
signedOrder.signature,
);
const tx = exchangeWrapper.fillOrderAsync(signedOrder, takerAddress);
return expect(tx).to.revertWith(expectedError);
@@ -316,6 +320,8 @@ describe('Exchange core', () => {
const expectedError = new ExchangeRevertErrors.SignatureError(
ExchangeRevertErrors.SignatureErrorCode.ValidatorError,
orderHashHex,
signedOrder.makerAddress,
signedOrder.signature,
);
const tx = exchangeWrapper.fillOrderAsync(signedOrder, takerAddress);
return expect(tx).to.revertWith(expectedError);