diff --git a/explorer/src/components/AccountDetails.tsx b/explorer/src/components/AccountDetails.tsx index 25edab1f5..28776016d 100644 --- a/explorer/src/components/AccountDetails.tsx +++ b/explorer/src/components/AccountDetails.tsx @@ -90,13 +90,13 @@ function UnknownAccountCard({ account }: { account: Account }) { Address - +
Balance (SOL) - + {lamportsToSolString(lamports)} @@ -104,14 +104,14 @@ function UnknownAccountCard({ account }: { account: Account }) { {details && ( Data (Bytes) - {details.space} + {details.space} )} {details && ( Owner - +
@@ -120,7 +120,9 @@ function UnknownAccountCard({ account }: { account: Account }) { {details && ( Executable - {details.executable ? "Yes" : "No"} + + {details.executable ? "Yes" : "No"} + )} @@ -281,13 +283,7 @@ function HistoryCard({ pubkey }: { pubkey: PublicKey }) { detailsList.push( - {index === 0 ? ( - {slot} - ) : ( - - - - )} + {slot} diff --git a/explorer/src/components/StatsCard.tsx b/explorer/src/components/StatsCard.tsx index b1ddc504d..09ebddaa0 100644 --- a/explorer/src/components/StatsCard.tsx +++ b/explorer/src/components/StatsCard.tsx @@ -75,31 +75,31 @@ function StatsCardBody() { Block - {currentBlock} + {currentBlock} Block time - {averageBlockTime} + {averageBlockTime} Epoch - {currentEpoch} + {currentEpoch} Epoch progress - {epochProgress} + {epochProgress} Epoch time remaining - {epochTimeRemaining} + {epochTimeRemaining} Transaction count - {transactionCount} + {transactionCount} Transactions per second - {averageTps} + {averageTps} ); diff --git a/explorer/src/components/SupplyCard.tsx b/explorer/src/components/SupplyCard.tsx index 773714e52..eaa747966 100644 --- a/explorer/src/components/SupplyCard.tsx +++ b/explorer/src/components/SupplyCard.tsx @@ -32,19 +32,21 @@ export default function SupplyCard() { Total Supply (SOL) - {lamportsToSolString(supply.total, 0)} + + {lamportsToSolString(supply.total, 0)} + Circulating Supply (SOL) - + {lamportsToSolString(supply.circulating, 0)} Non-Circulating Supply (SOL) - + {lamportsToSolString(supply.nonCirculating, 0)} diff --git a/explorer/src/components/TransactionDetails.tsx b/explorer/src/components/TransactionDetails.tsx index b28e96116..c667bf4e1 100644 --- a/explorer/src/components/TransactionDetails.tsx +++ b/explorer/src/components/TransactionDetails.tsx @@ -114,19 +114,19 @@ function StatusCard({ signature }: Props) { Signature - - + + Result - {renderResult()} + {renderResult()} Timestamp - + {info.timestamp !== "unavailable" ? ( displayTimestamp(info.timestamp * 1000) ) : ( @@ -143,12 +143,12 @@ function StatusCard({ signature }: Props) { Confirmations - {info.confirmations} + {info.confirmations} Block - {info.slot} + {info.slot} {blockhash && ( @@ -162,7 +162,7 @@ function StatusCard({ signature }: Props) { )} - + {blockhash} @@ -171,7 +171,7 @@ function StatusCard({ signature }: Props) { {fee && ( Fee (SOL) - {lamportsToSolString(fee)} + {lamportsToSolString(fee)} )} diff --git a/explorer/src/components/account/StakeAccountCards.tsx b/explorer/src/components/account/StakeAccountCards.tsx index c6f06f202..b83dd187e 100644 --- a/explorer/src/components/account/StakeAccountCards.tsx +++ b/explorer/src/components/account/StakeAccountCards.tsx @@ -63,20 +63,20 @@ function OverviewCard({ Address - +
Balance (SOL) - + {lamportsToSolString(account.lamports || 0)} {stakeAccount.meta && ( Rent Reserve (SOL) - + {lamportsToSolString(stakeAccount.meta.rentExemptReserve)} @@ -84,7 +84,7 @@ function OverviewCard({ {!stakeAccount.meta && ( State - {stakeAccount.displayState()} + {stakeAccount.displayState()} )} @@ -112,21 +112,21 @@ function DelegationCard({ stakeAccount }: { stakeAccount: StakeAccount }) { Status - {displayStatus()} + {displayStatus()} {stake && ( <> Delegated Stake (SOL) - + {lamportsToSolString(stake.delegation.stake)} Delegated Vote Address - +
Activation Epoch - + {stake.delegation.isBootstrapStake() ? "-" : stake.delegation.activationEpoch} @@ -146,7 +146,7 @@ function DelegationCard({ stakeAccount }: { stakeAccount: StakeAccount }) { Deactivation Epoch - + {stake.delegation.isDeactivated() ? stake.delegation.deactivationEpoch : "-"} @@ -171,14 +171,14 @@ function AuthoritiesCard({ meta }: { meta: Meta }) { Stake Authority Address - +
Withdraw Authority Address - +
@@ -186,7 +186,7 @@ function AuthoritiesCard({ meta }: { meta: Meta }) { {hasLockup && ( Lockup Authority Address - +
diff --git a/explorer/src/components/common/Address.tsx b/explorer/src/components/common/Address.tsx index 263219d60..a4c423978 100644 --- a/explorer/src/components/common/Address.tsx +++ b/explorer/src/components/common/Address.tsx @@ -30,17 +30,9 @@ export default function Address({ pubkey, alignRight, link }: Props) { ); - const copyButton = ( - {copyIcon} - ); - - return ( -
- {copyButton} + const content = ( + <> + {copyIcon} {link ? ( @@ -51,6 +43,19 @@ export default function Address({ pubkey, alignRight, link }: Props) { displayAddress(address) )} -
+ + ); + + return ( + <> +
+ {content} +
+
{content}
+ ); } diff --git a/explorer/src/components/common/Signature.tsx b/explorer/src/components/common/Signature.tsx index 9b136d0aa..0b27ddbcd 100644 --- a/explorer/src/components/common/Signature.tsx +++ b/explorer/src/components/common/Signature.tsx @@ -4,9 +4,13 @@ import { TransactionSignature } from "@solana/web3.js"; import { clusterPath } from "utils/url"; type CopyState = "copy" | "copied"; -type Props = { signature: TransactionSignature; link?: boolean }; +type Props = { + signature: TransactionSignature; + alignRight?: boolean; + link?: boolean; +}; -export default function Signature({ signature, link }: Props) { +export default function Signature({ signature, alignRight, link }: Props) { const [state, setState] = useState("copy"); const copyToClipboard = () => navigator.clipboard.writeText(signature); @@ -28,7 +32,11 @@ export default function Signature({ signature, link }: Props) { ); return ( -
+
{copyButton} {link ? ( diff --git a/explorer/src/components/instruction/RawDetails.tsx b/explorer/src/components/instruction/RawDetails.tsx index 84357ebec..5abd92d47 100644 --- a/explorer/src/components/instruction/RawDetails.tsx +++ b/explorer/src/components/instruction/RawDetails.tsx @@ -17,7 +17,7 @@ export function RawDetails({ ix }: { ix: TransactionInstruction }) { <> Program - +
@@ -33,7 +33,7 @@ export function RawDetails({ ix }: { ix: TransactionInstruction }) { Signer )} - +
@@ -41,7 +41,7 @@ export function RawDetails({ ix }: { ix: TransactionInstruction }) { Instruction Data (Base58) - + {displayData(data)} diff --git a/explorer/src/components/instruction/stake/AuthorizeDetailsCard.tsx b/explorer/src/components/instruction/stake/AuthorizeDetailsCard.tsx index 511e9e199..00eccbff3 100644 --- a/explorer/src/components/instruction/stake/AuthorizeDetailsCard.tsx +++ b/explorer/src/components/instruction/stake/AuthorizeDetailsCard.tsx @@ -46,35 +46,35 @@ export function AuthorizeDetailsCard(props: { > Program - +
Stake Address - +
Old Authority Address - +
New Authority Address - +
Authority Type - {authorizationType} + {authorizationType} ); diff --git a/explorer/src/components/instruction/stake/DeactivateDetailsCard.tsx b/explorer/src/components/instruction/stake/DeactivateDetailsCard.tsx index ccf988e58..ff40d71d8 100644 --- a/explorer/src/components/instruction/stake/DeactivateDetailsCard.tsx +++ b/explorer/src/components/instruction/stake/DeactivateDetailsCard.tsx @@ -33,21 +33,21 @@ export function DeactivateDetailsCard(props: { > Program - +
Stake Address - +
Authority Address - +
diff --git a/explorer/src/components/instruction/stake/DelegateDetailsCard.tsx b/explorer/src/components/instruction/stake/DelegateDetailsCard.tsx index 607d2abd2..69d806d4b 100644 --- a/explorer/src/components/instruction/stake/DelegateDetailsCard.tsx +++ b/explorer/src/components/instruction/stake/DelegateDetailsCard.tsx @@ -33,28 +33,28 @@ export function DelegateDetailsCard(props: { > Program - +
Stake Address - +
Delegated Vote Address - +
Authority Address - +
diff --git a/explorer/src/components/instruction/stake/InitializeDetailsCard.tsx b/explorer/src/components/instruction/stake/InitializeDetailsCard.tsx index 9fe532941..153151b83 100644 --- a/explorer/src/components/instruction/stake/InitializeDetailsCard.tsx +++ b/explorer/src/components/instruction/stake/InitializeDetailsCard.tsx @@ -34,28 +34,28 @@ export function InitializeDetailsCard(props: { > Program - +
Stake Address - +
Stake Authority Address - +
Withdraw Authority Address - +
@@ -63,14 +63,14 @@ export function InitializeDetailsCard(props: { {params.lockup.epoch > 0 && ( Lockup Expiry Epoch - {params.lockup.epoch} + {params.lockup.epoch} )} {params.lockup.unixTimestamp > 0 && ( Lockup Expiry Timestamp - + {new Date(params.lockup.unixTimestamp * 1000).toUTCString()} @@ -79,7 +79,7 @@ export function InitializeDetailsCard(props: { {!params.lockup.custodian.equals(SystemProgram.programId) && ( Lockup Custodian Address - +
diff --git a/explorer/src/components/instruction/stake/SplitDetailsCard.tsx b/explorer/src/components/instruction/stake/SplitDetailsCard.tsx index 9b2da9af0..e6191b093 100644 --- a/explorer/src/components/instruction/stake/SplitDetailsCard.tsx +++ b/explorer/src/components/instruction/stake/SplitDetailsCard.tsx @@ -29,35 +29,37 @@ export function SplitDetailsCard(props: { Program - +
Stake Address - +
Authority Address - +
New Stake Address - +
Split Amount (SOL) - {lamportsToSolString(params.lamports)} + + {lamportsToSolString(params.lamports)} + ); diff --git a/explorer/src/components/instruction/stake/WithdrawDetailsCard.tsx b/explorer/src/components/instruction/stake/WithdrawDetailsCard.tsx index 1e7fb7b9d..f403604e1 100644 --- a/explorer/src/components/instruction/stake/WithdrawDetailsCard.tsx +++ b/explorer/src/components/instruction/stake/WithdrawDetailsCard.tsx @@ -34,35 +34,37 @@ export function WithdrawDetailsCard(props: { > Program - +
Stake Address - +
Authority Address - +
To Address - +
Withdraw Amount (SOL) - {lamportsToSolString(params.lamports)} + + {lamportsToSolString(params.lamports)} + ); diff --git a/explorer/src/components/instruction/system/AllocateDetailsCard.tsx b/explorer/src/components/instruction/system/AllocateDetailsCard.tsx index 0845326d0..6b9c0220c 100644 --- a/explorer/src/components/instruction/system/AllocateDetailsCard.tsx +++ b/explorer/src/components/instruction/system/AllocateDetailsCard.tsx @@ -33,21 +33,21 @@ export function AllocateDetailsCard(props: { > Program - +
Account Address - +
Allocated Space (Bytes) - {params.space} + {params.space} ); diff --git a/explorer/src/components/instruction/system/AllocateWithSeedDetailsCard.tsx b/explorer/src/components/instruction/system/AllocateWithSeedDetailsCard.tsx index 06cac096a..3b6f6e788 100644 --- a/explorer/src/components/instruction/system/AllocateWithSeedDetailsCard.tsx +++ b/explorer/src/components/instruction/system/AllocateWithSeedDetailsCard.tsx @@ -34,28 +34,28 @@ export function AllocateWithSeedDetailsCard(props: { > Program - +
Account Address - +
Base Address - +
Seed - + {params.seed} @@ -64,12 +64,12 @@ export function AllocateWithSeedDetailsCard(props: { Allocated Space (Bytes) - {params.space} + {params.space} Assigned Owner - +
diff --git a/explorer/src/components/instruction/system/AssignDetailsCard.tsx b/explorer/src/components/instruction/system/AssignDetailsCard.tsx index de489c425..ab40b83d2 100644 --- a/explorer/src/components/instruction/system/AssignDetailsCard.tsx +++ b/explorer/src/components/instruction/system/AssignDetailsCard.tsx @@ -33,21 +33,21 @@ export function AssignDetailsCard(props: { > Program - +
Account Address - +
Assigned Owner - +
diff --git a/explorer/src/components/instruction/system/AssignWithSeedDetailsCard.tsx b/explorer/src/components/instruction/system/AssignWithSeedDetailsCard.tsx index 5e08023a0..9fc4f6764 100644 --- a/explorer/src/components/instruction/system/AssignWithSeedDetailsCard.tsx +++ b/explorer/src/components/instruction/system/AssignWithSeedDetailsCard.tsx @@ -34,28 +34,28 @@ export function AssignWithSeedDetailsCard(props: { > Program - +
Account Address - +
Base Address - +
Seed - + {params.seed} @@ -64,7 +64,7 @@ export function AssignWithSeedDetailsCard(props: { Assigned Owner - +
diff --git a/explorer/src/components/instruction/system/CreateDetailsCard.tsx b/explorer/src/components/instruction/system/CreateDetailsCard.tsx index ea6fb61cc..a140c8661 100644 --- a/explorer/src/components/instruction/system/CreateDetailsCard.tsx +++ b/explorer/src/components/instruction/system/CreateDetailsCard.tsx @@ -34,38 +34,40 @@ export function CreateDetailsCard(props: { > Program - +
From Address - +
New Address - +
Transfer Amount (SOL) - {lamportsToSolString(params.lamports)} + + {lamportsToSolString(params.lamports)} + Allocated Space (Bytes) - {params.space} + {params.space} Assigned Owner - +
diff --git a/explorer/src/components/instruction/system/CreateWithSeedDetailsCard.tsx b/explorer/src/components/instruction/system/CreateWithSeedDetailsCard.tsx index fb9b2e25d..e06348bb7 100644 --- a/explorer/src/components/instruction/system/CreateWithSeedDetailsCard.tsx +++ b/explorer/src/components/instruction/system/CreateWithSeedDetailsCard.tsx @@ -35,35 +35,35 @@ export function CreateWithSeedDetailsCard(props: { > Program - +
From Address - +
New Address - +
Base Address - +
Seed - + {params.seed} @@ -72,17 +72,19 @@ export function CreateWithSeedDetailsCard(props: { Transfer Amount (SOL) - {lamportsToSolString(params.lamports)} + + {lamportsToSolString(params.lamports)} + Allocated Space (Bytes) - {params.space} + {params.space} Assigned Owner - +
diff --git a/explorer/src/components/instruction/system/NonceAdvanceDetailsCard.tsx b/explorer/src/components/instruction/system/NonceAdvanceDetailsCard.tsx index dbedf6096..b5478ed6b 100644 --- a/explorer/src/components/instruction/system/NonceAdvanceDetailsCard.tsx +++ b/explorer/src/components/instruction/system/NonceAdvanceDetailsCard.tsx @@ -33,21 +33,21 @@ export function NonceAdvanceDetailsCard(props: { > Program - +
Nonce Address - +
Authority Address - +
diff --git a/explorer/src/components/instruction/system/NonceAuthorizeDetailsCard.tsx b/explorer/src/components/instruction/system/NonceAuthorizeDetailsCard.tsx index c0e2700a5..94a186b66 100644 --- a/explorer/src/components/instruction/system/NonceAuthorizeDetailsCard.tsx +++ b/explorer/src/components/instruction/system/NonceAuthorizeDetailsCard.tsx @@ -33,28 +33,28 @@ export function NonceAuthorizeDetailsCard(props: { > Program - +
Nonce Address - +
Old Authority Address - +
New Authority Address - +
diff --git a/explorer/src/components/instruction/system/NonceInitializeDetailsCard.tsx b/explorer/src/components/instruction/system/NonceInitializeDetailsCard.tsx index 1c86920c4..de3b6f8fb 100644 --- a/explorer/src/components/instruction/system/NonceInitializeDetailsCard.tsx +++ b/explorer/src/components/instruction/system/NonceInitializeDetailsCard.tsx @@ -33,21 +33,21 @@ export function NonceInitializeDetailsCard(props: { > Program - +
Nonce Address - +
Authority Address - +
diff --git a/explorer/src/components/instruction/system/NonceWithdrawDetailsCard.tsx b/explorer/src/components/instruction/system/NonceWithdrawDetailsCard.tsx index 2db610a9c..20ad6a798 100644 --- a/explorer/src/components/instruction/system/NonceWithdrawDetailsCard.tsx +++ b/explorer/src/components/instruction/system/NonceWithdrawDetailsCard.tsx @@ -34,35 +34,37 @@ export function NonceWithdrawDetailsCard(props: { > Program - +
Nonce Address - +
Authority Address - +
To Address - +
Withdraw Amount (SOL) - {lamportsToSolString(params.lamports)} + + {lamportsToSolString(params.lamports)} + ); diff --git a/explorer/src/components/instruction/system/TransferDetailsCard.tsx b/explorer/src/components/instruction/system/TransferDetailsCard.tsx index c7a45d73c..6a1d58e49 100644 --- a/explorer/src/components/instruction/system/TransferDetailsCard.tsx +++ b/explorer/src/components/instruction/system/TransferDetailsCard.tsx @@ -29,28 +29,30 @@ export function TransferDetailsCard(props: { Program - +
From Address - +
To Address - +
Transfer Amount (SOL) - {lamportsToSolString(transfer.lamports)} + + {lamportsToSolString(transfer.lamports)} + );