gsn
gsn copied to clipboard
BN conversion error with high stake amount (1000 tokens)
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:
- Set required stake amount to 1000 tokens
- 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"