gsn icon indicating copy to clipboard operation
gsn copied to clipboard

BN conversion error with high stake amount (1000 tokens)

Open SergeevDmitry opened this issue 1 year ago • 0 comments

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"

SergeevDmitry avatar May 15 '24 14:05 SergeevDmitry