Skip to content

Commit

Permalink
fix: MET-1563 update type feild
Browse files Browse the repository at this point in the history
  • Loading branch information
Sotatek-TaiTruong committed Aug 10, 2023
1 parent 220c598 commit 7245bc4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ describe("TokenMinting component", () => {
displayName: "Token Holder",
fingerprint: "token-fingerprint",
quantity: 1000,
type: "PAYMENT_ADDRESS"
addressType: "PAYMENT_ADDRESS"
};

beforeEach(() => {
Expand Down Expand Up @@ -93,7 +93,7 @@ describe("TokenTopHolder component", () => {
name: "Token Holder",
displayName: "Token Holder",
fingerprint: "token-fingerprint",
type: "PAYMENT_ADDRESS",
addressType: "PAYMENT_ADDRESS",
quantity: 1000
};

Expand All @@ -118,7 +118,7 @@ describe("TokenTopHolder component", () => {
);
fireEvent.click(screen.getByRole("link", { name: mockData.address }));
expect(history.location.pathname).toBe(
mockData.type === "PAYMENT_ADDRESS" ? details.address(mockData.address) : details.stake(mockData.address)
mockData.addressType === "PAYMENT_ADDRESS" ? details.address(mockData.address) : details.stake(mockData.address)
);
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const TokenTopHolder: React.FC<ITokenTopHolder> = ({ tokenId, totalSupply, decim
minWidth: "200px",
render: (r) => (
<CustomTooltip title={r.address}>
<StyledLink to={r.type === "PAYMENT_ADDRESS" ? details.address(r.address) : details.stake(r.address)}>
<StyledLink to={r.addressType === "PAYMENT_ADDRESS" ? details.address(r.address) : details.stake(r.address)}>
{getShortWallet(r.address)}
</StyledLink>
</CustomTooltip>
Expand Down
2 changes: 1 addition & 1 deletion src/types/token.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ interface IToken extends ITokenOverview, ITokenMetadata {}

interface ITokenTopHolderTable {
address: string;
type: "STAKE_ADDRESS" | "PAYMENT_ADDRESS";
addressType: "STAKE_ADDRESS" | "PAYMENT_ADDRESS";
name: string;
displayName: string;
fingerprint: string;
Expand Down

0 comments on commit 7245bc4

Please sign in to comment.