Skip to content

Commit

Permalink
bump slippage from 2 to 5 (except mainnet, polygon and bsc) (#6419)
Browse files Browse the repository at this point in the history
* bump slippage from 2 to 5 except mainnet, polygon and bsc

* tmp disable discover search results e2e checks
  • Loading branch information
brunobar79 authored Jan 24, 2025
1 parent e7fecca commit 64d4a73
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 27 deletions.
4 changes: 2 additions & 2 deletions e2e/parallel/4_discoverSheetFlow.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ describe('Discover Screen Flow', () => {
await delayTime('long');
await checkIfVisible('favorites-0');
await checkIfVisible('verified-1');
await checkIfExists('profiles-2');
await checkIfExists('highLiquidity-3');
// await checkIfExists('profiles-2');
// await checkIfExists('highLiquidity-3');
});

it.skip('Should search and open Profile Sheet for rainbowwallet.eth', async () => {
Expand Down
6 changes: 4 additions & 2 deletions src/__swaps__/utils/swaps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ import { IS_APK_BUILD } from 'react-native-dotenv';
// eslint-disable-next-line @typescript-eslint/no-unused-vars
import isTestFlight from '@/helpers/isTestFlight';

const DEFAULT_SLIPPAGE_BIPS = 500;

// /---- 🎨 Color functions 🎨 ----/ //
//
export const opacity = (color: string, opacity: number): string => {
Expand Down Expand Up @@ -356,7 +358,7 @@ export const getDefaultSlippage = (chainId: ChainId, config: RainbowConfig) => {
const amount = +(
(config.default_slippage_bips_chainId as unknown as { [key: number]: number })[chainId] ||
DEFAULT_CONFIG.default_slippage_bips_chainId[chainId] ||
200
DEFAULT_SLIPPAGE_BIPS
);

return slippageInBipsToString(amount);
Expand All @@ -367,7 +369,7 @@ export const getDefaultSlippageWorklet = (chainId: ChainId, config: RainbowConfi
const amount = +(
(config.default_slippage_bips_chainId as unknown as { [key: number]: number })[chainId] ||
DEFAULT_CONFIG.default_slippage_bips_chainId[chainId] ||
200
DEFAULT_SLIPPAGE_BIPS
);

return slippageInBipsToStringWorklet(amount);
Expand Down
46 changes: 23 additions & 23 deletions src/model/remoteConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,37 +63,37 @@ export interface RainbowConfig extends Record<string, string | boolean | number>

export const DEFAULT_CONFIG: RainbowConfig = {
default_slippage_bips: JSON.stringify({
apechain: 200,
arbitrum: 200,
avalanche: 200,
base: 200,
apechain: 500,
arbitrum: 500,
avalanche: 500,
base: 500,
bsc: 200,
blast: 200,
degen: 200,
gnosis: 200,
gravity: 200,
ink: 200,
linea: 200,
blast: 500,
degen: 500,
gnosis: 500,
gravity: 500,
ink: 500,
linea: 500,
mainnet: 100,
optimism: 200,
optimism: 500,
polygon: 200,
sanko: 200,
scroll: 200,
zksync: 200,
zora: 200,
sanko: 500,
scroll: 500,
zksync: 500,
zora: 500,
}),
default_slippage_bips_chainId: JSON.stringify({
'33139': 200,
'42161': 200,
'43114': 200,
'8453': 200,
'81457': 200,
'33139': 500,
'42161': 500,
'43114': 500,
'8453': 500,
'81457': 500,
'56': 200,
'666666666': 200,
'666666666': 500,
'1': 100,
'10': 200,
'10': 500,
'137': 200,
'7777777': 200,
'7777777': 500,
}),
f2c_enabled: true,
op_nft_network: 'op-mainnet',
Expand Down

0 comments on commit 64d4a73

Please sign in to comment.