Skip to content

Commit

Permalink
Fallback for minimum display values for wrap unwraps (#5905)
Browse files Browse the repository at this point in the history
  • Loading branch information
jinchung authored Jun 30, 2024
1 parent 0b1d3eb commit dee02a5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/__swaps__/screens/Swap/components/ReviewPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,11 @@ export function ReviewPanel() {
const validQuote = quote.value as Quote;

if (isInputBasedTrade && internalSelectedOutputAsset.value) {
const minReceived = validQuote.buyAmountDisplayMinimum;
const minReceived = validQuote.buyAmountDisplayMinimum || validQuote.buyAmountMinusFees;
const { display: minReceivedDisplay } = convertRawAmountToBalanceWorklet(minReceived.toString(), internalSelectedOutputAsset.value);
return minReceivedDisplay;
} else if (!isInputBasedTrade && internalSelectedInputAsset.value) {
const maxSold = validQuote.sellAmountDisplay;
const maxSold = validQuote.sellAmountDisplay || validQuote.sellAmountMinusFees;
const { display: maxSoldDisplay } = convertRawAmountToBalanceWorklet(maxSold.toString(), internalSelectedInputAsset.value);
return maxSoldDisplay;
}
Expand Down

0 comments on commit dee02a5

Please sign in to comment.