Skip to content

Commit

Permalink
Add bartio testnet
Browse files Browse the repository at this point in the history
  • Loading branch information
junjieit committed Sep 30, 2024
1 parent 2328465 commit b8ecbb5
Show file tree
Hide file tree
Showing 7 changed files with 59 additions and 57 deletions.
2 changes: 1 addition & 1 deletion 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.0-bartio.6",
"version": "3.0.0-bartio.8",
"description": "DODO Widgets",
"source": "src/index.tsx",
"types": "dist/index.d.ts",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,20 +147,22 @@ export function ReviewDialog({
decimals: fromToken?.decimals,
})} ${fromToken?.symbol}`}</Box>
</Box>
<Box
sx={{
mt: 4,
typography: 'h6',
color: theme.palette.text.secondary,
}}
>
{curFromFiatPrice
? `$${formatReadableNumber({
input: curFromFiatPrice,
showDecimals: 1,
})}`
: '-'}
</Box>
{!disabledFiatPrice && (
<Box
sx={{
mt: 4,
typography: 'h6',
color: theme.palette.text.secondary,
}}
>
{curFromFiatPrice
? `$${formatReadableNumber({
input: curFromFiatPrice,
showDecimals: 1,
})}`
: '-'}
</Box>
)}
</Box>
<Box sx={{ width: 16, mx: 16 }} component={DoubleRight} />
<Box>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ export function TokenLogoCollapse({
alignItems: 'center',
typography: 'h6',
color: 'text.secondary',
whiteSpace: 'nowrap',
}}
>
{chain.name}
Expand Down
18 changes: 8 additions & 10 deletions packages/dodoex-widgets/src/components/Swap/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -829,12 +829,11 @@ export function Swap({
>
<TokenLogo
token={fromToken}
sx={{
width: 16,
height: 16,
mr: 6,
}}
width={16}
height={16}
marginRight={6}
chainId={fromToken.chainId}
noShowChain={!crossChain}
/>
{`${formatTokenAmountNumber({
input: isReverseRouting ? resAmount : fromAmt,
Expand All @@ -850,12 +849,11 @@ export function Swap({
/>
<TokenLogo
token={toToken}
sx={{
width: 16,
height: 16,
mr: 6,
}}
width={16}
height={16}
marginRight={6}
chainId={toToken.chainId}
noShowChain={!crossChain}
/>
{`${formatTokenAmountNumber({
input: isReverseRouting ? toAmt : resAmount,
Expand Down
1 change: 1 addition & 0 deletions packages/dodoex-widgets/src/components/TokenLogo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ export default function TokenLogo({
width,
height,
borderRadius: '50%',
flexShrink: 0,
...(noBorder
? {}
: {
Expand Down
32 changes: 16 additions & 16 deletions packages/dodoex-widgets/src/locales/en-US.po
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"

Expand All @@ -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"

Expand Down Expand Up @@ -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"

Expand Down Expand Up @@ -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."

Expand Down Expand Up @@ -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"

Expand Down Expand Up @@ -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"

Expand Down Expand Up @@ -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"

Expand All @@ -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}</0>%, accept the quote"
msgstr "Price impact reaches <0>{priceImpact}</0>%, accept the quote"

Expand Down Expand Up @@ -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"

Expand Down Expand Up @@ -731,7 +731,7 @@ msgstr "Suitable for most situations."
msgid "Something went wrong…<0>Refresh again</0>"
msgstr "Something went wrong…<0>Refresh again</0>"

#: src/components/Swap/components/ReviewDialog.tsx:255
#: src/components/Swap/components/ReviewDialog.tsx:257
msgid "Swap Detail"
msgstr "Swap Detail"

Expand Down Expand Up @@ -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"

Expand Down Expand Up @@ -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"

Expand Down Expand Up @@ -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"

Expand Down Expand Up @@ -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"
Expand Down
32 changes: 16 additions & 16 deletions packages/dodoex-widgets/src/locales/zh-CN.po
Original file line number Diff line number Diff line change
Expand Up @@ -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 "由于市场情况不同,市场价格与估算价格可能略有差异。"
Expand Down Expand Up @@ -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"

Expand All @@ -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 "基础手续费"

Expand Down Expand Up @@ -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 "滑点"

Expand Down Expand Up @@ -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 "滑点越高,交易的成功率越高,但是交易的价格可能不会是最好的市场价格。请谨慎调整滑点。"

Expand Down Expand Up @@ -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 "额外手续费"

Expand Down Expand Up @@ -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 "设置已切换至闪兑模式"

Expand Down Expand Up @@ -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 "确认中"

Expand All @@ -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}</0>%, accept the quote"
msgstr "价格冲击为<0>{priceImpact}</0>%, 仍接受此报价"

Expand Down Expand Up @@ -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 "价格冲击"

Expand Down Expand Up @@ -731,7 +731,7 @@ msgstr ""
msgid "Something went wrong…<0>Refresh again</0>"
msgstr ""

#: src/components/Swap/components/ReviewDialog.tsx:255
#: src/components/Swap/components/ReviewDialog.tsx:257
msgid "Swap Detail"
msgstr "交易详情"

Expand Down Expand Up @@ -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 设置的额外路由费用"

Expand Down Expand Up @@ -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 "确认交易"

Expand Down Expand Up @@ -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 "设置已切换到跨链桥交易模式"

Expand Down Expand Up @@ -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 "交易"
Expand Down

0 comments on commit b8ecbb5

Please sign in to comment.