Skip to content

Commit

Permalink
fix: update version and add localization for "My pool share"
Browse files Browse the repository at this point in the history
  • Loading branch information
yrjkqq committed Dec 6, 2024
1 parent ba7493d commit 89800c9
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 10 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.1-taiko.13",
"version": "3.0.1-taiko.14",
"description": "DODO Widgets",
"source": "src/index.tsx",
"types": "dist/types/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/dodoex-widgets/src/locales/en-US.js

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions packages/dodoex-widgets/src/locales/en-US.po
Original file line number Diff line number Diff line change
Expand Up @@ -972,6 +972,10 @@ msgstr "The setting has been switched to swap mode"
msgid "Quote not available"
msgstr "Quote not available"

#: src/widgets/PoolWidget/PoolList/MyLiquidity.tsx:979
msgid "My pool share"
msgstr "My pool share"

#: src/components/Swap/components/SwapSettingsDialog/SlippageSetting.tsx:122
#: src/widgets/PoolWidget/PoolCreate/operate-widgets/InitPriceSetting.tsx:112
msgid "Learn More"
Expand Down
2 changes: 1 addition & 1 deletion packages/dodoex-widgets/src/locales/zh-CN.js

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions packages/dodoex-widgets/src/locales/zh-CN.po
Original file line number Diff line number Diff line change
Expand Up @@ -972,6 +972,10 @@ msgstr "设置已切换至闪兑模式"
msgid "Quote not available"
msgstr "没有报价"

#: src/widgets/PoolWidget/PoolList/MyLiquidity.tsx:979
msgid "My pool share"
msgstr ""

#: src/components/Swap/components/SwapSettingsDialog/SlippageSetting.tsx:122
#: src/widgets/PoolWidget/PoolCreate/operate-widgets/InitPriceSetting.tsx:112
msgid "Learn More"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,12 @@ export const PositionViewCard = ({
const tickAtLimit = useIsTickAtLimit(p.fee, p.tickLower, p.tickUpper);

// prices
const { priceLower, priceUpper, quote, base } =
getPriceOrderingFromPositionForUI(position);
// const { priceLower, priceUpper, quote, base } =
// getPriceOrderingFromPositionForUI(position);
const priceLower = position?.token0PriceLower;
const priceUpper = position?.token0PriceUpper;
const quote = position?.amount1.currency;
const base = position?.amount0.currency;

const currencyQuote = quote;
const currencyBase = base;
Expand Down Expand Up @@ -165,8 +169,6 @@ export const PositionViewCard = ({
</span>
{currencyQuote?.symbol}
</>
&nbsp;per&nbsp;
{currencyBase?.symbol ?? ''}
</Box>
<svg
xmlns="http://www.w3.org/2000/svg"
Expand All @@ -193,8 +195,6 @@ export const PositionViewCard = ({
</span>
{currencyQuote?.symbol}
</>
&nbsp;per&nbsp;
{currencyBase?.symbol}
</Box>
{/* <Box
component="svg"
Expand Down Expand Up @@ -233,7 +233,7 @@ export const PositionViewCard = ({
{t`Current price`}:&nbsp;
{`${formatTokenAmountNumber({
input: price?.toSignificant(),
})} `}
})}`}
&nbsp;{currencyQuote?.symbol}&nbsp;per&nbsp;
{currencyBase?.symbol}
</Box>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ export function formatTickPrice({
return direction === Bound.LOWER ? '0' : '∞';
}

if (typeof price === 'string' && price === '∞') {
return '∞';
}

return formatTokenAmountNumber({
input: typeof price === 'string' ? price : price?.toSignificant(),
});
Expand Down

0 comments on commit 89800c9

Please sign in to comment.