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

cryptic "Withdrawal ... failed" diagnostic on withdraw with copyBag value #8132

Open
dckc opened this issue Aug 1, 2023 · 0 comments
Open
Labels
bug Something isn't working

Comments

@dckc
Copy link
Member

dckc commented Aug 1, 2023

Describe the bug

This diagnostic from E(purse).withdraw(amt) seems to be trying to tell me the amounts that aren't in the right isGTE relationship, but [copyBag] is indistinguishable from [copyBag] and hence showing them is not very helpful:

Withdrawal of {"brand":"[Alleged: Place brand]","value":"[copyBag]"} failed because the purse only contained {"brand":"[Alleged: Place brand]","value":"[copyBag]"}

To Reproduce

Steps to reproduce the behavior:

  1. call makeIssuerKit with AssetKind.COPY_BAG
  2. call E(issuer).makeEmptyPurse()
  3. call E(pruse).withdraw(AmountMath.make(brand, makeCopyBag([['sword', 1n]])
  4. See error above

Expected behavior

Tell me I don't have enough swords. Or just tell me "insufficient funds" and don't try to show the copyBag values.

Additional context

@dckc dckc added the bug Something isn't working label Aug 1, 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

1 participant