Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Amount with int type may exceed max size on Ethereumn transaction #14

Open
shawn-cx-li opened this issue Feb 3, 2022 · 0 comments
Open

Comments

@shawn-cx-li
Copy link

shawn-cx-li commented Feb 3, 2022

Hi @eslavyansky

https://github.com/jazzserve/bitgo/blob/master/wallet-operations-basic.go#L177

int type has a max size of 2^63 -1 which is 9.22 * 10^18
According to the documentation on bitgo websize, we are sending the base unit for "sendcoins" API, which is "wei" on Ethereum. It will be problematic if we are sending over 9.23 eth from this SDK, becasue 9.23 eth = 9.23 * 10^18 wei and this number breaks the max size of int type.

Could you change it to string so it will be safe to send coins on Ethreumn?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant