Closed
Conversation
The Striga exchange enforces a minimum trade value in BTC terms, which when converted to EUR at current rates, is higher than the platform's configured minAmount of 1 EUR. This causes quote creation to fail with BelowMinimumTradeValueError for amounts like 5 USD (~4.28 EUR) that are above the stated EUR minimum but below Striga's BTC minimum. Changes: - Add umaProviderMinAmount and umaProviderMaxAmount read-only fields to PlatformCurrencyConfig schema to surface provider-level constraints - Update CurrencyPreference min/max descriptions to clarify they represent the effective limits (accounting for provider constraints) - Update minAmount/maxAmount descriptions to explain the relationship with provider limits: effective min = max(minAmount, umaProviderMinAmount) - Add client-side min/max validation in the sample frontend before creating a quote, with error messaging - Update LookupResponse types to include min, max, and currency decimals - Document provider-level limits in platform configuration guide - Add AMOUNT_OUT_OF_RANGE error documentation with guidance on provider-level minimums (BTC-denominated floor converted to target currency) - Update sending-payments guide with a warning about validating amounts against the effective min/max from the lookup response - Update EUR example min from 100 to 500 to reflect realistic minimums Co-authored-by: Peng Ying <pengying@users.noreply.github.com>
|
Cursor Agent can help with this pull request. Just |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add provider-level min/max amount fields to UMAAS API and implement client-side validation to align with Striga's BTC-denominated minimums.
The previous EUR minimum in UMAAS API lookup responses was misleading as it didn't account for Striga's underlying BTC-denominated minimum trade value. This caused payments that appeared valid to fail with
BelowMinimumTradeValueError. This PR introduces fields to expose the actual provider limits and adds client-side validation to prevent such failures.Slack Thread