forked from MystenLabs/sui
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[explorer] - various small bugfixes (MystenLabs#10818)
## Description - adds formatting to amounts in the Epochs table - ~~fixes a bug for problem epochs without `endOfEpochInfo` causing them to show as in progress~~ decided to leave this out for now as it would require an additional rpc call to fix - fixes pagination for epochs / checkpoints table - small style tweaks ## Test Plan How did you test the new or updated feature? --- If your changes are not user-facing and not a breaking change, you can skip the following section. Otherwise, please indicate what changed, and then add to the Release Notes section as highlighted during the release process. ### Type of Change (Check all that apply) - [ ] user-visible impact - [ ] breaking change for a client SDKs - [ ] breaking change for FNs (FN binary must upgrade) - [ ] breaking change for validators or node operators (must upgrade binaries) - [ ] breaking change for on-chain data layout - [ ] necessitate either a data wipe or data migration ### Release notes
- Loading branch information
1 parent
4774e1a
commit 961419c
Showing
8 changed files
with
42 additions
and
151 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Copyright (c) Mysten Labs, Inc. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
import { useFormatCoin } from '@mysten/core'; | ||
import { SUI_TYPE_ARG } from '@mysten/sui.js'; | ||
|
||
import { Text } from '~/ui/Text'; | ||
|
||
export function SuiAmount({ | ||
amount, | ||
}: { | ||
amount?: bigint | number | string | null; | ||
}) { | ||
const [formattedAmount, coinType] = useFormatCoin(amount, SUI_TYPE_ARG); | ||
if (!amount) return <Text variant="bodySmall/medium">--</Text>; | ||
|
||
return ( | ||
<div className="leading-1 flex items-end gap-0.5"> | ||
<Text variant="bodySmall/medium">{formattedAmount}</Text> | ||
<Text variant="captionSmall/normal" color="steel-dark"> | ||
{coinType} | ||
</Text> | ||
</div> | ||
); | ||
} |
109 changes: 0 additions & 109 deletions
109
apps/explorer/src/components/transactions/RecentTxCard.module.css
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters