Skip to content

MosaicNonce.createFromHex failing on first block MosaicDefinitionTransaction #474

@decentraliser

Description

@decentraliser

Not sure about what is the root cause, but this is throwing an error with the new network

When calling blockHttp.getBlockTransactions(1),
the network currency MosaicDefinitionTransaction's DTO has a nonce of 0 (see below)

Then it will be passed to CreateStandaloneTransactionFromDTO, that will ultimately pass this 0 by Convert.hexToUint8, and throw

https://github.com/nemtech/symbol-sdk-typescript-javascript/blob/fa035d8c7f7c73b5a7d6266072822e0a289cf4cb/src/model/mosaic/MosaicNonce.ts#L48

https://github.com/nemtech/symbol-sdk-typescript-javascript/blob/master/src/core/format/Convert.ts#L58-L60

    public static hexToUint8 = (input: string): Uint8Array => {
        if (0 !== input.length % 2) {
            throw Error(`hex string has unexpected size '${input.length}'`);
        }

node/block/1/transactions
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions