Skip to content

Commit

Permalink
fix: change WETH address && change fee text
Browse files Browse the repository at this point in the history
  • Loading branch information
junjieit committed Dec 4, 2024
1 parent 1e0d21c commit ffd21e3
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 32 deletions.
2 changes: 1 addition & 1 deletion packages/dodoex-api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dodoex/api",
"version": "3.0.1-taiko.5",
"version": "3.0.1-taiko.6",
"description": "DODO API Kit",
"source": "src/index.ts",
"types": "dist/types/index.d.ts",
Expand Down
6 changes: 2 additions & 4 deletions packages/dodoex-api/src/chainConfig/basicToken.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ export const basicTokenMap: {
},
[ChainId.SEPOLIA]: {
...DEFAULT_BASIC_TOKEN,
// wrappedTokenAddress: '0x7B07164ecFaF0F0D85DFC062Bc205a4674c75Aa0',
wrappedTokenAddress: '0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14',
wrappedTokenAddress: '0x7B07164ecFaF0F0D85DFC062Bc205a4674c75Aa0',
},
[ChainId.OPTIMISM]: {
...DEFAULT_BASIC_TOKEN,
Expand Down Expand Up @@ -115,7 +114,6 @@ export const basicTokenMap: {
},
[ChainId.TAIKO]: {
...DEFAULT_BASIC_TOKEN,
wrappedTokenSymbol: 'WMNT',
wrappedTokenAddress: '0x78c1b0C915c4FAA5FffA6CAbf0219DA63d7f4cb8',
wrappedTokenAddress: '0xA51894664A773981C6C112C43ce576f315d5b1B6',
},
};
4 changes: 2 additions & 2 deletions packages/dodoex-widgets/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dodoex/widgets",
"version": "3.0.1-taiko.9",
"version": "3.0.1-taiko.10",
"description": "DODO Widgets",
"source": "src/index.tsx",
"types": "dist/types/index.d.ts",
Expand Down Expand Up @@ -58,7 +58,7 @@
},
"dependencies": {
"@babel/runtime": "^7.17.0",
"@dodoex/api": "3.0.1-taiko.5",
"@dodoex/api": "3.0.1-taiko.6",
"@dodoex/components": "3.0.1-taiko.3",
"@dodoex/contract-request": "^1.2.0",
"@dodoex/dodo-contract-request": "1.6.0-alpha.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/dodoex-widgets/src/locales/en-US.js

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions packages/dodoex-widgets/src/locales/en-US.po
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,10 @@ msgstr "Edit Parameter Settings"
msgid "Hour"
msgstr "Hour"

#: src/widgets/PoolWidget/AMMV2Create/FeeEdit.tsx:233
msgid "The fee tier is too low. Please enter a value greater than {0}%."
msgstr "The fee tier is too low. Please enter a value greater than {0}%."

#: src/widgets/PoolWidget/PoolCreate/components/ConfirmInfoDialog.tsx:169
#: src/widgets/PoolWidget/PoolCreate/components/StepTitle.tsx:28
#: src/widgets/PoolWidget/PoolCreate/index.tsx:305
Expand Down Expand Up @@ -377,7 +381,7 @@ msgid "Pool Creation"
msgstr "Pool Creation"

#: src/components/Swap/components/SwapSettingsDialog/SlippageSetting.tsx:413
#: src/widgets/PoolWidget/AMMV2Create/FeeEdit.tsx:197
#: src/widgets/PoolWidget/AMMV2Create/FeeEdit.tsx:198
#: src/widgets/PoolWidget/PoolCreate/components/SelectAndInput.tsx:52
msgid "Custom"
msgstr "Custom"
Expand Down Expand Up @@ -988,10 +992,6 @@ msgstr "Stake LP tokens and receive mining rewards."
msgid "No LP pools match your criteria"
msgstr "No LP pools match your criteria"

#: src/widgets/PoolWidget/AMMV2Create/FeeEdit.tsx:232
msgid "The fee tier is too low. Please enter a value greater than {MIN_FEE}."
msgstr "The fee tier is too low. Please enter a value greater than {MIN_FEE}."

#: src/widgets/PoolWidget/PoolList/AddLiquidity.tsx:217
#: src/widgets/PoolWidget/PoolList/AddLiquidity.tsx:544
#: src/widgets/PoolWidget/PoolList/MyLiquidity.tsx:257
Expand Down Expand Up @@ -1531,7 +1531,7 @@ msgstr "Mining Type"
msgid "Settler"
msgstr "Settler"

#: src/widgets/PoolWidget/hooks/useAMMV2RemoveLiquidity.ts:117
#: src/widgets/PoolWidget/hooks/useAMMV2RemoveLiquidity.ts:113
msgid "Remove liquidity"
msgstr "Remove liquidity"

Expand Down
2 changes: 1 addition & 1 deletion packages/dodoex-widgets/src/locales/zh-CN.js

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions packages/dodoex-widgets/src/locales/zh-CN.po
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,10 @@ msgstr ""
msgid "Hour"
msgstr "小时"

#: src/widgets/PoolWidget/AMMV2Create/FeeEdit.tsx:233
msgid "The fee tier is too low. Please enter a value greater than {0}%."
msgstr ""

#: src/widgets/PoolWidget/PoolCreate/components/ConfirmInfoDialog.tsx:169
#: src/widgets/PoolWidget/PoolCreate/components/StepTitle.tsx:28
#: src/widgets/PoolWidget/PoolCreate/index.tsx:305
Expand Down Expand Up @@ -377,7 +381,7 @@ msgid "Pool Creation"
msgstr ""

#: src/components/Swap/components/SwapSettingsDialog/SlippageSetting.tsx:413
#: src/widgets/PoolWidget/AMMV2Create/FeeEdit.tsx:197
#: src/widgets/PoolWidget/AMMV2Create/FeeEdit.tsx:198
#: src/widgets/PoolWidget/PoolCreate/components/SelectAndInput.tsx:52
msgid "Custom"
msgstr ""
Expand Down Expand Up @@ -988,10 +992,6 @@ msgstr ""
msgid "No LP pools match your criteria"
msgstr ""

#: src/widgets/PoolWidget/AMMV2Create/FeeEdit.tsx:232
msgid "The fee tier is too low. Please enter a value greater than {MIN_FEE}."
msgstr ""

#: src/widgets/PoolWidget/PoolList/AddLiquidity.tsx:217
#: src/widgets/PoolWidget/PoolList/AddLiquidity.tsx:544
#: src/widgets/PoolWidget/PoolList/MyLiquidity.tsx:257
Expand Down Expand Up @@ -1531,7 +1531,7 @@ msgstr ""
msgid "Settler"
msgstr ""

#: src/widgets/PoolWidget/hooks/useAMMV2RemoveLiquidity.ts:117
#: src/widgets/PoolWidget/hooks/useAMMV2RemoveLiquidity.ts:113
msgid "Remove liquidity"
msgstr ""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,8 @@ export default function FeeEdit({
) : (
<>
{isCustomValue ? (
new BigNumber(fee).times(100).toNumber() || customValue
(new BigNumber(fee).times(100).toNumber() ||
customValue) + '%'
) : (
<Trans>Custom</Trans>
)}
Expand Down Expand Up @@ -231,7 +232,7 @@ export default function FeeEdit({
/>
<Trans>
The fee tier is too low. Please enter a value greater than{' '}
{MIN_FEE}.
{MIN_FEE * 100}%.
</Trans>
</Box>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ export function RemovePoolOperate({
liquidityAmount: liquidityAmountWei,
slippage: slipperValue,
fee: feeRate,
successBack: submittedBack,
submittedBack,
});
const submitLq = () => {
if (isAMMV2) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export function useAMMV2RemoveLiquidity({
liquidityAmount,
slippage,
fee,
successBack,
submittedBack,
}: {
baseToken: TokenInfo | undefined;
quoteToken: TokenInfo | undefined;
Expand All @@ -33,7 +33,7 @@ export function useAMMV2RemoveLiquidity({
liquidityAmount: string;
slippage: number;
fee: number | undefined;
successBack?: () => void;
submittedBack?: () => void;
}) {
const submission = useSubmission();
const { account } = useWalletInfo();
Expand All @@ -55,13 +55,11 @@ export function useAMMV2RemoveLiquidity({
const basicTokenAddressLow = basicToken.address.toLowerCase();
const to = getUniswapV2Router02ContractAddressByChainId(chainId);
let data = '';
let value = '0x0';
const value = '0x0';
const baseIsETH =
baseToken.address.toLowerCase() === basicTokenAddressLow;
const quoteIsETH =
quoteToken.address.toLowerCase() === basicTokenAddressLow;
const baseInAmountBg = toWei(baseAmount, baseToken.decimals);
const quoteInAmountBg = toWei(quoteAmount, quoteToken.decimals);
const baseInAmountMinBg = toWei(
new BigNumber(baseAmount).times(1 - slippage),
baseToken.decimals,
Expand All @@ -76,7 +74,6 @@ export function useAMMV2RemoveLiquidity({
const tokenAddress = quoteToken.address;
const tokenInAmountMin = quoteInAmountMinBg.toString();
const ethAmountMin = baseInAmountMinBg.toString();
value = NumberToHex(baseInAmountBg) ?? '';
data = encodeUniswapV2Router02RemoveLiquidityETH(
tokenAddress,
feeWei,
Expand All @@ -90,7 +87,6 @@ export function useAMMV2RemoveLiquidity({
const tokenAddress = baseToken.address;
const tokenInAmountMin = baseInAmountMinBg.toString();
const ethAmountMin = quoteInAmountMinBg.toString();
value = NumberToHex(quoteInAmountBg) ?? '';
data = encodeUniswapV2Router02RemoveLiquidityETH(
tokenAddress,
feeWei,
Expand Down Expand Up @@ -125,7 +121,7 @@ export function useAMMV2RemoveLiquidity({
metadata: {
[MetadataFlag.removeLiqidityAMMV2Position]: true,
},
successBack,
submittedBack,
},
);
return txResult;
Expand Down

0 comments on commit ffd21e3

Please sign in to comment.