You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Explanation
Determine Relay provider fees directly from data with no calculation.
## References
Related to
[#6186](MetaMask/MetaMask-planning#6186)
## Checklist
- [x] I've updated the test suite for new or updated code as appropriate
- [x] I've updated documentation (JSDoc, Markdown, etc.) for new or
updated code as appropriate
- [x] I've communicated my changes to consumers by [updating changelogs
for packages I've
changed](https://github.com/MetaMask/core/tree/main/docs/contributing.md#updating-changelogs),
highlighting breaking changes as necessary
- [x] I've prepared draft pull requests for clients and consumer
packages to resolve any breaking changes
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Read provider fees directly from Relay response
(`fees.relayer.amountUsd`) and update quote normalization, types, and
tests accordingly.
>
> - **Relay strategy**
> - **Fee source**: Use `fees.relayer.amountUsd` for provider fee in
`normalizeQuote` instead of deriving from `details`.
> - **Types**: Update `RelayQuote` to remove `details.currencyIn` and
replace `fees.gas` with `fees.relayer` in `src/strategy/relay/types.ts`.
> - **Normalization**: Adjust provider fee calculation in
`src/strategy/relay/relay-quotes.ts`.
> - **Tests**
> - Update `relay-quotes.test.ts` mocks and expectations to align with
new `fees.relayer` structure and provider fee calculation.
> - **Changelog**
> - Add entry: Read Relay provider fees directly from response.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
b91a4ca. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
0 commit comments