-
Notifications
You must be signed in to change notification settings - Fork 13
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
Validate Provider Token Max Order Amount Against Bucket Size #399
Comments
Could I take over this issue? |
Hey! I'm Jan. • Dojo |
Can I be assigned to this? first time contributor |
I'd like to take this issue. |
@caxtonacollins are you working on this ticket? |
Can I handle this task? |
May I try my hand at this? |
Can I handle this task? |
’d love to work on this issue to ensure that providers cannot set token max order amounts beyond the largest provision bucket size. I will modify the UpdateProviderProfile controller to fetch the provider’s fiat currency and market rate, retrieve the largest provision bucket, convert the max order amount to local currency, and validate it against the bucket limits. Requests exceeding the limit or missing a provision bucket will return appropriate errors |
May I take this issue on? |
Can I take this issue? |
Can I jump on this task? |
User Story
As a system operator, I want to ensure providers can't set token max order amounts that exceed our largest provision bucket size, to maintain consistent order handling across the platform.
Acceptance Criteria
GIVEN a provider is updating a token's max order amount
WHEN the amount converted to local currency exceeds the largest bucket size
THEN the request is rejected with an appropriate error message
GIVEN a provider is updating a token's max order amount
WHEN the amount converted to local currency is within bucket limits
THEN the update is successful
GIVEN a provider is setting a token's max order amount
WHEN their local currency has no provision buckets
THEN the request is rejected with an appropriate error message
Tech Details
storage.Client.ProvisionBucket.Query().Where(provisionbucket.HasCurrencyWith(fiatcurrency.IDEQ(currency.ID))).Order(ent.Desc(provisionbucket.FieldMaxAmount)).First(ctx)
tokenPayload.MaxOrderAmount.Mul(currency.MarketRate)
Notes/Assumptions
Open Questions
The text was updated successfully, but these errors were encountered: