Skip to content

Commit

Permalink
fix: update token price to USD instead of USD
Browse files Browse the repository at this point in the history
  • Loading branch information
chloezxyy committed Jul 22, 2024
1 parent 2a95ef0 commit ddbf88f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 15 deletions.
22 changes: 10 additions & 12 deletions cypress/e2e/pages/dex/dex.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ context("/dex on macbook-16", () => {
cy.wrap(ele).findByText("Pair").should("be.visible");
cy.wrap(ele).findByText("Total Liquidity").should("be.visible");
cy.wrap(ele).findByText("Volume (24H)").should("be.visible");
cy.wrap(ele)
.findByText("Primary Token Price (USDT)")
.should("be.visible");
cy.wrap(ele).findByText("Primary Token Price (USD)").should("be.visible");
cy.wrap(ele).findByText("APR").should("be.visible");
});
});
Expand Down Expand Up @@ -73,7 +71,7 @@ context("/dex on macbook-16", () => {
.findByTestId("OverflowTable.SortButton")
.should("exist");
cy.wrap(ele)
.findByText("Primary Token Price (USDT)")
.findByText("Primary Token Price (USD)")
.findByTestId("OverflowTable.SortButton")
.should("exist");
});
Expand All @@ -92,7 +90,7 @@ context("/dex on macbook-16", () => {
.eq(3)
.then(($ele) => {
totalLiquid.push(
Number.parseInt($ele.text().substring(1).replaceAll(",", ""))
Number.parseInt($ele.text().substring(1).replaceAll(",", "")),
);
});
});
Expand All @@ -118,7 +116,7 @@ context("/dex on macbook-16", () => {
.eq(2)
.then(($ele) => {
volume.push(
Number.parseInt($ele.text().substring(1).replaceAll(",", ""))
Number.parseInt($ele.text().substring(1).replaceAll(",", "")),
);
});
});
Expand Down Expand Up @@ -154,7 +152,7 @@ context("/dex on macbook-16", () => {
});

cy.findByTestId("OverflowTable.Header").within(() => {
cy.findByText("Primary Token Price (USDT)")
cy.findByText("Primary Token Price (USD)")
.findByTestId("OverflowTable.SortButton")
.click();
});
Expand All @@ -165,7 +163,7 @@ context("/dex on macbook-16", () => {
.eq(1)
.then(($ele) => {
price.push(
Number.parseInt($ele.text().substring(1).replaceAll(",", ""))
Number.parseInt($ele.text().substring(1).replaceAll(",", "")),
);
});
});
Expand Down Expand Up @@ -210,7 +208,7 @@ context("/dex on iphone-x", () => {
.should("be.visible")
.should("have.text", "Total Liquidity");
cy.findByTestId("CardList.Row.Child").should("be.visible");
}
},
);
cy.findByTestId("PoolPairsCard.CardList.24hVolume").within(() => {
cy.findByTestId("CardList.Row.Title")
Expand All @@ -221,7 +219,7 @@ context("/dex on iphone-x", () => {
cy.findByTestId("PoolPairsCard.CardList.TokenPrice").within(() => {
cy.findByTestId("CardList.Row.Title")
.should("be.visible")
.should("have.text", "Primary Token Price (USDT)");
.should("have.text", "Primary Token Price (USD)");
cy.findByTestId("CardList.Row.Child").should("be.visible");
});
cy.findByTestId("PoolPairsCard.CardList.APR").within(() => {
Expand All @@ -231,7 +229,7 @@ context("/dex on iphone-x", () => {
cy.findByTestId("CardList.Row.Child").should("be.visible");
});
});
}
},
);
});

Expand Down Expand Up @@ -314,7 +312,7 @@ context("/dex on iphone-x", () => {
if (text !== undefined) {
totalLiquid.push(Number.parseInt(text.replaceAll(",", "")));
}
}
},
);
});
});
Expand Down
2 changes: 1 addition & 1 deletion src/pages/dex/_components/PoolPairsCards.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ export function PoolPairsCard({

<CardList.List>
<CardList.ListItem
title="Primary Token Price (USDT)"
title="Primary Token Price (USD)"
titleClassNames="text-sm"
testId="PoolPairsCard.CardList.TokenPrice"
>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/dex/_components/PoolPairsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export function PoolPairsTable({
<OverflowTable>
<OverflowTable.Header>
<OverflowTable.Head title="Pair" />
<OverflowTable.Head title="Primary Token Price (USDT)" alignRight>
<OverflowTable.Head title="Primary Token Price (USD)" alignRight>
<OverflowTable.SortButton
columnKey={SortKeys.PRIMARY_TOKEN_PRICE}
onClick={() => changeSort(SortKeys.PRIMARY_TOKEN_PRICE)}
Expand Down
2 changes: 1 addition & 1 deletion src/utils/commons/TokenRename.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export function tokenSymbolRename(symbol: string): string {
return symbol.includes("dUSDT") ? symbol.replace("dUSDT", "csUSDT") : symbol;
return symbol.includes("dUSDT") ? symbol.replace("dUSDT", "ex_USDT") : symbol;
}

0 comments on commit ddbf88f

Please sign in to comment.