moleculerjs / moleculer-repl

REPL module for Moleculer framework
http://moleculer.services/docs/moleculer-repl.html
MIT License
27 stars 25 forks source link

Hexadecimal is converted into number in action parameter #47

Closed andylim0221 closed 2 years ago

andylim0221 commented 4 years ago

Current Behavior

We have an action with the following parameter setup:

params: {
  transactionHash: 'string'
}

We pass a hexadecimal string, eg. '0xab706...' into the params, the hexadecimal string is being converted into number '7.7544153918976e+76'.

Expected Behavior

Expected to pass the original hexadecimal string and not convert it.

Context

icebob commented 4 years ago

I don't think so. https://repl.it/@icebob/moleculer-dev-hexdec

AndreMaz commented 4 years ago

I could reproduce with REPL. So it's not a validation issue

image

icebob commented 4 years ago

In this case, the problem is in vorpal?

AndreMaz commented 4 years ago

Yes, I think it is. @andylim0221 can you provide more info? Did you use REPL?

andylim0221 commented 4 years ago

@AndreMaz I was using moleculer-repl.

andylim0221 commented 4 years ago

however, when i query it through the url, it works out as what I expected. Perhaps there must be something wrong with the moleculer-repl.