Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/feat/bridge-auto-slippage' into …
Browse files Browse the repository at this point in the history
…tmp/20241108
  • Loading branch information
dmy147 committed Nov 12, 2024
2 parents 1b04664 + 901e90e commit 6f421e9
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 6 deletions.
1 change: 1 addition & 0 deletions changeLogs/09298.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Optimized Bridge feature
2 changes: 2 additions & 0 deletions changeLogs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ import version09290 from './09290.md';
import version09292 from './09292.md';
import version09295 from './09295.md';
import version09296 from './09296.md';
import version09298 from './09298.md';

const version = process.env.release || '0';
const versionMap = {
Expand Down Expand Up @@ -192,6 +193,7 @@ const versionMap = {
'0.92.92': version09292,
'0.92.95': version09295,
'0.92.96': version09296,
'0.92.98': version09298,
};
export const getUpdateContent = () => {
return versionMap[version];
Expand Down
1 change: 1 addition & 0 deletions changeLogs/zh-CN/09298.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- 优化跨链功能
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rabby",
"version": "0.92.97",
"version": "0.92.98",
"description": "A browser plugin for DeFi users",
"scripts": {
"clean": "node build/clean.js",
Expand Down
2 changes: 1 addition & 1 deletion src/manifest/chrome-mv2/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "__MSG_appName__",
"short_name": "__MSG_appName__",
"version": "0.92.97",
"version": "0.92.98",
"default_locale": "en",
"description": "__MSG_appDescription__",
"icons": {
Expand Down
2 changes: 1 addition & 1 deletion src/manifest/chrome-mv3/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 3,
"name": "__MSG_appName__",
"short_name": "__MSG_appName__",
"version": "0.92.97",
"version": "0.92.98",
"default_locale": "en",
"description": "__MSG_appDescription__",
"icons": {
Expand Down
4 changes: 2 additions & 2 deletions src/ui/views/Bridge/hooks/slippage.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { useCallback, useMemo, useState } from 'react';

export const useBridgeSlippage = () => {
const [slippageState, setSlippageState] = useState('3');
const [slippageState, setSlippageState] = useState('1');

const slippage = useMemo(() => slippageState || '3', [slippageState]);
const slippage = useMemo(() => slippageState || '1', [slippageState]);
const [slippageChanged, setSlippageChanged] = useState(false);

const [autoSlippage, setAutoSlippage] = useState(true);
Expand Down
2 changes: 1 addition & 1 deletion src/ui/views/Bridge/hooks/token.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ export const useBridge = () => {

useEffect(() => {
if (!isSameTokenLoading && slippageObj.autoSlippage) {
slippageObj.setSlippage(isSameToken ? '1' : '3');
slippageObj.setSlippage(isSameToken ? '0.5' : '1');
}
}, [
slippageObj?.autoSlippage,
Expand Down

0 comments on commit 6f421e9

Please sign in to comment.