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

Deposited amount not handled correctly on INSUFFICIENT_SPACE #175

Open
Dutch-0 opened this issue Jun 21, 2024 · 0 comments
Open

Deposited amount not handled correctly on INSUFFICIENT_SPACE #175

Dutch-0 opened this issue Jun 21, 2024 · 0 comments

Comments

@Dutch-0
Copy link

Dutch-0 commented Jun 21, 2024

This line seems to be incorrect, since amount is simply set to 0, but some funds may have been deposited:

case INSUFFICIENT_SPACE:
return new EconomyResponse(0, account.balance(), ResponseType.FAILURE, LANG
.plugin_vault_insufficientSpace);

I would submit a PR, but what is the correct Vault approach here?
Should amount be the actual deposited amount, or the remaining amount (which could not be deposited)?
Also is ResponseType.FAILURE correct in this case?

The vault documentation is not really helpful here:
http://milkbowl.github.io/VaultAPI/net/milkbowl/vault/economy/EconomyResponse.html#amount
http://milkbowl.github.io/VaultAPI/net/milkbowl/vault/economy/EconomyResponse.html#type

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