From 2df09bde14753bc829ddda2fc29f240c5a63e402 Mon Sep 17 00:00:00 2001 From: yrjkqq Date: Mon, 28 Oct 2024 19:15:59 +0800 Subject: [PATCH] refactor: update tsconfig.json files --- .../stories/widgets/MiningCreate.stories.tsx | 5 +- .../stories/widgets/MiningDetail.stories.tsx | 12 ++ .../stories/widgets/MiningList.stories.tsx | 13 +- packages/dodoex-api/package.json | 16 +- packages/dodoex-api/rollup.config.mjs | 15 +- packages/dodoex-api/tsconfig.json | 2 +- packages/dodoex-components/package.json | 14 +- packages/dodoex-components/rollup.config.mjs | 12 +- packages/dodoex-components/tsconfig.json | 3 + packages/dodoex-widgets/package.json | 18 +- packages/dodoex-widgets/rollup.config.mjs | 13 +- .../src/components/Swap/index.tsx | 2 +- .../src/components/TokenLogoSimple.tsx | 8 +- .../dodoex-widgets/src/constants/chains.ts | 12 +- packages/dodoex-widgets/src/locales/en-US.po | 185 +++++++++--------- packages/dodoex-widgets/src/locales/zh-CN.po | 185 +++++++++--------- .../MiningCreate/components/PoolCard.tsx | 18 +- .../MiningCreate/components/PoolPicker.tsx | 18 +- .../components/RewardDetailList.tsx | 10 +- .../components/RewardTokenSelect.tsx | 11 +- .../MiningCreate/components/StakingRules.tsx | 16 +- .../MiningCreate/hooks/reducers.ts | 10 + .../MiningCreate/hooks/useCreateMining.ts | 14 +- .../MiningWidget/MiningCreate/index.tsx | 2 + .../operate-widgets/BottomButtonGroup.tsx | 21 +- .../operate-widgets/RewardForm.tsx | 6 +- .../operate-widgets/SingleTokenSelect.tsx | 10 +- .../MiningWidget/MiningCreate/utils.tsx | 2 +- .../MiningWidget/MiningDetail/MiningInfo.tsx | 19 +- .../MiningWidget/MiningDetail/RewardCard.tsx | 12 +- .../MiningWidget/MiningDetail/index.tsx | 22 +++ .../MiningList/components/MiningListEmpty.tsx | 3 + .../components/SearchComponents.tsx | 9 +- .../components/TokenAmountPopover.tsx | 13 +- .../hooks/useDepositOrWithdrawOrClaim.ts | 11 +- .../widgets/MiningWidget/MiningList/index.tsx | 10 + .../mining-types/BaseMiningCard.tsx | 11 ++ .../MiningList/my-created/MyCreatedMining.tsx | 10 +- .../MiningList/my-created/RewardCard.tsx | 9 +- .../MiningList/operate-area/ClaimButton.tsx | 15 +- .../operate-area/RewardTokenTable.tsx | 10 +- .../MiningList/operate-area/StakeButton.tsx | 15 +- .../MiningList/operate-area/UnstakeButton.tsx | 15 +- .../MiningList/operate-area/index.tsx | 28 ++- .../MiningList/operate-area/utils.ts | 6 +- .../PoolList/components/FilterTokenTags.tsx | 12 +- packages/dodoex-widgets/tsconfig.json | 2 +- yarn.lock | 37 ++-- 48 files changed, 556 insertions(+), 366 deletions(-) diff --git a/packages/doc/src/stories/widgets/MiningCreate.stories.tsx b/packages/doc/src/stories/widgets/MiningCreate.stories.tsx index a9f29049..18d685ad 100644 --- a/packages/doc/src/stories/widgets/MiningCreate.stories.tsx +++ b/packages/doc/src/stories/widgets/MiningCreate.stories.tsx @@ -23,8 +23,9 @@ export const Primary = (props: any) => { return ( window.alert('view create page')} - handleGotoCreatePool={() => window.alert('view detail page')} + handleGotoMiningList={() => window.alert('handleGotoMiningList')} + handleGotoCreatePool={() => window.alert('handleGotoCreatePool')} + handleGoBack={() => window.alert('handleGoBack')} /> ); diff --git a/packages/doc/src/stories/widgets/MiningDetail.stories.tsx b/packages/doc/src/stories/widgets/MiningDetail.stories.tsx index b089e165..4e04b507 100644 --- a/packages/doc/src/stories/widgets/MiningDetail.stories.tsx +++ b/packages/doc/src/stories/widgets/MiningDetail.stories.tsx @@ -28,6 +28,18 @@ export const Primary = (props: any) => { address: '0xE9a586152879f4817cb6c599E32e8f8e96BFba4c', chainId: 11155111, }} + handleGotoMiningList={function (): void { + throw new Error('Function not implemented.'); + }} + handleGotoPoolDetail={function ({ + pool, + chainId, + }: { + pool: string; + chainId: number; + }): void { + window.alert(`view detail page, ${pool}, ${chainId}`); + }} /> ); diff --git a/packages/doc/src/stories/widgets/MiningList.stories.tsx b/packages/doc/src/stories/widgets/MiningList.stories.tsx index 7c8bbae6..b152aa1f 100644 --- a/packages/doc/src/stories/widgets/MiningList.stories.tsx +++ b/packages/doc/src/stories/widgets/MiningList.stories.tsx @@ -24,7 +24,18 @@ export const Primary = (props: any) => { window.alert('view create page')} - handleGotoDetail={() => window.alert('view detail page')} + handleGotoDetail={({ mining, pool, chainId }) => + window.alert(`view detail page, ${mining}, ${pool}, ${chainId}`) + } + handleGotoPoolDetail={function ({ + pool, + chainId, + }: { + pool: string; + chainId: number; + }): void { + window.alert(`view detail page, ${pool}, ${chainId}`); + }} /> ); diff --git a/packages/dodoex-api/package.json b/packages/dodoex-api/package.json index 758d9c49..181334c4 100644 --- a/packages/dodoex-api/package.json +++ b/packages/dodoex-api/package.json @@ -1,10 +1,10 @@ { "name": "@dodoex/api", - "version": "3.0.0-taiko.13", + "version": "3.0.0-taiko.14", "description": "DODO API Kit", "source": "src/index.ts", - "types": "dist/index.d.ts", - "main": "dist/cjs/index.cjs", + "types": "dist/types/index.d.ts", + "main": "dist/index.cjs", "module": "dist/index.js", "license": "GPL-3.0-or-later", "homepage": "https://github.com/DODOEX/widgets#readme", @@ -19,7 +19,8 @@ "schema:watch": "export $(cat .env | xargs) && env graphql-codegen -w", "prerelease": "yarn run build", "release": "semantic-release", - "release:local": "np --any-branch --no-cleanup --no-tests" + "release:local": "np --any-branch --no-cleanup --no-tests", + "release.npm-publish-beta": "npm publish --tag beta" }, "author": "", "publishConfig": { @@ -28,9 +29,9 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", + "types": "./dist/types/index.d.ts", "import": "./dist/index.js", - "require": "./dist/cjs/index.cjs" + "require": "./dist/index.cjs" } }, "keywords": [ @@ -79,6 +80,7 @@ "@rollup/plugin-json": "^6.1.0", "@rollup/plugin-replace": "^5.0.7", "@rollup/plugin-terser": "^0.4.4", + "@rollup/plugin-typescript": "^12.1.1", "@rollup/plugin-url": "^8.0.2", "@svgr/rollup": "^6.2.1", "@testing-library/jest-dom": "^5.16.5", @@ -93,8 +95,8 @@ "jest-environment-jsdom": "^29.0.3", "np": "^7.6.1", "rollup": "^4.18.0", + "rollup-plugin-clear": "^2.0.7", "rollup-plugin-dynamic-import-variables": "^1.1.0", - "rollup-plugin-typescript2": "^0.36.0", "svg-jest": "^1.0.1", "ts-jest": "^29.0.1", "typescript": "^5.6.3" diff --git a/packages/dodoex-api/rollup.config.mjs b/packages/dodoex-api/rollup.config.mjs index d6c802f4..6a35222a 100644 --- a/packages/dodoex-api/rollup.config.mjs +++ b/packages/dodoex-api/rollup.config.mjs @@ -1,11 +1,12 @@ import { babel } from '@rollup/plugin-babel'; -import typescript from 'rollup-plugin-typescript2'; +import typescript from '@rollup/plugin-typescript'; import json from '@rollup/plugin-json'; import commonjs from '@rollup/plugin-commonjs'; import url from '@rollup/plugin-url'; import terser from '@rollup/plugin-terser'; import { nodeResolve } from '@rollup/plugin-node-resolve'; import dynamicImportVariables from 'rollup-plugin-dynamic-import-variables'; +import clear from 'rollup-plugin-clear'; import pkg from './package.json' with { type: 'json' }; const extensions = ['.js', '.ts', '.jsx', '.tsx']; @@ -23,9 +24,7 @@ const config = { }), url(), json(), - typescript({ - clean: true, - }), + typescript(), commonjs({ sourceMap: false, }), @@ -34,6 +33,12 @@ const config = { extensions, babelHelpers: 'bundled', }), + clear({ + // required, point out which directories should be clear. + targets: ['dist'], + // optional, whether clear the directores when rollup recompile on --watch mode. + watch: true, // default: false + }), ], external: [...Object.keys(pkg.peerDependencies || {})], }; @@ -48,7 +53,7 @@ export default [ plugins: [terser()], }, { - dir: 'dist/cjs', + dir: 'dist', entryFileNames: '[name].cjs', chunkFileNames: '[name]-[hash].cjs', format: 'cjs', diff --git a/packages/dodoex-api/tsconfig.json b/packages/dodoex-api/tsconfig.json index 2192d815..e7647f9a 100644 --- a/packages/dodoex-api/tsconfig.json +++ b/packages/dodoex-api/tsconfig.json @@ -1,7 +1,7 @@ { "extends": "../../tsconfig", "compilerOptions": { - "declarationDir": "./types", + "declarationDir": "./dist/types", "jsx": "preserve", "target": "es2016" }, diff --git a/packages/dodoex-components/package.json b/packages/dodoex-components/package.json index 7ea5ac8f..039cfee2 100644 --- a/packages/dodoex-components/package.json +++ b/packages/dodoex-components/package.json @@ -1,10 +1,10 @@ { "name": "@dodoex/components", - "version": "3.0.0-taiko.5", + "version": "3.0.0-taiko.6", "description": "UI component library", "source": "src/index.ts", - "types": "dist/index.d.ts", - "main": "dist/cjs/index.cjs", + "types": "dist/types/index.d.ts", + "main": "dist/index.cjs", "module": "dist/index.js", "scripts": { "typescript": "tsc --project tsconfig.json --emitDeclarationOnly", @@ -12,7 +12,8 @@ "watch": "yarn run rollup -c --watch", "publish-sample": "npm publish --access public", "prerelease": "yarn run build", - "release": "np --any-branch --no-cleanup --no-tests" + "release": "np --any-branch --no-cleanup --no-tests", + "release.npm-publish-beta": "npm publish --tag beta" }, "author": "", "publishConfig": { @@ -55,17 +56,18 @@ "react-dom": ">=17.0.1" }, "devDependencies": { - "@rollup/plugin-node-resolve": "^15.2.3", "@rollup/plugin-babel": "^6.0.4", "@rollup/plugin-commonjs": "^26.0.1", "@rollup/plugin-json": "^6.1.0", + "@rollup/plugin-node-resolve": "^15.2.3", "@rollup/plugin-replace": "^5.0.7", "@rollup/plugin-terser": "^0.4.4", + "@rollup/plugin-typescript": "^12.1.1", "@rollup/plugin-url": "^8.0.2", "@svgr/rollup": "^6.2.1", "np": "^7.6.1", "rollup": "^4.18.0", - "rollup-plugin-typescript2": "^0.36.0", + "rollup-plugin-clear": "^2.0.7", "tslib": "^2.4.0", "typescript": "^5.6.3" } diff --git a/packages/dodoex-components/rollup.config.mjs b/packages/dodoex-components/rollup.config.mjs index 73204150..91697ad1 100644 --- a/packages/dodoex-components/rollup.config.mjs +++ b/packages/dodoex-components/rollup.config.mjs @@ -1,11 +1,12 @@ import { babel } from '@rollup/plugin-babel'; -import typescript from 'rollup-plugin-typescript2'; +import typescript from '@rollup/plugin-typescript'; import json from '@rollup/plugin-json'; import commonjs from '@rollup/plugin-commonjs'; import url from '@rollup/plugin-url'; import svgr from '@svgr/rollup'; import terser from '@rollup/plugin-terser'; import { nodeResolve } from '@rollup/plugin-node-resolve'; +import clear from 'rollup-plugin-clear'; import pkg from './package.json' with { type: 'json' }; const extensions = ['.js', '.ts', '.jsx', '.tsx']; @@ -41,6 +42,12 @@ const config = { extensions, babelHelpers: 'bundled', }), + clear({ + // required, point out which directories should be clear. + targets: ['dist'], + // optional, whether clear the directores when rollup recompile on --watch mode. + watch: true, // default: false + }), ], external: [...Object.keys(pkg.peerDependencies || {}), '@floating-ui/dom'], }; @@ -52,10 +59,11 @@ export default [ { dir: 'dist', format: 'es', + // plugins: [terser()], plugins: [terser()], }, { - dir: 'dist/cjs', + dir: 'dist', entryFileNames: '[name].cjs', chunkFileNames: '[name]-[hash].cjs', format: 'cjs', diff --git a/packages/dodoex-components/tsconfig.json b/packages/dodoex-components/tsconfig.json index f53b440e..701b846c 100644 --- a/packages/dodoex-components/tsconfig.json +++ b/packages/dodoex-components/tsconfig.json @@ -1,5 +1,8 @@ { "extends": "../../tsconfig", + "compilerOptions": { + "declarationDir": "./dist/types" + }, "exclude": ["node_modules", "**/*.d.mts"], "include": ["src/**/*.d.ts", "src/**/*.ts", "src/**/*.tsx"] } diff --git a/packages/dodoex-widgets/package.json b/packages/dodoex-widgets/package.json index 67c99335..90a39131 100644 --- a/packages/dodoex-widgets/package.json +++ b/packages/dodoex-widgets/package.json @@ -1,10 +1,10 @@ { "name": "@dodoex/widgets", - "version": "3.0.0-taiko.29", + "version": "3.0.0-taiko.33", "description": "DODO Widgets", "source": "src/index.tsx", - "types": "dist/index.d.ts", - "main": "dist/cjs/index.cjs", + "types": "dist/types/index.d.ts", + "main": "dist/index.cjs", "module": "dist/index.js", "license": "GPL-3.0-or-later", "homepage": "https://github.com/DODOEX/widgets#readme", @@ -23,6 +23,7 @@ "release": "semantic-release", "release:local": "np --any-branch --no-cleanup --no-tests", "release.npm-publish": "npm publish --access public", + "release.npm-publish-beta": "npm publish --tag beta", "test": "jest src", "test:e2e": "jest e2e" }, @@ -33,9 +34,9 @@ }, "exports": { ".": { - "types": "./dist/index.d.ts", + "types": "./dist/types/index.d.ts", "import": "./dist/index.js", - "require": "./dist/cjs/index.cjs" + "require": "./dist/index.cjs" } }, "keywords": [ @@ -57,8 +58,8 @@ }, "dependencies": { "@babel/runtime": "^7.17.0", - "@dodoex/api": ">=3.0.0-taiko.13", - "@dodoex/components": ">=3.0.0-taiko.5", + "@dodoex/api": ">=3.0.0-taiko.14", + "@dodoex/components": ">=3.0.0-taiko.6", "@dodoex/icons": "^2.0.1", "@emotion/react": "^11.10.0", "@emotion/styled": "^11.10.0", @@ -116,6 +117,7 @@ "@rollup/plugin-multi-entry": "^6.0.1", "@rollup/plugin-replace": "^5.0.7", "@rollup/plugin-terser": "^0.4.4", + "@rollup/plugin-typescript": "^12.1.1", "@rollup/plugin-url": "^8.0.2", "@svgr/rollup": "^6.2.1", "@testing-library/jest-dom": "^5.16.5", @@ -139,8 +141,8 @@ "jest-environment-jsdom": "^29.0.3", "np": "^7.6.1", "rollup": "^4.18.0", + "rollup-plugin-clear": "^2.0.7", "rollup-plugin-import-css": "^3.5.5", - "rollup-plugin-typescript2": "^0.36.0", "svg-jest": "^1.0.1", "ts-jest": "^29.0.1", "typescript": "^5.6.3" diff --git a/packages/dodoex-widgets/rollup.config.mjs b/packages/dodoex-widgets/rollup.config.mjs index 698b94ac..47996d2e 100644 --- a/packages/dodoex-widgets/rollup.config.mjs +++ b/packages/dodoex-widgets/rollup.config.mjs @@ -1,7 +1,7 @@ import { babel } from '@rollup/plugin-babel'; import commonjs from '@rollup/plugin-commonjs'; import json from '@rollup/plugin-json'; -import typescript from 'rollup-plugin-typescript2'; +import typescript from '@rollup/plugin-typescript'; import terser from '@rollup/plugin-terser'; import url from '@rollup/plugin-url'; import replace from '@rollup/plugin-replace'; @@ -9,7 +9,8 @@ import resolve from '@rollup/plugin-node-resolve'; import svgr from '@svgr/rollup'; import pkg from './package.json' with { type: 'json' }; import globby from 'globby'; -import css from "rollup-plugin-import-css"; +import css from 'rollup-plugin-import-css'; +import clear from 'rollup-plugin-clear'; const extensions = ['.js', '.jsx', '.ts', '.tsx']; const baseConfig = { @@ -40,6 +41,12 @@ const baseConfig = { babelHelpers: 'bundled', }), css(), + clear({ + // required, point out which directories should be clear. + targets: ['dist'], + // optional, whether clear the directores when rollup recompile on --watch mode. + watch: true, // default: false + }), ], external: [ ...Object.keys(pkg.dependencies || {}).filter( @@ -73,7 +80,7 @@ export default [ plugins: [terser()], }, { - dir: 'dist/cjs', + dir: 'dist', entryFileNames: '[name].cjs', chunkFileNames: '[name]-[hash].cjs', format: 'cjs', diff --git a/packages/dodoex-widgets/src/components/Swap/index.tsx b/packages/dodoex-widgets/src/components/Swap/index.tsx index bab7e53d..73496f19 100644 --- a/packages/dodoex-widgets/src/components/Swap/index.tsx +++ b/packages/dodoex-widgets/src/components/Swap/index.tsx @@ -455,7 +455,7 @@ export function Swap({ ); - }, [displayPriceImpact]); + }, [displayPriceImpact, theme.palette.error.main]); const tokenPairPrice = useMemo(() => { return ( diff --git a/packages/dodoex-widgets/src/components/TokenLogoSimple.tsx b/packages/dodoex-widgets/src/components/TokenLogoSimple.tsx index 9558d629..b7a4ea5c 100644 --- a/packages/dodoex-widgets/src/components/TokenLogoSimple.tsx +++ b/packages/dodoex-widgets/src/components/TokenLogoSimple.tsx @@ -1,7 +1,13 @@ import { Box, BoxProps } from '@dodoex/components'; -import React from 'react'; import Identicon from 'identicon.js'; +import React from 'react'; +/** + * + * @param param0 + * @returns + * @deprecated + */ export default function TokenLogoSimple({ address, url, diff --git a/packages/dodoex-widgets/src/constants/chains.ts b/packages/dodoex-widgets/src/constants/chains.ts index df20be96..07fc1d89 100644 --- a/packages/dodoex-widgets/src/constants/chains.ts +++ b/packages/dodoex-widgets/src/constants/chains.ts @@ -136,7 +136,7 @@ export const blockTimeMap: { [ChainId.MANTLE]: 2000, [ChainId.SEPOLIA]: 12000, [ChainId.DODO_CHAIN_TESTNET]: 12000, - [ChainId.TAIKO]: 12000, + [ChainId.TAIKO]: 48000, }; export const dexKeysMap: { @@ -146,15 +146,7 @@ export const dexKeysMap: { [ChainId.GOERLI]: [], [ChainId.OPTIMISM]: [], [ChainId.CONFLUX]: [], - [ChainId.BSC]: [ - 'pancakeV2', - 'pancakeV1', - 'MDEX', - 'bakery', - 'biSwap', - 'apeSwap', - 'babySwap', - ], + [ChainId.BSC]: [], [ChainId.OKCHAIN]: [], [ChainId.POLYGON]: [], [ChainId.ARBITRUM_ONE]: [], diff --git a/packages/dodoex-widgets/src/locales/en-US.po b/packages/dodoex-widgets/src/locales/en-US.po index 6e2d7cd9..b33ca6f5 100644 --- a/packages/dodoex-widgets/src/locales/en-US.po +++ b/packages/dodoex-widgets/src/locales/en-US.po @@ -65,16 +65,16 @@ msgid "Traders sold ‪{0}‬ {1}, price in the pool increased to {2}" msgstr "Traders sold ‪{0}‬ {1}, price in the pool increased to {2}" #: src/components/Swap/components/TokenCard/BalanceText.tsx:52 -#: src/widgets/MiningWidget/MiningCreate/operate-widgets/RewardForm.tsx:239 +#: src/widgets/MiningWidget/MiningCreate/operate-widgets/RewardForm.tsx:238 msgid "Balance:" msgstr "Balance:" -#: src/widgets/MiningWidget/MiningCreate/operate-widgets/RewardForm.tsx:320 +#: src/widgets/MiningWidget/MiningCreate/operate-widgets/RewardForm.tsx:322 msgid "The start time cannot be in the past" msgstr "The start time cannot be in the past" #: src/widgets/MiningWidget/MiningCreate/components/StepTitle.tsx:47 -#: src/widgets/MiningWidget/MiningCreate/index.tsx:113 +#: src/widgets/MiningWidget/MiningCreate/index.tsx:114 msgid "Staking Rules" msgstr "Staking Rules" @@ -91,13 +91,13 @@ msgid "Switch to {0}" msgstr "Switch to {0}" #: src/widgets/MiningWidget/MiningCreate/hooks/useCreateMining.ts:133 -#: src/widgets/MiningWidget/MiningList/index.tsx:310 +#: src/widgets/MiningWidget/MiningList/index.tsx:320 msgid "Create Liquidity Mining" msgstr "Create Liquidity Mining" -#: src/widgets/MiningWidget/MiningCreate/components/RewardDetailList.tsx:157 -#: src/widgets/MiningWidget/MiningCreate/operate-widgets/RewardForm.tsx:294 -#: src/widgets/MiningWidget/MiningDetail/RewardCard.tsx:227 +#: src/widgets/MiningWidget/MiningCreate/components/RewardDetailList.tsx:159 +#: src/widgets/MiningWidget/MiningCreate/operate-widgets/RewardForm.tsx:296 +#: src/widgets/MiningWidget/MiningDetail/RewardCard.tsx:229 msgid "Start Time" msgstr "Start Time" @@ -106,7 +106,7 @@ msgstr "Start Time" msgid "Dismiss" msgstr "Dismiss" -#: src/widgets/MiningWidget/MiningList/operate-area/UnstakeButton.tsx:79 +#: src/widgets/MiningWidget/MiningList/operate-area/UnstakeButton.tsx:85 #: src/widgets/MiningWidget/OperateArea/UnstakeButton.tsx:68 msgid "Unstaking" msgstr "Unstaking" @@ -125,7 +125,7 @@ msgstr "Deposit Ratio" msgid "Ended" msgstr "Ended" -#: src/widgets/MiningWidget/MiningCreate/operate-widgets/RewardForm.tsx:365 +#: src/widgets/MiningWidget/MiningCreate/operate-widgets/RewardForm.tsx:367 msgid "The end time must be later than the start time." msgstr "The end time must be later than the start time." @@ -157,7 +157,7 @@ msgstr "Do not remind again" msgid "Remove Liquidity" msgstr "Remove Liquidity" -#: src/widgets/MiningWidget/MiningCreate/components/PoolPicker.tsx:474 +#: src/widgets/MiningWidget/MiningCreate/components/PoolPicker.tsx:478 msgid "Search by address" msgstr "Search by address" @@ -208,7 +208,7 @@ msgstr "Creation Time" msgid "The current network is inconsistent with the wallet - please switch in wallet" msgstr "The current network is inconsistent with the wallet - please switch in wallet" -#: src/widgets/MiningWidget/MiningCreate/operate-widgets/RewardForm.tsx:571 +#: src/widgets/MiningWidget/MiningCreate/operate-widgets/RewardForm.tsx:572 msgid "*Depending on the block time, the real amount of Daily Rewards may deviate slightly." msgstr "*Depending on the block time, the real amount of Daily Rewards may deviate slightly." @@ -216,7 +216,7 @@ msgstr "*Depending on the block time, the real amount of Daily Rewards may devia msgid "Since this pool uses the PMM algorithm, which is different from the normal AMM pool mechanism, the initial price calculation is also different from AMM." msgstr "Since this pool uses the PMM algorithm, which is different from the normal AMM pool mechanism, the initial price calculation is also different from AMM." -#: src/widgets/MiningWidget/MiningCreate/operate-widgets/RewardForm.tsx:421 +#: src/widgets/MiningWidget/MiningCreate/operate-widgets/RewardForm.tsx:423 msgid "Expected to start at block {0} and end at block {1}. There may be slight differences between actual and expected block numbers." msgstr "Expected to start at block {0} and end at block {1}. There may be slight differences between actual and expected block numbers." @@ -261,8 +261,8 @@ msgstr "Pricing Model" msgid "Liquidity" msgstr "Liquidity" -#: src/widgets/MiningWidget/MiningDetail/MiningInfo.tsx:153 -#: src/widgets/MiningWidget/MiningDetail/MiningInfo.tsx:220 +#: src/widgets/MiningWidget/MiningDetail/MiningInfo.tsx:146 +#: src/widgets/MiningWidget/MiningDetail/MiningInfo.tsx:213 msgid "APR" msgstr "APR" @@ -379,7 +379,7 @@ msgid "Price impact exceeds the slippage tolerance you set. Try increasing the s msgstr "Price impact exceeds the slippage tolerance you set. Try increasing the slippage tolerance." #. js-lingui-explicit-id -#: src/widgets/MiningWidget/MiningList/index.tsx:86 +#: src/widgets/MiningWidget/MiningList/index.tsx:94 msgid "All Mining" msgstr "All Mining" @@ -402,7 +402,7 @@ msgstr "Pair" msgid "s" msgstr "s" -#: src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx:345 +#: src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx:352 msgid "Yes, I am sure" msgstr "Yes, I am sure" @@ -446,7 +446,7 @@ msgstr "Mid Price" msgid "Insufficient funds - Please retry after depositing more {EtherTokenSymbol} into your wallet" msgstr "Insufficient funds - Please retry after depositing more {EtherTokenSymbol} into your wallet" -#: src/widgets/MiningWidget/MiningCreate/index.tsx:233 +#: src/widgets/MiningWidget/MiningCreate/index.tsx:234 msgid "Mining Pool Setup" msgstr "Mining Pool Setup" @@ -487,9 +487,9 @@ msgid "Token Pair Mining" msgstr "Token Pair Mining" #: src/widgets/MiningWidget/MiningCreate/components/PoolPicker.tsx:103 -#: src/widgets/MiningWidget/MiningCreate/components/RewardDetailList.tsx:149 -#: src/widgets/MiningWidget/MiningCreate/components/StakingRules.tsx:142 -#: src/widgets/MiningWidget/MiningDetail/RewardCard.tsx:209 +#: src/widgets/MiningWidget/MiningCreate/components/RewardDetailList.tsx:151 +#: src/widgets/MiningWidget/MiningCreate/components/StakingRules.tsx:144 +#: src/widgets/MiningWidget/MiningDetail/RewardCard.tsx:211 msgid "Address" msgstr "Address" @@ -514,12 +514,12 @@ msgid "Swaps" msgstr "Swaps" #. js-lingui-explicit-id -#: src/widgets/MiningWidget/MiningList/my-created/RewardCard.tsx:167 +#: src/widgets/MiningWidget/MiningList/my-created/RewardCard.tsx:170 msgid "Edit" msgstr "Edit" #. js-lingui-explicit-id -#: src/widgets/MiningWidget/MiningList/my-created/RewardCard.tsx:215 +#: src/widgets/MiningWidget/MiningList/my-created/RewardCard.tsx:218 msgid "End Time" msgstr "End Time" @@ -533,7 +533,7 @@ msgstr "Ended" msgid "Destination" msgstr "Destination" -#: src/widgets/MiningWidget/MiningDetail/RewardCard.tsx:324 +#: src/widgets/MiningWidget/MiningDetail/RewardCard.tsx:326 msgid "Released Rewards" msgstr "Released Rewards" @@ -667,16 +667,16 @@ msgstr "Pegged" msgid "Equilibrium target" msgstr "Equilibrium target" -#: src/widgets/MiningWidget/MiningDetail/RewardCard.tsx:249 +#: src/widgets/MiningWidget/MiningDetail/RewardCard.tsx:251 msgid "End release time before adjustment" msgstr "End release time before adjustment" #: src/widgets/MiningWidget/hooks/useStakeMiningSubmit.ts:81 -#: src/widgets/MiningWidget/MiningDetail/MiningInfo.tsx:443 +#: src/widgets/MiningWidget/MiningDetail/MiningInfo.tsx:438 #: src/widgets/MiningWidget/MiningList/hooks/useDepositOrWithdrawOrClaim.ts:187 -#: src/widgets/MiningWidget/MiningList/operate-area/index.tsx:180 +#: src/widgets/MiningWidget/MiningList/operate-area/index.tsx:196 #: src/widgets/MiningWidget/MiningList/operate-area/StakeButton.tsx:72 -#: src/widgets/MiningWidget/MiningList/operate-area/StakeButton.tsx:101 +#: src/widgets/MiningWidget/MiningList/operate-area/StakeButton.tsx:105 #: src/widgets/MiningWidget/OperateArea/index.tsx:73 #: src/widgets/MiningWidget/OperateArea/StakeButton.tsx:80 msgid "Stake" @@ -708,11 +708,11 @@ msgstr "Review Swap" msgid "Select Cross Chain" msgstr "Select Cross Chain" -#: src/widgets/MiningWidget/MiningDetail/RewardCard.tsx:301 +#: src/widgets/MiningWidget/MiningDetail/RewardCard.tsx:303 msgid "Daily rewards before adjustment" msgstr "Daily rewards before adjustment" -#: src/widgets/MiningWidget/MiningCreate/operate-widgets/RewardForm.tsx:570 +#: src/widgets/MiningWidget/MiningCreate/operate-widgets/RewardForm.tsx:571 msgid "*Deflationary tokens are not supported" msgstr "*Deflationary tokens are not supported" @@ -741,12 +741,12 @@ msgstr "Once created, you can adjust the pool’s market-making price at any tim msgid "Select Tokens" msgstr "Select Tokens" -#: src/widgets/MiningWidget/MiningList/operate-area/StakeButton.tsx:99 +#: src/widgets/MiningWidget/MiningList/operate-area/StakeButton.tsx:105 #: src/widgets/MiningWidget/OperateArea/StakeButton.tsx:78 msgid "Staking" msgstr "Staking" -#: src/widgets/MiningWidget/MiningList/operate-area/ClaimButton.tsx:36 +#: src/widgets/MiningWidget/MiningList/operate-area/ClaimButton.tsx:42 #: src/widgets/MiningWidget/OperateArea/ClaimButton.tsx:35 msgid "Claiming" msgstr "Claiming" @@ -798,12 +798,12 @@ msgid "No pools yet? Create one!" msgstr "No pools yet? Create one!" #. js-lingui-explicit-id -#: src/widgets/MiningWidget/MiningList/index.tsx:90 +#: src/widgets/MiningWidget/MiningList/index.tsx:98 msgid "My Mining" msgstr "My Mining" #. js-lingui-explicit-id -#: src/widgets/MiningWidget/MiningList/index.tsx:92 +#: src/widgets/MiningWidget/MiningList/index.tsx:100 msgid "My Pools" msgstr "My Pools" @@ -831,7 +831,7 @@ msgid "Stake LP tokens and receive mining rewards." msgstr "Stake LP tokens and receive mining rewards." #. js-lingui-explicit-id -#: src/widgets/MiningWidget/MiningList/index.tsx:166 +#: src/widgets/MiningWidget/MiningList/index.tsx:174 msgid "No LP pools match your criteria" msgstr "No LP pools match your criteria" @@ -841,10 +841,10 @@ msgid "Add Liquidity" msgstr "Add Liquidity" #: src/widgets/MiningWidget/hooks/useUnstakeMiningSubmit.ts:63 -#: src/widgets/MiningWidget/MiningDetail/MiningInfo.tsx:460 -#: src/widgets/MiningWidget/MiningList/operate-area/index.tsx:184 +#: src/widgets/MiningWidget/MiningDetail/MiningInfo.tsx:455 +#: src/widgets/MiningWidget/MiningList/operate-area/index.tsx:200 #: src/widgets/MiningWidget/MiningList/operate-area/UnstakeButton.tsx:53 -#: src/widgets/MiningWidget/MiningList/operate-area/UnstakeButton.tsx:81 +#: src/widgets/MiningWidget/MiningList/operate-area/UnstakeButton.tsx:85 #: src/widgets/MiningWidget/OperateArea/index.tsx:74 #: src/widgets/MiningWidget/OperateArea/UnstakeButton.tsx:70 msgid "Unstake" @@ -854,8 +854,8 @@ msgstr "Unstake" msgid "Set the fee to the same as most other pools" msgstr "Set the fee to the same as most other pools" -#: src/widgets/MiningWidget/MiningCreate/index.tsx:358 -#: src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx:306 +#: src/widgets/MiningWidget/MiningCreate/index.tsx:359 +#: src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx:313 msgid "If there are no participants before the end, the rewards cannot be taken out anymore." msgstr "If there are no participants before the end, the rewards cannot be taken out anymore." @@ -886,6 +886,7 @@ msgstr "Ratio Settings" #: src/components/Bridge/BridgeSummaryDialog/index.tsx:147 #: src/components/Swap/components/ReviewDialog.tsx:443 +#: src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx:367 msgid "Confirming" msgstr "Confirming" @@ -941,14 +942,14 @@ msgid "Auto" msgstr "Auto" #. js-lingui-explicit-id -#: src/widgets/MiningWidget/MiningList/my-created/RewardCard.tsx:195 +#: src/widgets/MiningWidget/MiningList/my-created/RewardCard.tsx:198 msgid "Remaining rewards/Total" msgstr "Remaining rewards/Total" #. js-lingui-explicit-id #: src/widgets/MiningWidget/MiningList/components/MiningTitle.tsx:126 #: src/widgets/MiningWidget/MiningList/components/RewardsSection.tsx:102 -#: src/widgets/MiningWidget/MiningList/my-created/MyCreatedMining.tsx:129 +#: src/widgets/MiningWidget/MiningList/my-created/MyCreatedMining.tsx:131 #: src/widgets/MiningWidget/MiningList/my-created/RewardCard.tsx:132 msgid "Rewards" msgstr "Rewards" @@ -980,7 +981,7 @@ msgid "Review Cross Chain" msgstr "Review Cross Chain" #. js-lingui-explicit-id -#: src/widgets/MiningWidget/MiningList/components/SearchComponents.tsx:214 +#: src/widgets/MiningWidget/MiningList/components/SearchComponents.tsx:217 msgid "Search by address" msgstr "Search by address" @@ -990,7 +991,7 @@ msgid "Staked" msgstr "Staked" #. js-lingui-explicit-id -#: src/widgets/MiningWidget/MiningList/my-created/RewardCard.tsx:207 +#: src/widgets/MiningWidget/MiningList/my-created/RewardCard.tsx:210 msgid "Start Time" msgstr "Start Time" @@ -1062,7 +1063,7 @@ msgid "Creator" msgstr "Creator" #: src/widgets/MiningWidget/MiningCreate/components/StepTitle.tsx:49 -#: src/widgets/MiningWidget/MiningCreate/index.tsx:137 +#: src/widgets/MiningWidget/MiningCreate/index.tsx:138 msgid "Reward Rules" msgstr "Reward Rules" @@ -1091,7 +1092,7 @@ msgid "Upcoming" msgstr "Upcoming" #. js-lingui-explicit-id -#: src/widgets/MiningWidget/MiningList/my-created/MyCreatedMining.tsx:138 +#: src/widgets/MiningWidget/MiningList/my-created/MyCreatedMining.tsx:140 #: src/widgets/MiningWidget/MiningList/my-created/OperateArea.tsx:225 msgid "Users" msgstr "Users" @@ -1184,7 +1185,7 @@ msgid "{lqAndDodoCompareText} Price Difference" msgstr "{lqAndDodoCompareText} Price Difference" #. js-lingui-explicit-id -#: src/widgets/MiningWidget/MiningList/index.tsx:168 +#: src/widgets/MiningWidget/MiningList/index.tsx:176 msgid "You are not currently providing liquidity for any LP pools." msgstr "You are not currently providing liquidity for any LP pools." @@ -1247,7 +1248,7 @@ msgstr "For those who are looking to sell tokens and only need ask-side liquidit msgid "Price" msgstr "Price" -#: src/widgets/MiningWidget/MiningCreate/components/PoolCard.tsx:209 +#: src/widgets/MiningWidget/MiningCreate/components/PoolCard.tsx:213 msgid "Created by {0}" msgstr "Created by {0}" @@ -1273,7 +1274,7 @@ msgstr "Suitable for stablecoins with price fluctuations within 10%" msgid "Confirm submission" msgstr "Confirm submission" -#: src/widgets/MiningWidget/MiningCreate/components/PoolPicker.tsx:517 +#: src/widgets/MiningWidget/MiningCreate/components/PoolPicker.tsx:521 msgid "Select pool by tokens" msgstr "Select pool by tokens" @@ -1282,7 +1283,7 @@ msgid "Asset" msgstr "Asset" #: src/widgets/MiningWidget/MiningCreate/components/StepTitle.tsx:45 -#: src/widgets/MiningWidget/MiningCreate/index.tsx:75 +#: src/widgets/MiningWidget/MiningCreate/index.tsx:76 msgid "Mining Type" msgstr "Mining Type" @@ -1299,7 +1300,7 @@ msgstr "Dynamic" msgid "SEE HOW IT WORKS" msgstr "SEE HOW IT WORKS" -#: src/widgets/MiningWidget/MiningCreate/operate-widgets/RewardForm.tsx:446 +#: src/widgets/MiningWidget/MiningCreate/operate-widgets/RewardForm.tsx:448 msgid "Delete" msgstr "Delete" @@ -1320,7 +1321,7 @@ msgstr "Guide Price" #: src/components/DateTimePickerInput/components/MobileDateTimePicker.tsx:203 #: src/components/SwitchChainDialog/index.tsx:128 #: src/components/WidgetConfirm.tsx:112 -#: src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx:234 +#: src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx:238 #: src/widgets/PoolWidget/PoolCreate/operate-widgets/BottomButtonGroup.tsx:403 #: src/widgets/PoolWidget/PoolModify/operate-widgets/BottomButtonGroup.tsx:208 msgid "Cancel" @@ -1336,7 +1337,7 @@ msgstr "Auto switch network" msgid "Get {tokenSymbol}" msgstr "Get {tokenSymbol}" -#: src/widgets/MiningWidget/MiningList/operate-area/ClaimButton.tsx:38 +#: src/widgets/MiningWidget/MiningList/operate-area/ClaimButton.tsx:42 #: src/widgets/MiningWidget/OperateArea/ClaimButton.tsx:37 msgid "One-Click Claim" msgstr "One-Click Claim" @@ -1381,7 +1382,7 @@ msgstr "Hide TVL=0 pools" msgid "Transaction rejected." msgstr "Transaction rejected." -#: src/widgets/MiningWidget/MiningCreate/components/PoolCard.tsx:212 +#: src/widgets/MiningWidget/MiningCreate/components/PoolCard.tsx:216 msgid "\"Created by {0}" msgstr "\"Created by {0}" @@ -1405,7 +1406,7 @@ msgstr "Received" msgid "My Pools" msgstr "My Pools" -#: src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx:153 +#: src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx:154 msgid "Approve {0}" msgstr "Approve {0}" @@ -1444,17 +1445,17 @@ msgid "Total Fee Revenue" msgstr "Total Fee Revenue" #: src/components/DateTimePickerInput/components/MobileDateTimePicker.tsx:223 -#: src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx:46 -#: src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx:72 -#: src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx:97 -#: src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx:176 +#: src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx:47 +#: src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx:73 +#: src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx:98 +#: src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx:180 #: src/widgets/PoolWidget/PoolCreate/operate-widgets/BottomButtonGroup.tsx:76 msgid "Next" msgstr "Next" -#: src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx:176 -#: src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx:187 -#: src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx:360 +#: src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx:180 +#: src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx:191 +#: src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx:367 #: src/widgets/PoolWidget/PoolCreate/components/ConfirmInfoDialog.tsx:197 #: src/widgets/PoolWidget/PoolCreate/operate-widgets/BottomButtonGroup.tsx:86 msgid "Create" @@ -1471,8 +1472,8 @@ msgid "Select Pool Version" msgstr "Select Pool Version" #: src/widgets/MiningWidget/hooks/useClaimMiningSubmit.ts:46 -#: src/widgets/MiningWidget/MiningDetail/MiningInfo.tsx:470 -#: src/widgets/MiningWidget/MiningList/operate-area/index.tsx:188 +#: src/widgets/MiningWidget/MiningDetail/MiningInfo.tsx:465 +#: src/widgets/MiningWidget/MiningList/operate-area/index.tsx:204 #: src/widgets/MiningWidget/OperateArea/index.tsx:75 msgid "Claim" msgstr "Claim" @@ -1481,7 +1482,7 @@ msgstr "Claim" msgid "Disclaimer" msgstr "Disclaimer" -#: src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx:249 +#: src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx:253 #: src/widgets/PoolWidget/PoolCreate/operate-widgets/BottomButtonGroup.tsx:418 msgid "Back" msgstr "Back" @@ -1528,8 +1529,8 @@ msgstr "The mid price needs to be greater than {min} and less than 100,000,000" msgid "Something went wrong." msgstr "Something went wrong." -#: src/widgets/MiningWidget/MiningCreate/components/RewardDetailList.tsx:176 -#: src/widgets/MiningWidget/MiningCreate/operate-widgets/RewardForm.tsx:394 +#: src/widgets/MiningWidget/MiningCreate/components/RewardDetailList.tsx:178 +#: src/widgets/MiningWidget/MiningCreate/operate-widgets/RewardForm.tsx:396 msgid "Daily Rewards" msgstr "Daily Rewards" @@ -1579,7 +1580,7 @@ msgstr "Send to:" msgid "My Staked" msgstr "My Staked" -#: src/widgets/MiningWidget/MiningCreate/operate-widgets/RewardForm.tsx:455 +#: src/widgets/MiningWidget/MiningCreate/operate-widgets/RewardForm.tsx:456 #: src/widgets/PoolWidget/PoolDetail/index.tsx:205 #: src/widgets/PoolWidget/PoolList/AddLiquidity.tsx:247 #: src/widgets/PoolWidget/PoolList/AddLiquidity.tsx:487 @@ -1604,8 +1605,8 @@ msgstr "Failed to get price of the token" msgid "Date" msgstr "Date" -#: src/widgets/MiningWidget/MiningCreate/components/StakingRules.tsx:142 -#: src/widgets/MiningWidget/MiningDetail/MiningInfo.tsx:248 +#: src/widgets/MiningWidget/MiningCreate/components/StakingRules.tsx:144 +#: src/widgets/MiningWidget/MiningDetail/MiningInfo.tsx:241 msgid "Liquidity Pool" msgstr "Liquidity Pool" @@ -1618,7 +1619,7 @@ msgstr "Value (USD)" msgid "Depth" msgstr "Depth" -#: src/widgets/MiningWidget/MiningCreate/components/PoolPicker.tsx:551 +#: src/widgets/MiningWidget/MiningCreate/components/PoolPicker.tsx:555 msgid "No matching pool found" msgstr "No matching pool found" @@ -1627,8 +1628,8 @@ msgstr "No matching pool found" msgid "Low" msgstr "Low" -#: src/widgets/MiningWidget/MiningCreate/index.tsx:357 -#: src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx:305 +#: src/widgets/MiningWidget/MiningCreate/index.tsx:358 +#: src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx:312 msgid "Once Mining has started, it cannot be stopped." msgstr "Once Mining has started, it cannot be stopped." @@ -1636,7 +1637,7 @@ msgstr "Once Mining has started, it cannot be stopped." msgid "Select a liquidity pool" msgstr "Select a liquidity pool" -#: src/widgets/MiningWidget/MiningCreate/operate-widgets/SingleTokenSelect.tsx:135 +#: src/widgets/MiningWidget/MiningCreate/operate-widgets/SingleTokenSelect.tsx:137 msgid "Do not select non-standard ERC20 tokens as this may lead to unknown errors!" msgstr "Do not select non-standard ERC20 tokens as this may lead to unknown errors!" @@ -1699,21 +1700,21 @@ msgstr "The setting has been switched to cross chain mode" msgid "Buy" msgstr "Buy" -#: src/widgets/MiningWidget/MiningCreate/components/RewardDetailList.tsx:165 -#: src/widgets/MiningWidget/MiningCreate/operate-widgets/RewardForm.tsx:208 -#: src/widgets/MiningWidget/MiningDetail/RewardCard.tsx:286 +#: src/widgets/MiningWidget/MiningCreate/components/RewardDetailList.tsx:167 +#: src/widgets/MiningWidget/MiningCreate/operate-widgets/RewardForm.tsx:207 +#: src/widgets/MiningWidget/MiningDetail/RewardCard.tsx:288 msgid "Total Rewards" msgstr "Total Rewards" #: src/components/ConnectWallet/NeedConnectButton.tsx:87 -#: src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx:54 +#: src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx:55 msgid "Connect to a wallet" msgstr "Connect to a wallet" -#: src/widgets/MiningWidget/MiningCreate/components/RewardDetailList.tsx:161 -#: src/widgets/MiningWidget/MiningCreate/operate-widgets/RewardForm.tsx:339 -#: src/widgets/MiningWidget/MiningDetail/RewardCard.tsx:244 -#: src/widgets/MiningWidget/MiningDetail/RewardCard.tsx:272 +#: src/widgets/MiningWidget/MiningCreate/components/RewardDetailList.tsx:163 +#: src/widgets/MiningWidget/MiningCreate/operate-widgets/RewardForm.tsx:341 +#: src/widgets/MiningWidget/MiningDetail/RewardCard.tsx:246 +#: src/widgets/MiningWidget/MiningDetail/RewardCard.tsx:274 msgid "End Time" msgstr "End Time" @@ -1737,11 +1738,11 @@ msgstr "Select Platform" #: src/components/Swap/components/TokenCard/TokenLogoCollapse.tsx:64 #: src/widgets/MiningWidget/MiningCreate/components/PoolPicker.tsx:360 -#: src/widgets/MiningWidget/MiningCreate/components/PoolPicker.tsx:416 +#: src/widgets/MiningWidget/MiningCreate/components/PoolPicker.tsx:418 msgid "SELECT TOKEN" msgstr "SELECT TOKEN" -#: src/widgets/MiningWidget/MiningCreate/operate-widgets/RewardForm.tsx:556 +#: src/widgets/MiningWidget/MiningCreate/operate-widgets/RewardForm.tsx:557 msgid "Add Token" msgstr "Add Token" @@ -1798,7 +1799,7 @@ msgstr "Pool Creation Confirmation" msgid "Amounts" msgstr "Amounts" -#: src/widgets/MiningWidget/MiningCreate/components/PoolPicker.tsx:566 +#: src/widgets/MiningWidget/MiningCreate/components/PoolPicker.tsx:570 msgid "Create One" msgstr "Create One" @@ -1840,7 +1841,7 @@ msgstr "Swap" msgid "There is risk of being arbitraged if adding this liquidity." msgstr "There is risk of being arbitraged if adding this liquidity." -#: src/widgets/MiningWidget/MiningCreate/operate-widgets/SingleTokenSelect.tsx:104 +#: src/widgets/MiningWidget/MiningCreate/operate-widgets/SingleTokenSelect.tsx:106 msgid "address" msgstr "address" @@ -1856,7 +1857,7 @@ msgstr "Source" msgid "You may modify the transaction deadline, the maximum time allowed for a trade to be processed on-chain. However, please note that this may lead to your trade executing at a subpar price, as the market price may change during that time." msgstr "You may modify the transaction deadline, the maximum time allowed for a trade to be processed on-chain. However, please note that this may lead to your trade executing at a subpar price, as the market price may change during that time." -#: src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx:136 +#: src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx:137 msgid "{0} Approval Pending" msgstr "{0} Approval Pending" @@ -1880,8 +1881,8 @@ msgstr "User denied transaction signature." msgid "Copy link" msgstr "Copy link" -#: src/widgets/MiningWidget/MiningCreate/index.tsx:340 -#: src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx:291 +#: src/widgets/MiningWidget/MiningCreate/index.tsx:341 +#: src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx:298 msgid "WARNING" msgstr "WARNING" @@ -1925,12 +1926,12 @@ msgstr "Close" msgid "Fees will be the same as in most other pools." msgstr "Fees will be the same as in most other pools." -#: src/widgets/MiningWidget/MiningDetail/MiningInfo.tsx:258 +#: src/widgets/MiningWidget/MiningDetail/MiningInfo.tsx:251 msgid "Mining Pool" msgstr "Mining Pool" -#: src/widgets/MiningWidget/MiningCreate/index.tsx:359 -#: src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx:307 +#: src/widgets/MiningWidget/MiningCreate/index.tsx:360 +#: src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx:314 msgid "To avoid loss of rewards, please ensure that at least 1 or more participating users exist." msgstr "To avoid loss of rewards, please ensure that at least 1 or more participating users exist." @@ -1961,6 +1962,6 @@ msgstr "Insufficient balance" msgid "Private" msgstr "Private" -#: src/components/LiquidityLpPartnerReward.tsx:134 +#: src/components/LiquidityLpPartnerReward.tsx:133 msgid "Learn more" msgstr "Learn more" diff --git a/packages/dodoex-widgets/src/locales/zh-CN.po b/packages/dodoex-widgets/src/locales/zh-CN.po index c51a9247..b8f31801 100644 --- a/packages/dodoex-widgets/src/locales/zh-CN.po +++ b/packages/dodoex-widgets/src/locales/zh-CN.po @@ -65,16 +65,16 @@ msgid "Traders sold ‪{0}‬ {1}, price in the pool increased to {2}" msgstr "" #: src/components/Swap/components/TokenCard/BalanceText.tsx:52 -#: src/widgets/MiningWidget/MiningCreate/operate-widgets/RewardForm.tsx:239 +#: src/widgets/MiningWidget/MiningCreate/operate-widgets/RewardForm.tsx:238 msgid "Balance:" msgstr "余额:" -#: src/widgets/MiningWidget/MiningCreate/operate-widgets/RewardForm.tsx:320 +#: src/widgets/MiningWidget/MiningCreate/operate-widgets/RewardForm.tsx:322 msgid "The start time cannot be in the past" msgstr "" #: src/widgets/MiningWidget/MiningCreate/components/StepTitle.tsx:47 -#: src/widgets/MiningWidget/MiningCreate/index.tsx:113 +#: src/widgets/MiningWidget/MiningCreate/index.tsx:114 msgid "Staking Rules" msgstr "" @@ -91,13 +91,13 @@ msgid "Switch to {0}" msgstr "" #: src/widgets/MiningWidget/MiningCreate/hooks/useCreateMining.ts:133 -#: src/widgets/MiningWidget/MiningList/index.tsx:310 +#: src/widgets/MiningWidget/MiningList/index.tsx:320 msgid "Create Liquidity Mining" msgstr "" -#: src/widgets/MiningWidget/MiningCreate/components/RewardDetailList.tsx:157 -#: src/widgets/MiningWidget/MiningCreate/operate-widgets/RewardForm.tsx:294 -#: src/widgets/MiningWidget/MiningDetail/RewardCard.tsx:227 +#: src/widgets/MiningWidget/MiningCreate/components/RewardDetailList.tsx:159 +#: src/widgets/MiningWidget/MiningCreate/operate-widgets/RewardForm.tsx:296 +#: src/widgets/MiningWidget/MiningDetail/RewardCard.tsx:229 msgid "Start Time" msgstr "" @@ -106,7 +106,7 @@ msgstr "" msgid "Dismiss" msgstr "忽略" -#: src/widgets/MiningWidget/MiningList/operate-area/UnstakeButton.tsx:79 +#: src/widgets/MiningWidget/MiningList/operate-area/UnstakeButton.tsx:85 #: src/widgets/MiningWidget/OperateArea/UnstakeButton.tsx:68 msgid "Unstaking" msgstr "" @@ -125,7 +125,7 @@ msgstr "" msgid "Ended" msgstr "" -#: src/widgets/MiningWidget/MiningCreate/operate-widgets/RewardForm.tsx:365 +#: src/widgets/MiningWidget/MiningCreate/operate-widgets/RewardForm.tsx:367 msgid "The end time must be later than the start time." msgstr "" @@ -157,7 +157,7 @@ msgstr "" msgid "Remove Liquidity" msgstr "" -#: src/widgets/MiningWidget/MiningCreate/components/PoolPicker.tsx:474 +#: src/widgets/MiningWidget/MiningCreate/components/PoolPicker.tsx:478 msgid "Search by address" msgstr "" @@ -208,7 +208,7 @@ msgstr "" msgid "The current network is inconsistent with the wallet - please switch in wallet" msgstr "当前网络与钱包不一致,请在钱包中切换" -#: src/widgets/MiningWidget/MiningCreate/operate-widgets/RewardForm.tsx:571 +#: src/widgets/MiningWidget/MiningCreate/operate-widgets/RewardForm.tsx:572 msgid "*Depending on the block time, the real amount of Daily Rewards may deviate slightly." msgstr "" @@ -216,7 +216,7 @@ msgstr "" msgid "Since this pool uses the PMM algorithm, which is different from the normal AMM pool mechanism, the initial price calculation is also different from AMM." msgstr "" -#: src/widgets/MiningWidget/MiningCreate/operate-widgets/RewardForm.tsx:421 +#: src/widgets/MiningWidget/MiningCreate/operate-widgets/RewardForm.tsx:423 msgid "Expected to start at block {0} and end at block {1}. There may be slight differences between actual and expected block numbers." msgstr "" @@ -261,8 +261,8 @@ msgstr "" msgid "Liquidity" msgstr "" -#: src/widgets/MiningWidget/MiningDetail/MiningInfo.tsx:153 -#: src/widgets/MiningWidget/MiningDetail/MiningInfo.tsx:220 +#: src/widgets/MiningWidget/MiningDetail/MiningInfo.tsx:146 +#: src/widgets/MiningWidget/MiningDetail/MiningInfo.tsx:213 msgid "APR" msgstr "" @@ -379,7 +379,7 @@ msgid "Price impact exceeds the slippage tolerance you set. Try increasing the s msgstr "价格冲击超过了你设置的滑点, 请提高滑点后重试" #. js-lingui-explicit-id -#: src/widgets/MiningWidget/MiningList/index.tsx:86 +#: src/widgets/MiningWidget/MiningList/index.tsx:94 msgid "All Mining" msgstr "" @@ -402,7 +402,7 @@ msgstr "" msgid "s" msgstr "秒" -#: src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx:345 +#: src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx:352 msgid "Yes, I am sure" msgstr "" @@ -446,7 +446,7 @@ msgstr "" msgid "Insufficient funds - Please retry after depositing more {EtherTokenSymbol} into your wallet" msgstr "余额不足 - 请在钱包充值{EtherTokenSymbol}后重试" -#: src/widgets/MiningWidget/MiningCreate/index.tsx:233 +#: src/widgets/MiningWidget/MiningCreate/index.tsx:234 msgid "Mining Pool Setup" msgstr "" @@ -487,9 +487,9 @@ msgid "Token Pair Mining" msgstr "" #: src/widgets/MiningWidget/MiningCreate/components/PoolPicker.tsx:103 -#: src/widgets/MiningWidget/MiningCreate/components/RewardDetailList.tsx:149 -#: src/widgets/MiningWidget/MiningCreate/components/StakingRules.tsx:142 -#: src/widgets/MiningWidget/MiningDetail/RewardCard.tsx:209 +#: src/widgets/MiningWidget/MiningCreate/components/RewardDetailList.tsx:151 +#: src/widgets/MiningWidget/MiningCreate/components/StakingRules.tsx:144 +#: src/widgets/MiningWidget/MiningDetail/RewardCard.tsx:211 msgid "Address" msgstr "" @@ -514,12 +514,12 @@ msgid "Swaps" msgstr "" #. js-lingui-explicit-id -#: src/widgets/MiningWidget/MiningList/my-created/RewardCard.tsx:167 +#: src/widgets/MiningWidget/MiningList/my-created/RewardCard.tsx:170 msgid "Edit" msgstr "" #. js-lingui-explicit-id -#: src/widgets/MiningWidget/MiningList/my-created/RewardCard.tsx:215 +#: src/widgets/MiningWidget/MiningList/my-created/RewardCard.tsx:218 msgid "End Time" msgstr "" @@ -533,7 +533,7 @@ msgstr "" msgid "Destination" msgstr "目标" -#: src/widgets/MiningWidget/MiningDetail/RewardCard.tsx:324 +#: src/widgets/MiningWidget/MiningDetail/RewardCard.tsx:326 msgid "Released Rewards" msgstr "" @@ -667,16 +667,16 @@ msgstr "" msgid "Equilibrium target" msgstr "" -#: src/widgets/MiningWidget/MiningDetail/RewardCard.tsx:249 +#: src/widgets/MiningWidget/MiningDetail/RewardCard.tsx:251 msgid "End release time before adjustment" msgstr "" #: src/widgets/MiningWidget/hooks/useStakeMiningSubmit.ts:81 -#: src/widgets/MiningWidget/MiningDetail/MiningInfo.tsx:443 +#: src/widgets/MiningWidget/MiningDetail/MiningInfo.tsx:438 #: src/widgets/MiningWidget/MiningList/hooks/useDepositOrWithdrawOrClaim.ts:187 -#: src/widgets/MiningWidget/MiningList/operate-area/index.tsx:180 +#: src/widgets/MiningWidget/MiningList/operate-area/index.tsx:196 #: src/widgets/MiningWidget/MiningList/operate-area/StakeButton.tsx:72 -#: src/widgets/MiningWidget/MiningList/operate-area/StakeButton.tsx:101 +#: src/widgets/MiningWidget/MiningList/operate-area/StakeButton.tsx:105 #: src/widgets/MiningWidget/OperateArea/index.tsx:73 #: src/widgets/MiningWidget/OperateArea/StakeButton.tsx:80 msgid "Stake" @@ -708,11 +708,11 @@ msgstr "预览交易" msgid "Select Cross Chain" msgstr "选择跨链桥" -#: src/widgets/MiningWidget/MiningDetail/RewardCard.tsx:301 +#: src/widgets/MiningWidget/MiningDetail/RewardCard.tsx:303 msgid "Daily rewards before adjustment" msgstr "" -#: src/widgets/MiningWidget/MiningCreate/operate-widgets/RewardForm.tsx:570 +#: src/widgets/MiningWidget/MiningCreate/operate-widgets/RewardForm.tsx:571 msgid "*Deflationary tokens are not supported" msgstr "" @@ -741,12 +741,12 @@ msgstr "" msgid "Select Tokens" msgstr "选择代币" -#: src/widgets/MiningWidget/MiningList/operate-area/StakeButton.tsx:99 +#: src/widgets/MiningWidget/MiningList/operate-area/StakeButton.tsx:105 #: src/widgets/MiningWidget/OperateArea/StakeButton.tsx:78 msgid "Staking" msgstr "" -#: src/widgets/MiningWidget/MiningList/operate-area/ClaimButton.tsx:36 +#: src/widgets/MiningWidget/MiningList/operate-area/ClaimButton.tsx:42 #: src/widgets/MiningWidget/OperateArea/ClaimButton.tsx:35 msgid "Claiming" msgstr "" @@ -798,12 +798,12 @@ msgid "No pools yet? Create one!" msgstr "" #. js-lingui-explicit-id -#: src/widgets/MiningWidget/MiningList/index.tsx:90 +#: src/widgets/MiningWidget/MiningList/index.tsx:98 msgid "My Mining" msgstr "" #. js-lingui-explicit-id -#: src/widgets/MiningWidget/MiningList/index.tsx:92 +#: src/widgets/MiningWidget/MiningList/index.tsx:100 msgid "My Pools" msgstr "" @@ -831,7 +831,7 @@ msgid "Stake LP tokens and receive mining rewards." msgstr "" #. js-lingui-explicit-id -#: src/widgets/MiningWidget/MiningList/index.tsx:166 +#: src/widgets/MiningWidget/MiningList/index.tsx:174 msgid "No LP pools match your criteria" msgstr "" @@ -841,10 +841,10 @@ msgid "Add Liquidity" msgstr "" #: src/widgets/MiningWidget/hooks/useUnstakeMiningSubmit.ts:63 -#: src/widgets/MiningWidget/MiningDetail/MiningInfo.tsx:460 -#: src/widgets/MiningWidget/MiningList/operate-area/index.tsx:184 +#: src/widgets/MiningWidget/MiningDetail/MiningInfo.tsx:455 +#: src/widgets/MiningWidget/MiningList/operate-area/index.tsx:200 #: src/widgets/MiningWidget/MiningList/operate-area/UnstakeButton.tsx:53 -#: src/widgets/MiningWidget/MiningList/operate-area/UnstakeButton.tsx:81 +#: src/widgets/MiningWidget/MiningList/operate-area/UnstakeButton.tsx:85 #: src/widgets/MiningWidget/OperateArea/index.tsx:74 #: src/widgets/MiningWidget/OperateArea/UnstakeButton.tsx:70 msgid "Unstake" @@ -854,8 +854,8 @@ msgstr "" msgid "Set the fee to the same as most other pools" msgstr "" -#: src/widgets/MiningWidget/MiningCreate/index.tsx:358 -#: src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx:306 +#: src/widgets/MiningWidget/MiningCreate/index.tsx:359 +#: src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx:313 msgid "If there are no participants before the end, the rewards cannot be taken out anymore." msgstr "" @@ -886,6 +886,7 @@ msgstr "" #: src/components/Bridge/BridgeSummaryDialog/index.tsx:147 #: src/components/Swap/components/ReviewDialog.tsx:443 +#: src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx:367 msgid "Confirming" msgstr "确认中" @@ -941,14 +942,14 @@ msgid "Auto" msgstr "" #. js-lingui-explicit-id -#: src/widgets/MiningWidget/MiningList/my-created/RewardCard.tsx:195 +#: src/widgets/MiningWidget/MiningList/my-created/RewardCard.tsx:198 msgid "Remaining rewards/Total" msgstr "" #. js-lingui-explicit-id #: src/widgets/MiningWidget/MiningList/components/MiningTitle.tsx:126 #: src/widgets/MiningWidget/MiningList/components/RewardsSection.tsx:102 -#: src/widgets/MiningWidget/MiningList/my-created/MyCreatedMining.tsx:129 +#: src/widgets/MiningWidget/MiningList/my-created/MyCreatedMining.tsx:131 #: src/widgets/MiningWidget/MiningList/my-created/RewardCard.tsx:132 msgid "Rewards" msgstr "" @@ -980,7 +981,7 @@ msgid "Review Cross Chain" msgstr "预览跨链交易" #. js-lingui-explicit-id -#: src/widgets/MiningWidget/MiningList/components/SearchComponents.tsx:214 +#: src/widgets/MiningWidget/MiningList/components/SearchComponents.tsx:217 msgid "Search by address" msgstr "" @@ -990,7 +991,7 @@ msgid "Staked" msgstr "" #. js-lingui-explicit-id -#: src/widgets/MiningWidget/MiningList/my-created/RewardCard.tsx:207 +#: src/widgets/MiningWidget/MiningList/my-created/RewardCard.tsx:210 msgid "Start Time" msgstr "" @@ -1062,7 +1063,7 @@ msgid "Creator" msgstr "" #: src/widgets/MiningWidget/MiningCreate/components/StepTitle.tsx:49 -#: src/widgets/MiningWidget/MiningCreate/index.tsx:137 +#: src/widgets/MiningWidget/MiningCreate/index.tsx:138 msgid "Reward Rules" msgstr "" @@ -1091,7 +1092,7 @@ msgid "Upcoming" msgstr "" #. js-lingui-explicit-id -#: src/widgets/MiningWidget/MiningList/my-created/MyCreatedMining.tsx:138 +#: src/widgets/MiningWidget/MiningList/my-created/MyCreatedMining.tsx:140 #: src/widgets/MiningWidget/MiningList/my-created/OperateArea.tsx:225 msgid "Users" msgstr "" @@ -1184,7 +1185,7 @@ msgid "{lqAndDodoCompareText} Price Difference" msgstr "" #. js-lingui-explicit-id -#: src/widgets/MiningWidget/MiningList/index.tsx:168 +#: src/widgets/MiningWidget/MiningList/index.tsx:176 msgid "You are not currently providing liquidity for any LP pools." msgstr "" @@ -1247,7 +1248,7 @@ msgstr "" msgid "Price" msgstr "" -#: src/widgets/MiningWidget/MiningCreate/components/PoolCard.tsx:209 +#: src/widgets/MiningWidget/MiningCreate/components/PoolCard.tsx:213 msgid "Created by {0}" msgstr "" @@ -1273,7 +1274,7 @@ msgstr "" msgid "Confirm submission" msgstr "" -#: src/widgets/MiningWidget/MiningCreate/components/PoolPicker.tsx:517 +#: src/widgets/MiningWidget/MiningCreate/components/PoolPicker.tsx:521 msgid "Select pool by tokens" msgstr "" @@ -1282,7 +1283,7 @@ msgid "Asset" msgstr "" #: src/widgets/MiningWidget/MiningCreate/components/StepTitle.tsx:45 -#: src/widgets/MiningWidget/MiningCreate/index.tsx:75 +#: src/widgets/MiningWidget/MiningCreate/index.tsx:76 msgid "Mining Type" msgstr "" @@ -1299,7 +1300,7 @@ msgstr "" msgid "SEE HOW IT WORKS" msgstr "" -#: src/widgets/MiningWidget/MiningCreate/operate-widgets/RewardForm.tsx:446 +#: src/widgets/MiningWidget/MiningCreate/operate-widgets/RewardForm.tsx:448 msgid "Delete" msgstr "" @@ -1320,7 +1321,7 @@ msgstr "" #: src/components/DateTimePickerInput/components/MobileDateTimePicker.tsx:203 #: src/components/SwitchChainDialog/index.tsx:128 #: src/components/WidgetConfirm.tsx:112 -#: src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx:234 +#: src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx:238 #: src/widgets/PoolWidget/PoolCreate/operate-widgets/BottomButtonGroup.tsx:403 #: src/widgets/PoolWidget/PoolModify/operate-widgets/BottomButtonGroup.tsx:208 msgid "Cancel" @@ -1336,7 +1337,7 @@ msgstr "自动切换网络" msgid "Get {tokenSymbol}" msgstr "" -#: src/widgets/MiningWidget/MiningList/operate-area/ClaimButton.tsx:38 +#: src/widgets/MiningWidget/MiningList/operate-area/ClaimButton.tsx:42 #: src/widgets/MiningWidget/OperateArea/ClaimButton.tsx:37 msgid "One-Click Claim" msgstr "" @@ -1381,7 +1382,7 @@ msgstr "" msgid "Transaction rejected." msgstr "交易被拒绝." -#: src/widgets/MiningWidget/MiningCreate/components/PoolCard.tsx:212 +#: src/widgets/MiningWidget/MiningCreate/components/PoolCard.tsx:216 msgid "\"Created by {0}" msgstr "" @@ -1405,7 +1406,7 @@ msgstr "" msgid "My Pools" msgstr "" -#: src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx:153 +#: src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx:154 msgid "Approve {0}" msgstr "" @@ -1444,17 +1445,17 @@ msgid "Total Fee Revenue" msgstr "" #: src/components/DateTimePickerInput/components/MobileDateTimePicker.tsx:223 -#: src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx:46 -#: src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx:72 -#: src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx:97 -#: src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx:176 +#: src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx:47 +#: src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx:73 +#: src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx:98 +#: src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx:180 #: src/widgets/PoolWidget/PoolCreate/operate-widgets/BottomButtonGroup.tsx:76 msgid "Next" msgstr "" -#: src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx:176 -#: src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx:187 -#: src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx:360 +#: src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx:180 +#: src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx:191 +#: src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx:367 #: src/widgets/PoolWidget/PoolCreate/components/ConfirmInfoDialog.tsx:197 #: src/widgets/PoolWidget/PoolCreate/operate-widgets/BottomButtonGroup.tsx:86 msgid "Create" @@ -1471,8 +1472,8 @@ msgid "Select Pool Version" msgstr "" #: src/widgets/MiningWidget/hooks/useClaimMiningSubmit.ts:46 -#: src/widgets/MiningWidget/MiningDetail/MiningInfo.tsx:470 -#: src/widgets/MiningWidget/MiningList/operate-area/index.tsx:188 +#: src/widgets/MiningWidget/MiningDetail/MiningInfo.tsx:465 +#: src/widgets/MiningWidget/MiningList/operate-area/index.tsx:204 #: src/widgets/MiningWidget/OperateArea/index.tsx:75 msgid "Claim" msgstr "" @@ -1481,7 +1482,7 @@ msgstr "" msgid "Disclaimer" msgstr "" -#: src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx:249 +#: src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx:253 #: src/widgets/PoolWidget/PoolCreate/operate-widgets/BottomButtonGroup.tsx:418 msgid "Back" msgstr "" @@ -1528,8 +1529,8 @@ msgstr "" msgid "Something went wrong." msgstr "发生异常错误." -#: src/widgets/MiningWidget/MiningCreate/components/RewardDetailList.tsx:176 -#: src/widgets/MiningWidget/MiningCreate/operate-widgets/RewardForm.tsx:394 +#: src/widgets/MiningWidget/MiningCreate/components/RewardDetailList.tsx:178 +#: src/widgets/MiningWidget/MiningCreate/operate-widgets/RewardForm.tsx:396 msgid "Daily Rewards" msgstr "" @@ -1579,7 +1580,7 @@ msgstr "发送至:" msgid "My Staked" msgstr "" -#: src/widgets/MiningWidget/MiningCreate/operate-widgets/RewardForm.tsx:455 +#: src/widgets/MiningWidget/MiningCreate/operate-widgets/RewardForm.tsx:456 #: src/widgets/PoolWidget/PoolDetail/index.tsx:205 #: src/widgets/PoolWidget/PoolList/AddLiquidity.tsx:247 #: src/widgets/PoolWidget/PoolList/AddLiquidity.tsx:487 @@ -1604,8 +1605,8 @@ msgstr "" msgid "Date" msgstr "" -#: src/widgets/MiningWidget/MiningCreate/components/StakingRules.tsx:142 -#: src/widgets/MiningWidget/MiningDetail/MiningInfo.tsx:248 +#: src/widgets/MiningWidget/MiningCreate/components/StakingRules.tsx:144 +#: src/widgets/MiningWidget/MiningDetail/MiningInfo.tsx:241 msgid "Liquidity Pool" msgstr "" @@ -1618,7 +1619,7 @@ msgstr "" msgid "Depth" msgstr "" -#: src/widgets/MiningWidget/MiningCreate/components/PoolPicker.tsx:551 +#: src/widgets/MiningWidget/MiningCreate/components/PoolPicker.tsx:555 msgid "No matching pool found" msgstr "" @@ -1627,8 +1628,8 @@ msgstr "" msgid "Low" msgstr "" -#: src/widgets/MiningWidget/MiningCreate/index.tsx:357 -#: src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx:305 +#: src/widgets/MiningWidget/MiningCreate/index.tsx:358 +#: src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx:312 msgid "Once Mining has started, it cannot be stopped." msgstr "" @@ -1636,7 +1637,7 @@ msgstr "" msgid "Select a liquidity pool" msgstr "" -#: src/widgets/MiningWidget/MiningCreate/operate-widgets/SingleTokenSelect.tsx:135 +#: src/widgets/MiningWidget/MiningCreate/operate-widgets/SingleTokenSelect.tsx:137 msgid "Do not select non-standard ERC20 tokens as this may lead to unknown errors!" msgstr "" @@ -1699,21 +1700,21 @@ msgstr "设置已切换到跨链桥交易模式" msgid "Buy" msgstr "" -#: src/widgets/MiningWidget/MiningCreate/components/RewardDetailList.tsx:165 -#: src/widgets/MiningWidget/MiningCreate/operate-widgets/RewardForm.tsx:208 -#: src/widgets/MiningWidget/MiningDetail/RewardCard.tsx:286 +#: src/widgets/MiningWidget/MiningCreate/components/RewardDetailList.tsx:167 +#: src/widgets/MiningWidget/MiningCreate/operate-widgets/RewardForm.tsx:207 +#: src/widgets/MiningWidget/MiningDetail/RewardCard.tsx:288 msgid "Total Rewards" msgstr "" #: src/components/ConnectWallet/NeedConnectButton.tsx:87 -#: src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx:54 +#: src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx:55 msgid "Connect to a wallet" msgstr "连接钱包" -#: src/widgets/MiningWidget/MiningCreate/components/RewardDetailList.tsx:161 -#: src/widgets/MiningWidget/MiningCreate/operate-widgets/RewardForm.tsx:339 -#: src/widgets/MiningWidget/MiningDetail/RewardCard.tsx:244 -#: src/widgets/MiningWidget/MiningDetail/RewardCard.tsx:272 +#: src/widgets/MiningWidget/MiningCreate/components/RewardDetailList.tsx:163 +#: src/widgets/MiningWidget/MiningCreate/operate-widgets/RewardForm.tsx:341 +#: src/widgets/MiningWidget/MiningDetail/RewardCard.tsx:246 +#: src/widgets/MiningWidget/MiningDetail/RewardCard.tsx:274 msgid "End Time" msgstr "" @@ -1737,11 +1738,11 @@ msgstr "" #: src/components/Swap/components/TokenCard/TokenLogoCollapse.tsx:64 #: src/widgets/MiningWidget/MiningCreate/components/PoolPicker.tsx:360 -#: src/widgets/MiningWidget/MiningCreate/components/PoolPicker.tsx:416 +#: src/widgets/MiningWidget/MiningCreate/components/PoolPicker.tsx:418 msgid "SELECT TOKEN" msgstr "选择代币" -#: src/widgets/MiningWidget/MiningCreate/operate-widgets/RewardForm.tsx:556 +#: src/widgets/MiningWidget/MiningCreate/operate-widgets/RewardForm.tsx:557 msgid "Add Token" msgstr "" @@ -1798,7 +1799,7 @@ msgstr "" msgid "Amounts" msgstr "" -#: src/widgets/MiningWidget/MiningCreate/components/PoolPicker.tsx:566 +#: src/widgets/MiningWidget/MiningCreate/components/PoolPicker.tsx:570 msgid "Create One" msgstr "" @@ -1840,7 +1841,7 @@ msgstr "交易" msgid "There is risk of being arbitraged if adding this liquidity." msgstr "" -#: src/widgets/MiningWidget/MiningCreate/operate-widgets/SingleTokenSelect.tsx:104 +#: src/widgets/MiningWidget/MiningCreate/operate-widgets/SingleTokenSelect.tsx:106 msgid "address" msgstr "" @@ -1856,7 +1857,7 @@ msgstr "源" msgid "You may modify the transaction deadline, the maximum time allowed for a trade to be processed on-chain. However, please note that this may lead to your trade executing at a subpar price, as the market price may change during that time." msgstr "" -#: src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx:136 +#: src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx:137 msgid "{0} Approval Pending" msgstr "" @@ -1880,8 +1881,8 @@ msgstr "用户拒绝交易签名." msgid "Copy link" msgstr "" -#: src/widgets/MiningWidget/MiningCreate/index.tsx:340 -#: src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx:291 +#: src/widgets/MiningWidget/MiningCreate/index.tsx:341 +#: src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx:298 msgid "WARNING" msgstr "" @@ -1925,12 +1926,12 @@ msgstr "关闭" msgid "Fees will be the same as in most other pools." msgstr "" -#: src/widgets/MiningWidget/MiningDetail/MiningInfo.tsx:258 +#: src/widgets/MiningWidget/MiningDetail/MiningInfo.tsx:251 msgid "Mining Pool" msgstr "" -#: src/widgets/MiningWidget/MiningCreate/index.tsx:359 -#: src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx:307 +#: src/widgets/MiningWidget/MiningCreate/index.tsx:360 +#: src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx:314 msgid "To avoid loss of rewards, please ensure that at least 1 or more participating users exist." msgstr "" @@ -1961,6 +1962,6 @@ msgstr "余额不足" msgid "Private" msgstr "" -#: src/components/LiquidityLpPartnerReward.tsx:134 +#: src/components/LiquidityLpPartnerReward.tsx:133 msgid "Learn more" msgstr "" diff --git a/packages/dodoex-widgets/src/widgets/MiningWidget/MiningCreate/components/PoolCard.tsx b/packages/dodoex-widgets/src/widgets/MiningWidget/MiningCreate/components/PoolCard.tsx index 152a441e..3fd28a4b 100644 --- a/packages/dodoex-widgets/src/widgets/MiningWidget/MiningCreate/components/PoolCard.tsx +++ b/packages/dodoex-widgets/src/widgets/MiningWidget/MiningCreate/components/PoolCard.tsx @@ -2,7 +2,7 @@ import { Box, HoverOpacity } from '@dodoex/components'; import { t } from '@lingui/macro'; import BigNumber from 'bignumber.js'; import dayjs from 'dayjs'; -import TokenLogoSimple from '../../../../components/TokenLogoSimple'; +import TokenLogo from '../../../../components/TokenLogo'; import { useWalletInfo } from '../../../../hooks/ConnectWallet/useWalletInfo'; import { TokenInfo } from '../../../../hooks/Token'; import { @@ -147,12 +147,14 @@ export default function PoolCard({ alignItems: 'center', }} > - {formatReadableNumber({ input: baseReserve, @@ -174,12 +176,14 @@ export default function PoolCard({ mt: 4, }} > - {formatReadableNumber({ input: quoteReserve, diff --git a/packages/dodoex-widgets/src/widgets/MiningWidget/MiningCreate/components/PoolPicker.tsx b/packages/dodoex-widgets/src/widgets/MiningWidget/MiningCreate/components/PoolPicker.tsx index d579d9d5..480ce2d5 100644 --- a/packages/dodoex-widgets/src/widgets/MiningWidget/MiningCreate/components/PoolPicker.tsx +++ b/packages/dodoex-widgets/src/widgets/MiningWidget/MiningCreate/components/PoolPicker.tsx @@ -15,7 +15,7 @@ import { t } from '@lingui/macro'; import { useEffect, useMemo, useState } from 'react'; import Dialog from '../../../../components/Dialog'; import { TokenPickerDialog } from '../../../../components/Swap/components/TokenCard/TokenPickerDialog'; -import TokenLogoSimple from '../../../../components/TokenLogoSimple'; +import TokenLogo from '../../../../components/TokenLogo'; import { useWalletInfo } from '../../../../hooks/ConnectWallet/useWalletInfo'; import { TokenInfo } from '../../../../hooks/Token'; import { useFetchFiatPriceBatch } from '../../../../hooks/useFetchFiatPriceBatch'; @@ -380,12 +380,14 @@ export default function PoolPicker({ lineHeight: 1, }} > - {baseToken.symbol} @@ -437,12 +439,14 @@ export default function PoolPicker({ lineHeight: 1, }} > - {quoteToken.symbol} diff --git a/packages/dodoex-widgets/src/widgets/MiningWidget/MiningCreate/components/RewardDetailList.tsx b/packages/dodoex-widgets/src/widgets/MiningWidget/MiningCreate/components/RewardDetailList.tsx index 9c9849f6..53081495 100644 --- a/packages/dodoex-widgets/src/widgets/MiningWidget/MiningCreate/components/RewardDetailList.tsx +++ b/packages/dodoex-widgets/src/widgets/MiningWidget/MiningCreate/components/RewardDetailList.tsx @@ -1,6 +1,6 @@ import { Box, ButtonBase, useTheme } from '@dodoex/components'; import { t } from '@lingui/macro'; -import TokenLogoSimple from '../../../../components/TokenLogoSimple'; +import TokenLogo from '../../../../components/TokenLogo'; import { truncatePoolAddress } from '../../../../utils/address'; import { formatTokenAmountNumber } from '../../../../utils/formatter'; import { Actions, RewardI, StateProps, Types } from '../hooks/reducers'; @@ -97,12 +97,14 @@ function RewardCard({ }} > {reward.token && reward.token.address ? ( - ) : null} diff --git a/packages/dodoex-widgets/src/widgets/MiningWidget/MiningCreate/components/RewardTokenSelect.tsx b/packages/dodoex-widgets/src/widgets/MiningWidget/MiningCreate/components/RewardTokenSelect.tsx index 2112a6ba..f4e1ee42 100644 --- a/packages/dodoex-widgets/src/widgets/MiningWidget/MiningCreate/components/RewardTokenSelect.tsx +++ b/packages/dodoex-widgets/src/widgets/MiningWidget/MiningCreate/components/RewardTokenSelect.tsx @@ -1,6 +1,6 @@ import { alpha, Box, BoxProps, ButtonBase, useTheme } from '@dodoex/components'; import { t } from '@lingui/macro'; -import TokenLogoSimple from '../../../../components/TokenLogoSimple'; +import TokenLogo from '../../../../components/TokenLogo'; import { TokenInfo } from '../../../../hooks/Token'; import { ApprovalState } from '../../../../hooks/Token/type'; import { useGetTokenStatus } from '../../../../hooks/Token/useGetTokenStatus'; @@ -93,14 +93,15 @@ export function RewardTokenSelect({ gap: 4, }} > - - {token.symbol} diff --git a/packages/dodoex-widgets/src/widgets/MiningWidget/MiningCreate/components/StakingRules.tsx b/packages/dodoex-widgets/src/widgets/MiningWidget/MiningCreate/components/StakingRules.tsx index 1509c3f4..11466bfe 100644 --- a/packages/dodoex-widgets/src/widgets/MiningWidget/MiningCreate/components/StakingRules.tsx +++ b/packages/dodoex-widgets/src/widgets/MiningWidget/MiningCreate/components/StakingRules.tsx @@ -1,7 +1,7 @@ import { Box, BoxProps, useTheme } from '@dodoex/components'; import { t } from '@lingui/macro'; +import TokenLogo from '../../../../components/TokenLogo'; import { TokenLogoPair } from '../../../../components/TokenLogoPair'; -import TokenLogoSimple from '../../../../components/TokenLogoSimple'; import { truncatePoolAddress } from '../../../../utils/address'; import { StateProps, TokenType } from '../hooks/reducers'; import { SectionStatusT } from '../types'; @@ -123,12 +123,14 @@ export function StakingRules({ ) ) : saveAToken ? ( <> - {saveAToken?.symbol} @@ -155,8 +157,8 @@ export function StakingRules({ ? pool.id : '-' : saveAToken - ? saveAToken.address - : '-', + ? saveAToken.address + : '-', )} diff --git a/packages/dodoex-widgets/src/widgets/MiningWidget/MiningCreate/hooks/reducers.ts b/packages/dodoex-widgets/src/widgets/MiningWidget/MiningCreate/hooks/reducers.ts index fd890c3f..f1182c03 100644 --- a/packages/dodoex-widgets/src/widgets/MiningWidget/MiningCreate/hooks/reducers.ts +++ b/packages/dodoex-widgets/src/widgets/MiningWidget/MiningCreate/hooks/reducers.ts @@ -22,6 +22,7 @@ export interface StateProps { rewards: RewardI[]; isInitCache: boolean; currentStep: 0 | 1 | 2 | 3; + confirmModalVisible: boolean; } export function init(): StateProps { @@ -44,6 +45,7 @@ export function init(): StateProps { ], isInitCache: false, currentStep: 0, + confirmModalVisible: false, }; } @@ -59,6 +61,7 @@ export enum Types { cover, updateInitCache, SetCurrentStep, + SetConfirmModalVisible, } interface PayloadRewardI extends Partial { @@ -76,6 +79,7 @@ type Payload = { [Types.cover]: StateProps; [Types.updateInitCache]: boolean; [Types.SetCurrentStep]: StateProps['currentStep']; + [Types.SetConfirmModalVisible]: boolean; }; export type Actions = ActionMap[keyof ActionMap]; @@ -179,6 +183,12 @@ export function reducer(state: StateProps, action: Actions): StateProps { isInitCache: action.payload, }; + case Types.SetConfirmModalVisible: + return { + ...state, + confirmModalVisible: action.payload, + }; + default: throw new Error(); } diff --git a/packages/dodoex-widgets/src/widgets/MiningWidget/MiningCreate/hooks/useCreateMining.ts b/packages/dodoex-widgets/src/widgets/MiningWidget/MiningCreate/hooks/useCreateMining.ts index 550760ef..d20e62f4 100644 --- a/packages/dodoex-widgets/src/widgets/MiningWidget/MiningCreate/hooks/useCreateMining.ts +++ b/packages/dodoex-widgets/src/widgets/MiningWidget/MiningCreate/hooks/useCreateMining.ts @@ -138,17 +138,21 @@ export const useCreateMining = ({ }, { metadata: { - [MetadataFlag.submissionCreateMetaKey]: '1', + [MetadataFlag.submissionCreateMetaKey]: true, }, - submittedBack() { - if (submittedBack) { - submittedBack(); - } + submittedBack, + successBack() { handleGotoMiningList?.(); }, }, ); }, + onSettled() { + dispatch({ + type: Types.SetConfirmModalVisible, + payload: false, + }); + }, }); return { diff --git a/packages/dodoex-widgets/src/widgets/MiningWidget/MiningCreate/index.tsx b/packages/dodoex-widgets/src/widgets/MiningWidget/MiningCreate/index.tsx index aec335eb..7972147b 100644 --- a/packages/dodoex-widgets/src/widgets/MiningWidget/MiningCreate/index.tsx +++ b/packages/dodoex-widgets/src/widgets/MiningWidget/MiningCreate/index.tsx @@ -37,6 +37,7 @@ export function MiningCreate({ const { state, dispatch, createMutation, blockNumber, blockTime } = useCreateMining({ submittedBack: undefined, + handleGotoMiningList, }); const { createMiningTypeMap } = useCreateMiningTypeList(); @@ -375,6 +376,7 @@ export function MiningCreate({ dispatch={dispatch} rewardsStatus={rewardsStatus} submitApprove={submitApprove} + createLoading={createMutation.isPending} handleCreate={confirmCreate} handleGoBack={handleGoBack} /> diff --git a/packages/dodoex-widgets/src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx b/packages/dodoex-widgets/src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx index a06cd4de..0888bfa0 100644 --- a/packages/dodoex-widgets/src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx +++ b/packages/dodoex-widgets/src/widgets/MiningWidget/MiningCreate/operate-widgets/BottomButtonGroup.tsx @@ -2,6 +2,7 @@ import { Box, Button, Checkbox, useTheme } from '@dodoex/components'; import { t, Trans } from '@lingui/macro'; import dayjs from 'dayjs'; import { Dispatch, useMemo, useState } from 'react'; +import NeedConnectButton from '../../../../components/ConnectWallet/NeedConnectButton'; import WidgetDialog from '../../../../components/WidgetDialog'; import { useWalletInfo } from '../../../../hooks/ConnectWallet/useWalletInfo'; import { useWidgetDevice } from '../../../../hooks/style/useWidgetDevice'; @@ -11,13 +12,13 @@ import { Actions, StateProps, TokenType, Types } from '../hooks/reducers'; import { RewardStatus } from '../types'; import { isValidRewardInfo } from '../utils'; import { ReactComponent as AlertIcon } from './alarm_24dp.svg'; -import NeedConnectButton from '../../../../components/ConnectWallet/NeedConnectButton'; export function BottomButtonGroup({ state, dispatch, rewardsStatus, submitApprove, + createLoading, handleCreate, handleGoBack, }: { @@ -25,6 +26,7 @@ export function BottomButtonGroup({ dispatch: Dispatch; rewardsStatus: RewardStatus[]; submitApprove: ReturnType['submitApprove']; + createLoading: boolean; handleCreate: () => void; handleGoBack: () => void; }) { @@ -34,7 +36,6 @@ export function BottomButtonGroup({ const { isMobile } = useWidgetDevice(); const { account, chainId } = useWalletInfo(); - const [confirmModalVisible, setConfirmModalVisible] = useState(false); const [confirmChecked, setConfirmChecked] = useState(false); const nextButton = useMemo(() => { @@ -170,7 +171,10 @@ export function BottomButtonGroup({ }); return; } - setConfirmModalVisible(true); + dispatch({ + type: Types.SetConfirmModalVisible, + payload: true, + }); }} > {isMobile ? t`Next` : t`Create`} @@ -254,9 +258,12 @@ export function BottomButtonGroup({ { - setConfirmModalVisible(false); + dispatch({ + type: Types.SetConfirmModalVisible, + payload: false, + }); }} > { - setConfirmModalVisible(false); handleCreate(); }} > - {t`Create`} + {createLoading ? Confirming : Create} diff --git a/packages/dodoex-widgets/src/widgets/MiningWidget/MiningCreate/operate-widgets/RewardForm.tsx b/packages/dodoex-widgets/src/widgets/MiningWidget/MiningCreate/operate-widgets/RewardForm.tsx index 6ce0727c..c0650551 100644 --- a/packages/dodoex-widgets/src/widgets/MiningWidget/MiningCreate/operate-widgets/RewardForm.tsx +++ b/packages/dodoex-widgets/src/widgets/MiningWidget/MiningCreate/operate-widgets/RewardForm.tsx @@ -119,7 +119,6 @@ function RewardItem({ { setActive(!active); }} @@ -254,6 +253,8 @@ function RewardItem({ justifyContent: 'stretch', borderRadius: 8, backgroundColor: theme.palette.background.input, + height: 48, + pl: 12, }} > @@ -450,7 +452,6 @@ function RewardItem({ variant={Button.Variant.contained} fullWidth onClick={() => setActive(!active)} - disabled={addButtonDisabled} > {t`Add`} @@ -578,6 +579,7 @@ export default function RewardForm({ : state.rewards[rewardPickerIndex].token } open={showRewardPicker} + chainId={chainId} onClose={() => setShowRewardPicker(false)} hiddenAddrs={[EtherToken.address]} onTokenChange={(token) => { diff --git a/packages/dodoex-widgets/src/widgets/MiningWidget/MiningCreate/operate-widgets/SingleTokenSelect.tsx b/packages/dodoex-widgets/src/widgets/MiningWidget/MiningCreate/operate-widgets/SingleTokenSelect.tsx index 47aad157..9402853e 100644 --- a/packages/dodoex-widgets/src/widgets/MiningWidget/MiningCreate/operate-widgets/SingleTokenSelect.tsx +++ b/packages/dodoex-widgets/src/widgets/MiningWidget/MiningCreate/operate-widgets/SingleTokenSelect.tsx @@ -3,7 +3,7 @@ import { alpha, Box, Input, useTheme } from '@dodoex/components'; import { t } from '@lingui/macro'; import { useMemo, useState } from 'react'; import { TokenPickerDialog } from '../../../../components/Swap/components/TokenCard/TokenPickerDialog'; -import TokenLogoSimple from '../../../../components/TokenLogoSimple'; +import TokenLogo from '../../../../components/TokenLogo'; import { useWalletInfo } from '../../../../hooks/ConnectWallet/useWalletInfo'; import { truncatePoolAddress } from '../../../../utils'; import { Actions, StateProps, Types } from '../hooks/reducers'; @@ -85,12 +85,14 @@ export function SingleTokenSelect({ typography: 'body2', }} > - {state.saveAToken.symbol} { if (filterCreateMiningEnable) { - return dexListObj[key].createMiningEnable; + return dexListObj[key]?.createMiningEnable ?? false; } return true; }) diff --git a/packages/dodoex-widgets/src/widgets/MiningWidget/MiningDetail/MiningInfo.tsx b/packages/dodoex-widgets/src/widgets/MiningWidget/MiningDetail/MiningInfo.tsx index 4b4f0b9d..a099075a 100644 --- a/packages/dodoex-widgets/src/widgets/MiningWidget/MiningDetail/MiningInfo.tsx +++ b/packages/dodoex-widgets/src/widgets/MiningWidget/MiningDetail/MiningInfo.tsx @@ -1,17 +1,10 @@ import { MiningStatusE } from '@dodoex/api'; -import { - Box, - ButtonBase, - Tab, - Tabs, - TabsGroup, - useTheme, -} from '@dodoex/components'; +import { Box, ButtonBase, Tabs, TabsGroup, useTheme } from '@dodoex/components'; import { t } from '@lingui/macro'; import BigNumber from 'bignumber.js'; import { Dispatch, Fragment, SetStateAction, useMemo, useState } from 'react'; import { AddressWithLinkAndCopy } from '../../../components/AddressWithLinkAndCopy'; -import TokenLogoSimple from '../../../components/TokenLogoSimple'; +import TokenLogo from '../../../components/TokenLogo'; import { useWidgetDevice } from '../../../hooks/style/useWidgetDevice'; import { formatShortNumber, openEtherscanPage } from '../../../utils'; import { APRSection } from '../MiningList/components/APRSection'; @@ -281,12 +274,14 @@ export function MiningInfo({ }} > {type === 'vdodo' ? null : ( - )} diff --git a/packages/dodoex-widgets/src/widgets/MiningWidget/MiningDetail/RewardCard.tsx b/packages/dodoex-widgets/src/widgets/MiningWidget/MiningDetail/RewardCard.tsx index 80cbc4b9..5584158d 100644 --- a/packages/dodoex-widgets/src/widgets/MiningWidget/MiningDetail/RewardCard.tsx +++ b/packages/dodoex-widgets/src/widgets/MiningWidget/MiningDetail/RewardCard.tsx @@ -2,7 +2,7 @@ import { Box, ButtonBase, Tooltip, useTheme } from '@dodoex/components'; import { t } from '@lingui/macro'; import React, { useMemo } from 'react'; import { AddressWithLinkAndCopy } from '../../../components/AddressWithLinkAndCopy'; -import TokenLogoSimple from '../../../components/TokenLogoSimple'; +import TokenLogo from '../../../components/TokenLogo'; import { formatShortNumber } from '../../../utils'; import { useReviewRewardToken } from '../hooks/useReviewRewardToken'; import { getMiningRewardStatus } from '../hooks/utils'; @@ -181,12 +181,14 @@ export const RewardCard = ({ }} > {rewardToken && rewardToken.address ? ( - ) : null} diff --git a/packages/dodoex-widgets/src/widgets/MiningWidget/MiningDetail/index.tsx b/packages/dodoex-widgets/src/widgets/MiningWidget/MiningDetail/index.tsx index b689da9c..73744061 100644 --- a/packages/dodoex-widgets/src/widgets/MiningWidget/MiningDetail/index.tsx +++ b/packages/dodoex-widgets/src/widgets/MiningWidget/MiningDetail/index.tsx @@ -28,6 +28,13 @@ export interface InnerMiningProps { miningItem: TabMiningI; refetchContractData: () => void; handleGotoMiningList: () => void; + handleGotoPoolDetail: ({ + pool, + chainId, + }: { + pool: string; + chainId: number; + }) => void; } const InnerMining = ({ @@ -35,6 +42,7 @@ const InnerMining = ({ miningItem, refetchContractData, handleGotoMiningList, + handleGotoPoolDetail, }: InnerMiningProps) => { const { stakeTokenAddress, @@ -122,6 +130,9 @@ const InnerMining = ({ addLiquiditySuccessfulPair={addLiquiditySuccessfulPair} lpTokenAccountStakedBalanceLoading={lpTokenAccountStakedBalanceLoading} lpTokenAccountBalanceLoading={lpTokenAccountBalanceLoading} + externalAddLiquidityCallback={() => { + handleGotoPoolDetail({ pool: stakeTokenAddress, chainId }); + }} /> ); }, [ @@ -130,6 +141,7 @@ const InnerMining = ({ balanceDataMap, chainId, currentChainId, + handleGotoPoolDetail, isMobile, lpTokenAccountBalanceLoading, lpTokenAccountStakedBalanceLoading, @@ -139,6 +151,7 @@ const InnerMining = ({ refetchContractData, rewardTokenWithAprListArray, rewardTokenWithAprTotalList, + stakeTokenAddress, stakedTokenWithAmountList, totalRewardUSD, totalStakedTokenUSD, @@ -181,6 +194,7 @@ const InnerMining = ({ export function MiningDetail({ query, handleGotoMiningList, + handleGotoPoolDetail, }: { query: { mining?: string; @@ -188,6 +202,13 @@ export function MiningDetail({ chainId: number; }; handleGotoMiningList: () => void; + handleGotoPoolDetail: ({ + pool, + chainId, + }: { + pool: string; + chainId: number; + }) => void; }) { const theme = useTheme(); const { account, chainId: currentChainId } = useWeb3React(); @@ -288,6 +309,7 @@ export function MiningDetail({ miningItem={miningItem} refetchContractData={refetchContractData} handleGotoMiningList={handleGotoMiningList} + handleGotoPoolDetail={handleGotoPoolDetail} /> )} diff --git a/packages/dodoex-widgets/src/widgets/MiningWidget/MiningList/components/MiningListEmpty.tsx b/packages/dodoex-widgets/src/widgets/MiningWidget/MiningList/components/MiningListEmpty.tsx index 7e05dafc..dc9d88d8 100644 --- a/packages/dodoex-widgets/src/widgets/MiningWidget/MiningList/components/MiningListEmpty.tsx +++ b/packages/dodoex-widgets/src/widgets/MiningWidget/MiningList/components/MiningListEmpty.tsx @@ -25,6 +25,9 @@ export function MiningListEmpty({ hasSearch={hasSearch} sx={{ mb: 12, + width: 60, + height: 60, + borderRadius: (24 / 105) * 60, }} /> {notFoundText} diff --git a/packages/dodoex-widgets/src/widgets/MiningWidget/MiningList/components/SearchComponents.tsx b/packages/dodoex-widgets/src/widgets/MiningWidget/MiningList/components/SearchComponents.tsx index f230b773..75b973e6 100644 --- a/packages/dodoex-widgets/src/widgets/MiningWidget/MiningList/components/SearchComponents.tsx +++ b/packages/dodoex-widgets/src/widgets/MiningWidget/MiningList/components/SearchComponents.tsx @@ -5,7 +5,7 @@ import { DebouncedFunc } from 'lodash'; import { Dispatch, SetStateAction, useState } from 'react'; import SelectChain from '../../../../components/SelectChain'; import { TokenPickerDialog } from '../../../../components/Swap/components/TokenCard/TokenPickerDialog'; -import TokenLogoSimple from '../../../../components/TokenLogoSimple'; +import TokenLogo from '../../../../components/TokenLogo'; import { useUserOptions } from '../../../../components/UserOptionsProvider'; import { TokenInfo } from '../../../../hooks/Token/type'; import { MiningTabType, MiningTopTabType } from '../../types'; @@ -146,11 +146,14 @@ export const SearchComponents = ({ backgroundColor: theme.palette.background.tag, }} > - - {symbolEle} diff --git a/packages/dodoex-widgets/src/widgets/MiningWidget/MiningList/hooks/useDepositOrWithdrawOrClaim.ts b/packages/dodoex-widgets/src/widgets/MiningWidget/MiningList/hooks/useDepositOrWithdrawOrClaim.ts index cc3c335e..076f9f00 100644 --- a/packages/dodoex-widgets/src/widgets/MiningWidget/MiningList/hooks/useDepositOrWithdrawOrClaim.ts +++ b/packages/dodoex-widgets/src/widgets/MiningWidget/MiningList/hooks/useDepositOrWithdrawOrClaim.ts @@ -1,4 +1,4 @@ -import { basicTokenMap } from '@dodoex/api'; +import { basicTokenMap, CONTRACT_QUERY_KEY } from '@dodoex/api'; import { parseFixed } from '@ethersproject/bignumber'; import { t } from '@lingui/macro'; import { useMutation } from '@tanstack/react-query'; @@ -8,7 +8,7 @@ import { useMemo } from 'react'; import { useWalletInfo } from '../../../../hooks/ConnectWallet/useWalletInfo'; import { useSubmission } from '../../../../hooks/Submission'; import { OpCode } from '../../../../hooks/Submission/spec'; -import { Metadata } from '../../../../hooks/Submission/types'; +import { Metadata, MetadataFlag } from '../../../../hooks/Submission/types'; import { getEthersValue } from '../../../../utils/bytes'; import { MiningLpTokenI, @@ -186,8 +186,8 @@ export function useDepositOrWithdrawOrClaim({ operateType === 'stake' ? t`Stake` : operateType === 'unstake' - ? t`End mining` - : t`Claim Rewards`; + ? t`End mining` + : t`Claim Rewards`; const submitTime = Math.ceil(Date.now() / 1000); const result = await submission.execute( brief, @@ -202,6 +202,9 @@ export function useDepositOrWithdrawOrClaim({ depositOrWithdrawMining: operateType === 'stake' || operateType === 'unstake', claimMiningReward: operateType === 'claim', + [MetadataFlag.stakeMining]: operateType === 'stake', + [MetadataFlag.unstakeMining]: operateType === 'unstake', + [MetadataFlag.claimMining]: operateType === 'claim', source, id, operateType, diff --git a/packages/dodoex-widgets/src/widgets/MiningWidget/MiningList/index.tsx b/packages/dodoex-widgets/src/widgets/MiningWidget/MiningList/index.tsx index 750a615a..b45045b5 100644 --- a/packages/dodoex-widgets/src/widgets/MiningWidget/MiningList/index.tsx +++ b/packages/dodoex-widgets/src/widgets/MiningWidget/MiningList/index.tsx @@ -33,6 +33,7 @@ export function MiningList({ query, handleGotoCreate, handleGotoDetail, + handleGotoPoolDetail, }: { query?: { mining?: string; @@ -48,6 +49,13 @@ export function MiningList({ pool: string; chainId: number; }) => void; + handleGotoPoolDetail: ({ + pool, + chainId, + }: { + pool: string; + chainId: number; + }) => void; }) { const { isMobile } = useWidgetDevice(); const { i18n } = useLingui(); @@ -193,6 +201,7 @@ export function MiningList({ : othersContractDataLoading } handleGotoDetail={handleGotoDetail} + handleGotoPoolDetail={handleGotoPoolDetail} /> ); })} @@ -204,6 +213,7 @@ export function MiningList({ contractDataMap, currentChainId, handleGotoDetail, + handleGotoPoolDetail, i18n, loading, miningList, diff --git a/packages/dodoex-widgets/src/widgets/MiningWidget/MiningList/mining-types/BaseMiningCard.tsx b/packages/dodoex-widgets/src/widgets/MiningWidget/MiningList/mining-types/BaseMiningCard.tsx index 8ec07b08..6e93ee18 100644 --- a/packages/dodoex-widgets/src/widgets/MiningWidget/MiningList/mining-types/BaseMiningCard.tsx +++ b/packages/dodoex-widgets/src/widgets/MiningWidget/MiningList/mining-types/BaseMiningCard.tsx @@ -30,6 +30,7 @@ export default memo(function BaseMiningCard({ migrationItem, contractDataLoading, handleGotoDetail, + handleGotoPoolDetail, }: { contractData: CompositeMiningContractDataI | undefined; miningItem: TabMiningI; @@ -44,6 +45,13 @@ export default memo(function BaseMiningCard({ pool: string; chainId: number; }) => void; + handleGotoPoolDetail: ({ + pool, + chainId, + }: { + pool: string; + chainId: number; + }) => void; }) { const { stakeTokenAddress, @@ -232,6 +240,9 @@ export default memo(function BaseMiningCard({ lpTokenAccountStakedBalanceLoading } lpTokenAccountBalanceLoading={lpTokenAccountBalanceLoading} + externalAddLiquidityCallback={() => { + handleGotoPoolDetail({ pool: stakeTokenAddress, chainId }); + }} />, operateAreaEle, isMobile, diff --git a/packages/dodoex-widgets/src/widgets/MiningWidget/MiningList/my-created/MyCreatedMining.tsx b/packages/dodoex-widgets/src/widgets/MiningWidget/MiningList/my-created/MyCreatedMining.tsx index 80058ec9..d1bbdcd1 100644 --- a/packages/dodoex-widgets/src/widgets/MiningWidget/MiningList/my-created/MyCreatedMining.tsx +++ b/packages/dodoex-widgets/src/widgets/MiningWidget/MiningList/my-created/MyCreatedMining.tsx @@ -2,7 +2,7 @@ import { useTheme } from '@dodoex/components'; import { useLingui } from '@lingui/react'; import { useContext, useMemo, useState } from 'react'; import { createPortal } from 'react-dom'; -import TokenLogoSimple from '../../../../components/TokenLogoSimple'; +import TokenLogo from '../../../../components/TokenLogo'; import { useWidgetDevice } from '../../../../hooks/style/useWidgetDevice'; import { useMyCreatedMiningList } from '../../hooks/useMyCreatedMiningList'; import { MiningERC20TokenI, MyCreatedMiningI } from '../../types'; @@ -99,13 +99,15 @@ export function MyCreatedMining({ return null; } return ( - ); })} diff --git a/packages/dodoex-widgets/src/widgets/MiningWidget/MiningList/my-created/RewardCard.tsx b/packages/dodoex-widgets/src/widgets/MiningWidget/MiningList/my-created/RewardCard.tsx index 2f2a1069..6ae89752 100644 --- a/packages/dodoex-widgets/src/widgets/MiningWidget/MiningList/my-created/RewardCard.tsx +++ b/packages/dodoex-widgets/src/widgets/MiningWidget/MiningList/my-created/RewardCard.tsx @@ -2,7 +2,7 @@ import { MiningStatusE } from '@dodoex/api'; import { Box, Button, useTheme } from '@dodoex/components'; import { useLingui } from '@lingui/react'; import { useMemo, useState } from 'react'; -import TokenLogoSimple from '../../../../components/TokenLogoSimple'; +import TokenLogo from '../../../../components/TokenLogo'; import { formatShortNumber } from '../../../../utils/formatter'; import { useMyCreatedMiningList } from '../../hooks/useMyCreatedMiningList'; import { useReviewRewardToken } from '../../hooks/useReviewRewardToken'; @@ -139,11 +139,14 @@ export function RewardCard({ gap: 4, }} > - ); diff --git a/packages/dodoex-widgets/src/widgets/MiningWidget/MiningList/operate-area/RewardTokenTable.tsx b/packages/dodoex-widgets/src/widgets/MiningWidget/MiningList/operate-area/RewardTokenTable.tsx index dfe557a4..42a0519a 100644 --- a/packages/dodoex-widgets/src/widgets/MiningWidget/MiningList/operate-area/RewardTokenTable.tsx +++ b/packages/dodoex-widgets/src/widgets/MiningWidget/MiningList/operate-area/RewardTokenTable.tsx @@ -1,6 +1,6 @@ import { Box, useTheme } from '@dodoex/components'; import BigNumber from 'bignumber.js'; -import TokenLogoSimple from '../../../../components/TokenLogoSimple'; +import TokenLogo from '../../../../components/TokenLogo'; import { formatTokenAmountNumber } from '../../../../utils/formatter'; import { MiningRewardTokenWithAprI } from '../../types'; @@ -45,13 +45,15 @@ export function RewardTokenTable({ typography: 'h5', }} > - - {symbol} )} diff --git a/packages/dodoex-widgets/src/widgets/MiningWidget/MiningList/operate-area/StakeButton.tsx b/packages/dodoex-widgets/src/widgets/MiningWidget/MiningList/operate-area/StakeButton.tsx index 82ea2681..4dc3e1ae 100644 --- a/packages/dodoex-widgets/src/widgets/MiningWidget/MiningList/operate-area/StakeButton.tsx +++ b/packages/dodoex-widgets/src/widgets/MiningWidget/MiningList/operate-area/StakeButton.tsx @@ -75,6 +75,10 @@ export function StakeButton({ ); } + const isMutating = + depositOrWithdrawOrClaimMutation.isPending && + depositOrWithdrawOrClaimMutation.variables?.metadata?.operateType === + 'stake'; return ( <> {version === '2' && } @@ -83,7 +87,7 @@ export function StakeButton({ diff --git a/packages/dodoex-widgets/src/widgets/MiningWidget/MiningList/operate-area/UnstakeButton.tsx b/packages/dodoex-widgets/src/widgets/MiningWidget/MiningList/operate-area/UnstakeButton.tsx index cc344651..6b4524a0 100644 --- a/packages/dodoex-widgets/src/widgets/MiningWidget/MiningList/operate-area/UnstakeButton.tsx +++ b/packages/dodoex-widgets/src/widgets/MiningWidget/MiningList/operate-area/UnstakeButton.tsx @@ -56,6 +56,10 @@ export function UnstakeButton({ ); } + const isMutating = + depositOrWithdrawOrClaimMutation.isPending && + depositOrWithdrawOrClaimMutation.variables?.metadata?.operateType === + 'unstake'; return ( <> {version === '2' && } @@ -63,7 +67,7 @@ export function UnstakeButton({ diff --git a/packages/dodoex-widgets/src/widgets/MiningWidget/MiningList/operate-area/index.tsx b/packages/dodoex-widgets/src/widgets/MiningWidget/MiningList/operate-area/index.tsx index 52103337..67e9e3a5 100644 --- a/packages/dodoex-widgets/src/widgets/MiningWidget/MiningList/operate-area/index.tsx +++ b/packages/dodoex-widgets/src/widgets/MiningWidget/MiningList/operate-area/index.tsx @@ -74,8 +74,9 @@ export function OperateArea(props: OperateDataProps) { const skipApprove = type === 'vdodo' || operateType !== 'stake' || !isInCurrentChain; - const [selectedStakeTokenIndex, setSelectedStakeTokenIndex] = - useState<0 | 1>(0); + const [selectedStakeTokenIndex, setSelectedStakeTokenIndex] = useState<0 | 1>( + 0, + ); const [currentStakeTokenAmount, setCurrentStakeTokenAmount] = useState(''); const [currentUnstakeTokenAmount, setCurrentUnstakeTokenAmount] = useState(''); @@ -112,10 +113,25 @@ export function OperateArea(props: OperateDataProps) { }); // 将 lpToken 授权给挖矿合约 - const approveToken = - optToken.address && optToken.decimals !== undefined && isInCurrentChain - ? (optToken as TokenInfo) + const approveToken = useMemo(() => { + return optToken.address && + optToken.decimals !== undefined && + isInCurrentChain + ? { + address: optToken.address, + decimals: optToken.decimals, + symbol: optToken.symbol, + name: optToken.symbol, + chainId, + } : null; + }, [ + chainId, + isInCurrentChain, + optToken.address, + optToken.decimals, + optToken.symbol, + ]); const approveTokenStatus = useTokenStatus(approveToken, { contractAddress: miningContractAddress, @@ -361,7 +377,7 @@ export function OperateArea(props: OperateDataProps) { lpTokenBalance={lpTokenAccountStakedBalance} currentTokenAmount={ lpTokenStatus === MiningStatusE.ended - ? lpTokenAccountStakedBalance?.toString() ?? '' + ? (lpTokenAccountStakedBalance?.toString() ?? '') : currentUnstakeTokenAmount } setCurrentTokenAmount={setCurrentUnstakeTokenAmount} diff --git a/packages/dodoex-widgets/src/widgets/MiningWidget/MiningList/operate-area/utils.ts b/packages/dodoex-widgets/src/widgets/MiningWidget/MiningList/operate-area/utils.ts index d99a8eea..cc04a6c0 100644 --- a/packages/dodoex-widgets/src/widgets/MiningWidget/MiningList/operate-area/utils.ts +++ b/packages/dodoex-widgets/src/widgets/MiningWidget/MiningList/operate-area/utils.ts @@ -1,8 +1,8 @@ import { - MiningTokenI, - TabMiningI, MiningLpTokenI, MiningStakeTokenWithAmountI, + MiningTokenI, + TabMiningI, } from '../../types'; export function getOptTokenSymbol({ @@ -42,7 +42,7 @@ export function getOptToken({ type: TabMiningI['type']; lpToken: MiningLpTokenI; selectedStakeTokenIndex: 0 | 1; -}): MiningLpTokenI { +}) { const symbol = getOptTokenSymbol({ stakedTokenList, type, diff --git a/packages/dodoex-widgets/src/widgets/PoolWidget/PoolList/components/FilterTokenTags.tsx b/packages/dodoex-widgets/src/widgets/PoolWidget/PoolList/components/FilterTokenTags.tsx index 5a63d6f4..be28bbf7 100644 --- a/packages/dodoex-widgets/src/widgets/PoolWidget/PoolList/components/FilterTokenTags.tsx +++ b/packages/dodoex-widgets/src/widgets/PoolWidget/PoolList/components/FilterTokenTags.tsx @@ -1,6 +1,6 @@ import { Box, BoxProps } from '@dodoex/components'; import { Error } from '@dodoex/icons'; -import TokenLogoSimple from '../../../../components/TokenLogoSimple'; +import TokenLogo from '../../../../components/TokenLogo'; import { TokenInfo } from '../../../../hooks/Token'; export default function FilterTokenTags({ @@ -36,14 +36,14 @@ export default function FilterTokenTags({ backgroundColor: 'hover.default', }} > - {tag.symbol}