Properly toJSON() on StorageFunction (#179)

* Properly toJSON() on StorageFunction

* Add isZero(), cmp & toStringFormat

* Update tests for UInt toString()
This commit is contained in:
Jaco Greeff
2018-10-01 16:33:01 +02:00
committed by GitHub
parent 69ab177468
commit 0c906e54f8
4 changed files with 17 additions and 6 deletions
+2 -2
View File
@@ -15,7 +15,7 @@ describe('Struct', () => {
u32: U32
})
)({ txt: 'foo', u32: 0x123456 }).toString()
).toEqual(`{txt: foo, u32: 0x00123456}`);
).toEqual(`{txt: foo, u32: 1193046}`);
});
it('exposes the types', () => {
@@ -43,6 +43,6 @@ describe('Struct', () => {
test.values().map((v) =>
v.toString()
)
).toEqual(['bazzing', '0x00000045']);
).toEqual(['bazzing', '69']);
});
});