Skip to content

BN conversion error with high stake amount (1000 tokens) #1014

@SergeevDmitry

Description

@SergeevDmitry

Describe the bug
Hello. I setup GSN for my test network. I did set required stake amount to 1000 tokens. When I try to register new relay with --stake 1000 option it produces the following error

Failed to register relay: Error: [number-to-bn] while converting number 1e+21 to BN.js instance, error: invalid number value. Value must be an integer, hex string, BN or BigNumber instance. Note, decimals are not supported. Given value: "1e+21"

Steps To Reproduce
Steps to reproduce the behavior:

  1. Set required stake amount to 1000 tokens
  2. Run gsn relayer-register --stake 1000

Expected behavior
Command should parse high amounts without errors

Console Logs and/or Screenshots

Failed to register relay: Error: [number-to-bn] while converting number 1e+21 to BN.js instance, error: invalid number value. Value must be an integer, hex string, BN or BigNumber instance. Note, decimals are not supported. Given value: "1e+21"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions