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

Renew amount lower than price #11

Open
friedger opened this issue Jun 27, 2023 · 2 comments
Open

Renew amount lower than price #11

friedger opened this issue Jun 27, 2023 · 2 comments

Comments

@friedger
Copy link
Contributor

I tried to renew friedger.crashpunk and the tx failed because the submitted amount was lower than the price.

https://explorer.hiro.so/txid/0xa3a3d1552bc9f1eff8bc5c47f44f99767d985a852bb66adeff5993e52d874ac7?chain=mainnet

https://api.hiro.so/extended/v1/tx/0xa3a3d1552bc9f1eff8bc5c47f44f99767d985a852bb66adeff5993e52d874ac7

Submitted was u9999999999999999635896294965248 but the price is 9999999999999999999999999999990

@friedger
Copy link
Contributor Author

Looks like an issue with safe numbers and how the price result is converted
hirosystems/stacks.js#1515

@friedger
Copy link
Contributor Author

Using

      uintCV(price.toLocaleString('fullwide', {useGrouping:false})),

in renew worked because the price was 1e+31 but might fail for numbers with more precision

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