Skip to content

Commit

Permalink
Merge pull request #1707 from p2p-org/feature/pwn-985
Browse files Browse the repository at this point in the history
[ETH-985] Small fixes for swap: default slippage and remove string
  • Loading branch information
lisemyon authored Feb 16, 2024
2 parents e21270b + 838bbad commit 0483f0a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion p2p_wallet/Resources/Base.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@
"With Key App, all transactions you make on the Solana network are free" = "With Key App, all transactions you make on the Solana network are free";
"Okay" = "Okay";
"A fee paid to the liquidity providers" = "A fee paid to the liquidity providers";
"%@ Liquidity fee %@" = "%@ Liquidity fee %@";
"%@ Liquidity fee" = "%@ Liquidity fee";
"Low slippage %@. We recommend to increase slippage manually" = "Low slippage %@. We recommend to increase slippage manually";
"Increase slippage and try again" = "Increase slippage and try again";
"popular" = "popular";
Expand Down
2 changes: 1 addition & 1 deletion p2p_wallet/Resources/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"%@ Liquidity fee %@" = "%@ Liquidity fee %@";
"%@ Liquidity fee" = "%@ Liquidity fee";
"%@ doesn't work. Try another option" = "%@ doesn't work. Try another option";
"%@ found" = "%@ found";
"%@ is the minimum amount to receive from the Ethereum Network" = "%@ is the minimum amount to receive from the Ethereum Network";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ extension JupiterSwapBusinessLogic {
$0.tokensPriceMap = priceMapResult
$0.routeMap = routeMap
$0.swapTokens = swapTokensResult
$0.slippageBps = Int(0.5 * 100)
$0.slippageBps = Int(1.0 * 100)
$0.fromToken = fromToken
$0.toToken = toToken
$0.lamportPerSignature = lamportPerSignatureResult
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,7 @@ private extension JupiterSwapState {

var liquidutyFees = info.liquidityFee.map { lqFee in
SwapSettingsInfoViewModel.Fee(
title: L10n.liquidityFee(
lqFee.tokenName ?? L10n.unknownToken,
"\(lqFee.pct == nil ? L10n.unknown : "\(NSDecimalNumber(decimal: lqFee.pct!).doubleValue.toString(maximumFractionDigits: 9))")%"
),
title: L10n.liquidityFee(lqFee.tokenName ?? L10n.unknownToken),
subtitle: lqFee.amount.tokenAmountFormattedString(symbol: lqFee.tokenSymbol ?? "UNKNOWN"),
amount: lqFee.amountInFiatDescription
)
Expand Down

0 comments on commit 0483f0a

Please sign in to comment.