near / near-workspaces-js

Write tests once, run them both on NEAR TestNet and a controlled NEAR Sandbox local environment
https://near.github.io/near-workspaces-js/
GNU General Public License v3.0
44 stars 23 forks source link

toYocto: handle any valid number #30

Closed chadoh closed 3 years ago

chadoh commented 3 years ago

Today, our toYocto function requires a string. It should also handle valid numbers.

https://github.com/near/runner-js/blob/4aeb45ee4c9593bc71ea4338a537ceb78dd96161/src/utils.ts#L10-L24

willemneal commented 3 years ago

This is now fixed since we reexport parseNearAmount from near-api-js.