DoubleMap extended tests (#1179)

* DoubleMap extended tests

* TwoX64Concat test (aligned with Rust)

* Remove .only

* Update Type.ts

* And working

* Check the full JSON output for the keys (future-proof)

* Renames
This commit is contained in:
Jaco Greeff
2019-07-24 16:04:55 +02:00
committed by GitHub
parent e15db8aed9
commit 48159cfb5a
7 changed files with 83 additions and 10 deletions
@@ -58,6 +58,7 @@ export default function createFunction ({ meta, method, prefix, section }: Creat
if (meta.type.isDoubleMap) {
assert(!isUndefined(arg) && !isNull(arg) && !isUndefined(arg[0]) && !isNull(arg[0]) && !isUndefined(arg[1]) && !isNull(arg[1]), `${meta.name} expects two arguments`);
const type1 = meta.type.asDoubleMap.key1.toString();
const type2 = meta.type.asDoubleMap.key2.toString();
const param1Encoded = u8aConcat(key, createType(type1, arg[0]).toU8a(true));