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

[Bug]: Sugar doesn't resolve Token decimal places #436

Open
blockiosaurus opened this issue Mar 5, 2023 · 1 comment
Open

[Bug]: Sugar doesn't resolve Token decimal places #436

blockiosaurus opened this issue Mar 5, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@blockiosaurus
Copy link
Contributor

Issue description

  1. Input 3,000,000 BONK for token payment guard config
  2. Deploy Candy Machine
  3. Mint cost is 30 BONK instead of 3M as expected

It seems like Sugar doesn't resolve decimal places for token payments the same way it does for SOL. Ideally the handling should be same.

Relevant log output

No response

Priority this issue should have

Low (slightly annoying)

@blockiosaurus blockiosaurus added the bug Something isn't working label Mar 5, 2023
@samuelvanderwaal samuelvanderwaal added the good first issue Good for newcomers label Mar 11, 2023
@samuelvanderwaal
Copy link
Contributor

This is actually a really annoying refactor as it requires passing a Program object from the main function processing guards through multiple levels of nesting to the TokenPayment to_guard_format implementation. Or we have to know in that function which cluster we're on so we can build a RPC client and a make a network call to find out the number of decimal places in the mint.

The SOL implementation works because we know SOL always has nine decimal places.

@samuelvanderwaal samuelvanderwaal removed the good first issue Good for newcomers label Jun 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants