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.
Previously, the meaning of
fee
was ambiguous becausecryptoAmount
andfiatAmount
denoted an exchange rate that was singular for the quote, butfee
could vary per account type if multiple account types are accepted for the same quote.This PR disambiguates the meaning of
fee
by making it singular as well (one fee per quote).As a side effect, providers will not be able to offer different fees per account type for the same quote. However, this was already the case because of how
cryptoAmount
andfiatAmount
are defined, as the exact amount in/out for a transfer (fees and all!). This spec change is designed to avoid a breaking change on the CICO provider side by simply moving an optional field to a different place within the same quote response.An alternative approach would be to move
cryptoAmount
andfiatAmount
to wherefee
previously was, nested underfiatAccount
in the quote response. This would allow for different fees per fiat account type, but would create a breaking change that is onerous for wallets and, likely, CICO providers. I'd prefer not to do this, since I'm not aware of any providers who rely on being able to levy different fees for different account types right now anyway. Of course, this is always an option for a v2 version of the spec.