Skip to content

dual ui + wording #869

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
May 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ export default {
labelDualAssetSettlement_Date: 'Settlement Date',
labelDualAssetAPR: 'APR',
labelDualAssetAction: 'Actions',
labelDualAssetDetail: 'Detail',
labelDualAssetDetail: 'Details',
labelDualAssetRefresh: 'Refresh',
labelDualTxsSide: 'Type',
labelDualTxsProduct: 'Product',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ export default {
labelDualAssetSettlement_Date: 'Settlement Date',
labelDualAssetAPR: 'APR',
labelDualAssetAction: 'Actions',
labelDualAssetDetail: 'Detail',
labelDualAssetDetail: 'Details',
labelDualAssetRefresh: 'Refresh',
labelDualTxsSide: 'Type',
labelDualTxsProduct: 'Product',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const TableWrapperStyled = styled(Box)<BoxProps & { isMobile: boolean }>`
.rdg {
${({ isMobile }) =>
!isMobile
? `--template-columns: 14% 16% 20% 10% 14% 10% 8% 8% !important`
? `--template-columns: 16% 15% 20% 105px 14% 80px 110px 90px!important`
: `--template-columns: 16% 30% 44% 10% !important;`}
}

Expand Down Expand Up @@ -245,7 +245,7 @@ export const DualAssetTable = withTranslation(['tables', 'common'])(
},
{
key: 'Settlement_Date',
sortable: true,
sortable: false,
width: 'auto',
name: t('labelDualAssetSettlement_Date'),
cellClass: 'textAlignCenter',
Expand All @@ -256,7 +256,7 @@ export const DualAssetTable = withTranslation(['tables', 'common'])(
},
{
key: 'APR',
sortable: true,
sortable: false,
width: 'auto',
cellClass: 'textAlignCenter',
headerCellClass: 'textAlignCenter',
Expand All @@ -267,7 +267,7 @@ export const DualAssetTable = withTranslation(['tables', 'common'])(
},
{
key: 'Auto',
sortable: true,
sortable: false,
name: t('labelDualAutoReinvest'),
formatter: ({ row }: FormatterProps<R, unknown>) => {
return row?.__raw__.order?.dualReinvestInfo?.isRecursive ? (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -512,13 +512,13 @@ export const useDualAsset = <R extends RawDataDualAssetItem>(
tokenMap[sellTokenSymbol].precision,
true,
)

const market = dualMarketMap[item.tokenInfoOrigin.market] as sdk.DefiMarketInfo
const currentPrice = {
base: item.tokenInfoOrigin.base,
quote: item.tokenInfoOrigin.quote,
base: idIndex[market.baseTokenId],
quote: idIndex[market.quoteTokenId],
currentPrice: findIndex?.index,
precisionForPrice: dualMarketMap[item.tokenInfoOrigin.market]?.precisionForPrice,
quoteUnit: item.tokenInfoOrigin.quote,
precisionForPrice: market.precisionForPrice,
quoteUnit: idIndex[market.quoteTokenId],
}
prev.push({
...format,
Expand Down
23 changes: 11 additions & 12 deletions packages/webapp/src/pages/AssetPage/HistoryPanel/useDualAsset.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -364,14 +364,13 @@ export const useDualAsset = <R extends RawDataDualAssetItem>(
indexP.quote === _item.tokenInfoOrigin.quote
)
})
const market = dualMarketMap[_item.tokenInfoOrigin.market] as sdk.DefiMarketInfo
const currentPrice = {
base: _item.tokenInfoOrigin.base,
quote: _item.tokenInfoOrigin.quote,
base: idIndex[market.baseTokenId],
quote: idIndex[market.quoteTokenId],
currentPrice: findIndex?.index,
precisionForPrice:
dualMarketMap[_item.tokenInfoOrigin.market]?.precisionForPrice ??
tokenMap[_item.tokenInfoOrigin.quote]?.precision,
quoteUnit: _item.tokenInfoOrigin.quote,
precisionForPrice: dualMarketMap[_item.tokenInfoOrigin.market]?.precisionForPrice,
quoteUnit: idIndex[market.quoteTokenId],
}
const format = makeDualOrderedItem(
_item,
Expand Down Expand Up @@ -543,16 +542,16 @@ export const useDualAsset = <R extends RawDataDualAssetItem>(
tokenMap[sellTokenSymbol].precision,
true,
)
const market = dualMarketMap[item.tokenInfoOrigin.market] as sdk.DefiMarketInfo

const currentPrice = {
base: item.tokenInfoOrigin.base,
quote: item.tokenInfoOrigin.quote,
base: idIndex[market.baseTokenId],
quote: idIndex[market.quoteTokenId],
currentPrice: findIndex?.index,
precisionForPrice:
dualMarketMap[item.tokenInfoOrigin.market]?.precisionForPrice ??
tokenMap[item.tokenInfoOrigin.quote]?.precision,
quoteUnit: item.tokenInfoOrigin.quote,
precisionForPrice: dualMarketMap[item.tokenInfoOrigin.market]?.precisionForPrice,
quoteUnit: idIndex[market.quoteTokenId],
}

prev.push({
...format,
amount,
Expand Down