aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/0x.js.ts10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/0x.js.ts b/test/0x.js.ts
index 651407af3..3d9a7a810 100644
--- a/test/0x.js.ts
+++ b/test/0x.js.ts
@@ -42,6 +42,16 @@ describe('ZeroEx library', () => {
const isValid = ZeroEx.isValidSignature(data, malformedSignature, address);
expect(isValid).to.be.false;
});
+ it('s is not hex', () => {
+ const malformedS = signature.s.replace('0', 'z');
+ const malformedSignature = {
+ v: signature.v,
+ r: signature.r,
+ s: malformedS,
+ };
+ const isValid = ZeroEx.isValidSignature(data, malformedSignature, address);
+ expect(isValid).to.be.false;
+ });
});
it('should return false if the data doesn\'t pertain to the signature & address', () => {
const isValid = ZeroEx.isValidSignature('wrong data', signature, address);