Skip to content
This repository was archived by the owner on Aug 2, 2022. It is now read-only.
This repository was archived by the owner on Aug 2, 2022. It is now read-only.

SerialBuffer.pushAsset does not validate symbol #665

@michaeljyeates

Description

@michaeljyeates

Version of EOSJS
21

Describe the bug
SerialBuffer.pushAsset will accept invalid symbols in the string supplied

To Reproduce

const {Serialize} = require('eosjs');

const sb = new Serialize.SerialBuffer({
    textEncoder: new TextEncoder,
    textDecoder: new TextDecoder
});

sb.pushAsset('10.000 EOS blah')

console.log(sb.getAsset())

>> 10.000 EOS bla

This should throw an error after validating the symbol

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions