diff --git a/packages/dodoex-widgets/package.json b/packages/dodoex-widgets/package.json index 705a6641..652460f7 100644 --- a/packages/dodoex-widgets/package.json +++ b/packages/dodoex-widgets/package.json @@ -1,6 +1,6 @@ { "name": "@dodoex/widgets", - "version": "3.0.0-bartio.6", + "version": "3.0.0-bartio.8", "description": "DODO Widgets", "source": "src/index.tsx", "types": "dist/index.d.ts", diff --git a/packages/dodoex-widgets/src/components/Swap/components/ReviewDialog.tsx b/packages/dodoex-widgets/src/components/Swap/components/ReviewDialog.tsx index ec5a0be1..99d81c09 100644 --- a/packages/dodoex-widgets/src/components/Swap/components/ReviewDialog.tsx +++ b/packages/dodoex-widgets/src/components/Swap/components/ReviewDialog.tsx @@ -147,20 +147,22 @@ export function ReviewDialog({ decimals: fromToken?.decimals, })} ${fromToken?.symbol}`} - - {curFromFiatPrice - ? `$${formatReadableNumber({ - input: curFromFiatPrice, - showDecimals: 1, - })}` - : '-'} - + {!disabledFiatPrice && ( + + {curFromFiatPrice + ? `$${formatReadableNumber({ + input: curFromFiatPrice, + showDecimals: 1, + })}` + : '-'} + + )} diff --git a/packages/dodoex-widgets/src/components/Swap/components/TokenCard/TokenLogoCollapse.tsx b/packages/dodoex-widgets/src/components/Swap/components/TokenCard/TokenLogoCollapse.tsx index ec64533c..a26aa556 100644 --- a/packages/dodoex-widgets/src/components/Swap/components/TokenCard/TokenLogoCollapse.tsx +++ b/packages/dodoex-widgets/src/components/Swap/components/TokenCard/TokenLogoCollapse.tsx @@ -86,6 +86,7 @@ export function TokenLogoCollapse({ alignItems: 'center', typography: 'h6', color: 'text.secondary', + whiteSpace: 'nowrap', }} > {chain.name} diff --git a/packages/dodoex-widgets/src/components/Swap/index.tsx b/packages/dodoex-widgets/src/components/Swap/index.tsx index 5ec13e87..4ae2da93 100644 --- a/packages/dodoex-widgets/src/components/Swap/index.tsx +++ b/packages/dodoex-widgets/src/components/Swap/index.tsx @@ -829,12 +829,11 @@ export function Swap({ > {`${formatTokenAmountNumber({ input: isReverseRouting ? resAmount : fromAmt, @@ -850,12 +849,11 @@ export function Swap({ /> {`${formatTokenAmountNumber({ input: isReverseRouting ? toAmt : resAmount, diff --git a/packages/dodoex-widgets/src/components/TokenLogo.tsx b/packages/dodoex-widgets/src/components/TokenLogo.tsx index b7cafc8f..a8440628 100644 --- a/packages/dodoex-widgets/src/components/TokenLogo.tsx +++ b/packages/dodoex-widgets/src/components/TokenLogo.tsx @@ -149,6 +149,7 @@ export default function TokenLogo({ width, height, borderRadius: '50%', + flexShrink: 0, ...(noBorder ? {} : { diff --git a/packages/dodoex-widgets/src/locales/en-US.po b/packages/dodoex-widgets/src/locales/en-US.po index baf1bb1d..8e5911c2 100644 --- a/packages/dodoex-widgets/src/locales/en-US.po +++ b/packages/dodoex-widgets/src/locales/en-US.po @@ -126,7 +126,7 @@ msgstr "Remove Liquidity" msgid "Rewards" msgstr "Rewards" -#: src/components/Swap/components/ReviewDialog.tsx:350 +#: src/components/Swap/components/ReviewDialog.tsx:352 #: src/components/Swap/index.tsx:442 msgid "Due to the market condition, market price and estimated price may have a slight difference" msgstr "Due to the market condition, market price and estimated price may have a slight difference" @@ -215,7 +215,7 @@ msgstr "Fee includes: Cross Chain fees + Swap fees. Gas fee not included." msgid "Confirm" msgstr "Confirm" -#: src/components/Swap/index.tsx:1012 +#: src/components/Swap/index.tsx:1010 msgid "Powered by DODO protocol" msgstr "Powered by DODO protocol" @@ -239,11 +239,11 @@ msgstr "Pool Creation" msgid "Custom" msgstr "Custom" -#: src/components/Swap/components/ReviewDialog.tsx:284 +#: src/components/Swap/components/ReviewDialog.tsx:286 msgid "Estimated service provider fees" msgstr "Estimated service provider fees" -#: src/components/Swap/components/ReviewDialog.tsx:282 +#: src/components/Swap/components/ReviewDialog.tsx:284 msgid "Basic Fee" msgstr "Basic Fee" @@ -303,7 +303,7 @@ msgid "Go back" msgstr "Go back" #: src/components/Bridge/BridgeSummaryDialog/BridgeSummaryDetail.tsx:276 -#: src/components/Swap/components/ReviewDialog.tsx:371 +#: src/components/Swap/components/ReviewDialog.tsx:373 msgid "Slippage" msgstr "Slippage" @@ -396,7 +396,7 @@ msgstr "on" msgid "Suitable for stablecoins with price fluctuations within 2%" msgstr "Suitable for stablecoins with price fluctuations within 2%" -#: src/components/Swap/components/ReviewDialog.tsx:374 +#: src/components/Swap/components/ReviewDialog.tsx:376 msgid "High slippage tolerance will increase the success rate of transaction, but might not get the best quote." msgstr "High slippage tolerance will increase the success rate of transaction, but might not get the best quote." @@ -436,7 +436,7 @@ msgstr "Deposit ratio is determined by the current assets ratio in the pool. The msgid "Connecting..." msgstr "Connecting..." -#: src/components/Swap/components/ReviewDialog.tsx:312 +#: src/components/Swap/components/ReviewDialog.tsx:314 msgid "Additional Fee" msgstr "Additional Fee" @@ -530,7 +530,7 @@ msgstr "Owner" msgid "The pegged exchange rate refers to the exchange rate between two token assets where one's value is pegged/fixed by the other. For example, the pegged exchange rate between the US Dollar and USDT is 1." msgstr "The pegged exchange rate refers to the exchange rate between two token assets where one's value is pegged/fixed by the other. For example, the pegged exchange rate between the US Dollar and USDT is 1." -#: src/components/Swap/index.tsx:886 +#: src/components/Swap/index.tsx:884 msgid "The setting has been switched to swap mode" msgstr "The setting has been switched to swap mode" @@ -576,7 +576,7 @@ msgid "LP Fee" msgstr "LP Fee" #: src/components/Bridge/BridgeSummaryDialog/index.tsx:155 -#: src/components/Swap/components/ReviewDialog.tsx:461 +#: src/components/Swap/components/ReviewDialog.tsx:463 msgid "Confirming" msgstr "Confirming" @@ -602,7 +602,7 @@ msgid "Confirm Cross Chain" msgstr "Confirm Cross Chain" #. js-lingui-explicit-id -#: src/components/Swap/components/ReviewDialog.tsx:435 +#: src/components/Swap/components/ReviewDialog.tsx:437 msgid "Price impact reaches <0>{priceImpact}%, accept the quote" msgstr "Price impact reaches <0>{priceImpact}%, accept the quote" @@ -653,7 +653,7 @@ msgstr "Review Cross Chain" msgid "Mining" msgstr "Mining" -#: src/components/Swap/components/ReviewDialog.tsx:347 +#: src/components/Swap/components/ReviewDialog.tsx:349 msgid "Price Impact" msgstr "Price Impact" @@ -731,7 +731,7 @@ msgstr "Suitable for most situations." msgid "Something went wrong…<0>Refresh again" msgstr "Something went wrong…<0>Refresh again" -#: src/components/Swap/components/ReviewDialog.tsx:255 +#: src/components/Swap/components/ReviewDialog.tsx:257 msgid "Swap Detail" msgstr "Swap Detail" @@ -792,7 +792,7 @@ msgstr "Approve" msgid "Share" msgstr "Share" -#: src/components/Swap/components/ReviewDialog.tsx:315 +#: src/components/Swap/components/ReviewDialog.tsx:317 msgid "Additional routing fees set by the Widget user" msgstr "Additional routing fees set by the Widget user" @@ -1027,7 +1027,7 @@ msgstr "Receive" msgid "Select Network" msgstr "Select Network" -#: src/components/Swap/components/ReviewDialog.tsx:463 +#: src/components/Swap/components/ReviewDialog.tsx:465 msgid "Confirm swap" msgstr "Confirm swap" @@ -1126,7 +1126,7 @@ msgstr "Traders" msgid "Unable to SETTLE during the cooling-off period" msgstr "Unable to SETTLE during the cooling-off period" -#: src/components/Swap/index.tsx:884 +#: src/components/Swap/index.tsx:882 msgid "The setting has been switched to cross chain mode" msgstr "The setting has been switched to cross chain mode" @@ -1222,7 +1222,7 @@ msgstr "Enter parameters to view the yield curve" msgid "Paid" msgstr "Paid" -#: src/components/Swap/index.tsx:879 +#: src/components/Swap/index.tsx:877 #: src/hooks/Swap/useExecuteSwap.ts:60 msgid "Swap" msgstr "Swap" diff --git a/packages/dodoex-widgets/src/locales/zh-CN.po b/packages/dodoex-widgets/src/locales/zh-CN.po index 4847a21d..721ed7fb 100644 --- a/packages/dodoex-widgets/src/locales/zh-CN.po +++ b/packages/dodoex-widgets/src/locales/zh-CN.po @@ -126,7 +126,7 @@ msgstr "" msgid "Rewards" msgstr "" -#: src/components/Swap/components/ReviewDialog.tsx:350 +#: src/components/Swap/components/ReviewDialog.tsx:352 #: src/components/Swap/index.tsx:442 msgid "Due to the market condition, market price and estimated price may have a slight difference" msgstr "由于市场情况不同,市场价格与估算价格可能略有差异。" @@ -215,7 +215,7 @@ msgstr "费用包括过跨链桥和交易的手续费,不包括 gas 费。" msgid "Confirm" msgstr "确认" -#: src/components/Swap/index.tsx:1012 +#: src/components/Swap/index.tsx:1010 msgid "Powered by DODO protocol" msgstr "Powered by DODO protocol" @@ -239,11 +239,11 @@ msgstr "" msgid "Custom" msgstr "" -#: src/components/Swap/components/ReviewDialog.tsx:284 +#: src/components/Swap/components/ReviewDialog.tsx:286 msgid "Estimated service provider fees" msgstr "预计服务供应商费用" -#: src/components/Swap/components/ReviewDialog.tsx:282 +#: src/components/Swap/components/ReviewDialog.tsx:284 msgid "Basic Fee" msgstr "基础手续费" @@ -303,7 +303,7 @@ msgid "Go back" msgstr "" #: src/components/Bridge/BridgeSummaryDialog/BridgeSummaryDetail.tsx:276 -#: src/components/Swap/components/ReviewDialog.tsx:371 +#: src/components/Swap/components/ReviewDialog.tsx:373 msgid "Slippage" msgstr "滑点" @@ -396,7 +396,7 @@ msgstr "在" msgid "Suitable for stablecoins with price fluctuations within 2%" msgstr "" -#: src/components/Swap/components/ReviewDialog.tsx:374 +#: src/components/Swap/components/ReviewDialog.tsx:376 msgid "High slippage tolerance will increase the success rate of transaction, but might not get the best quote." msgstr "滑点越高,交易的成功率越高,但是交易的价格可能不会是最好的市场价格。请谨慎调整滑点。" @@ -436,7 +436,7 @@ msgstr "" msgid "Connecting..." msgstr "连接中..." -#: src/components/Swap/components/ReviewDialog.tsx:312 +#: src/components/Swap/components/ReviewDialog.tsx:314 msgid "Additional Fee" msgstr "额外手续费" @@ -530,7 +530,7 @@ msgstr "" msgid "The pegged exchange rate refers to the exchange rate between two token assets where one's value is pegged/fixed by the other. For example, the pegged exchange rate between the US Dollar and USDT is 1." msgstr "" -#: src/components/Swap/index.tsx:886 +#: src/components/Swap/index.tsx:884 msgid "The setting has been switched to swap mode" msgstr "设置已切换至闪兑模式" @@ -576,7 +576,7 @@ msgid "LP Fee" msgstr "" #: src/components/Bridge/BridgeSummaryDialog/index.tsx:155 -#: src/components/Swap/components/ReviewDialog.tsx:461 +#: src/components/Swap/components/ReviewDialog.tsx:463 msgid "Confirming" msgstr "确认中" @@ -602,7 +602,7 @@ msgid "Confirm Cross Chain" msgstr "确认跨链交易" #. js-lingui-explicit-id -#: src/components/Swap/components/ReviewDialog.tsx:435 +#: src/components/Swap/components/ReviewDialog.tsx:437 msgid "Price impact reaches <0>{priceImpact}%, accept the quote" msgstr "价格冲击为<0>{priceImpact}%, 仍接受此报价" @@ -653,7 +653,7 @@ msgstr "预览跨链交易" msgid "Mining" msgstr "" -#: src/components/Swap/components/ReviewDialog.tsx:347 +#: src/components/Swap/components/ReviewDialog.tsx:349 msgid "Price Impact" msgstr "价格冲击" @@ -731,7 +731,7 @@ msgstr "" msgid "Something went wrong…<0>Refresh again" msgstr "" -#: src/components/Swap/components/ReviewDialog.tsx:255 +#: src/components/Swap/components/ReviewDialog.tsx:257 msgid "Swap Detail" msgstr "交易详情" @@ -792,7 +792,7 @@ msgstr "代币授权" msgid "Share" msgstr "" -#: src/components/Swap/components/ReviewDialog.tsx:315 +#: src/components/Swap/components/ReviewDialog.tsx:317 msgid "Additional routing fees set by the Widget user" msgstr "由 Widget 设置的额外路由费用" @@ -1027,7 +1027,7 @@ msgstr "" msgid "Select Network" msgstr "" -#: src/components/Swap/components/ReviewDialog.tsx:463 +#: src/components/Swap/components/ReviewDialog.tsx:465 msgid "Confirm swap" msgstr "确认交易" @@ -1126,7 +1126,7 @@ msgstr "" msgid "Unable to SETTLE during the cooling-off period" msgstr "在冷静期无法进行清算" -#: src/components/Swap/index.tsx:884 +#: src/components/Swap/index.tsx:882 msgid "The setting has been switched to cross chain mode" msgstr "设置已切换到跨链桥交易模式" @@ -1222,7 +1222,7 @@ msgstr "" msgid "Paid" msgstr "" -#: src/components/Swap/index.tsx:879 +#: src/components/Swap/index.tsx:877 #: src/hooks/Swap/useExecuteSwap.ts:60 msgid "Swap" msgstr "交易"