Skip to content

Commit 03fd913

Browse files
authored
fix: cp-7.46.0 show "auto" when slippage is undefined (#15083)
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** Shows "Auto" as the slippage text on Solana swaps when the slippage is undefined. This case is for LiFi so it uses their dynamic slippage. <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> ## **Related issues** Fixes: ## **Manual testing steps** 1. Go to this solana swap 2. Get quotes 3. See "Auto" as slippage value ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [ ] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.
1 parent 471db71 commit 03fd913

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

88
## [Unreleased]
9+
- fix(bridge): show "Auto" slippage for Solana swaps
910

1011
### Added
1112

app/components/UI/Bridge/hooks/useBridgeQuoteData/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ export const useBridgeQuoteData = () => {
124124
estimatedTime: `${Math.ceil(estimatedProcessingTimeInSeconds / 60)} min`,
125125
rate,
126126
priceImpact: `${priceImpactPercentage.toFixed(2)}%`,
127-
slippage: `${slippage}%`,
127+
slippage: slippage ? `${slippage}%` : 'Auto',
128128
};
129129
}, [
130130
activeQuote,

0 commit comments

Comments
 (0)