From c1518569d348ca020a955dd0788250ecabd8e1fc Mon Sep 17 00:00:00 2001 From: Todd Fleming Date: Tue, 22 Jan 2019 11:51:47 -0500 Subject: [PATCH] Represent empty name as "" to match RPC v1 --- src/eosjs-serialize.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/eosjs-serialize.ts b/src/eosjs-serialize.ts index b96cb79de..ec6164b35 100644 --- a/src/eosjs-serialize.ts +++ b/src/eosjs-serialize.ts @@ -356,9 +356,6 @@ export class SerialBuffer { result += "."; } } - if (result === ".............") { - return result; - } while (result.endsWith(".")) { result = result.substr(0, result.length - 1); } @@ -877,7 +874,7 @@ export function createInitialTypes(): Map { } }, deserialize(buffer: SerialBuffer, state?: SerializerState) { - if (state.options.bytesAsUint8Array) { + if (state && state.options.bytesAsUint8Array) { return buffer.getBytes(); } else { return arrayToHex(buffer.getBytes());