@vostokplatform/signature-generator
Advanced tools
Comparing version 2.0.0-RC7 to 2.0.0-RC8
@@ -77,3 +77,3 @@ import { BigNumber } from '@waves/data-entities'; | ||
constructor(required: boolean); | ||
getBytes(value: string): Promise<Uint8Array>; | ||
getBytes(value: string): Promise<any>; | ||
} | ||
@@ -80,0 +80,0 @@ export declare class MandatoryAssetId extends ByteProcessor<string> { |
@@ -351,4 +351,9 @@ "use strict"; | ||
value = blockchainifyAssetId(value); | ||
// We must pass bytes of `[0]` for Waves asset ID and bytes of `[1] + assetId` for other asset IDs | ||
var bytes = value ? concat_1.concatUint8Arrays(Uint8Array.from([1]), base58_1.default.decode(value)) : Uint8Array.from([0]); | ||
var bytes; | ||
if (this.required) { | ||
bytes = base58_1.default.decode(value); | ||
} | ||
else { | ||
bytes = value ? concat_1.concatUint8Arrays(Uint8Array.from([1]), base58_1.default.decode(value)) : Uint8Array.from([0]); | ||
} | ||
return Promise.resolve(bytes); | ||
@@ -355,0 +360,0 @@ }; |
{ | ||
"name": "@vostokplatform/signature-generator", | ||
"version": "2.0.0-RC7", | ||
"version": "2.0.0-RC8", | ||
"main": "dist/index.js", | ||
@@ -5,0 +5,0 @@ "files": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
5947116
101469