Skip to content

Commit

Permalink
refactor(explorer): Format after rename (#563)
Browse files Browse the repository at this point in the history
* refactor(explorer): Format after rename

* refactor(explorer): Reverse old license header change
  • Loading branch information
marc2332 authored Jun 6, 2024
1 parent 8301662 commit a864be5
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 8 deletions.
5 changes: 3 additions & 2 deletions apps/explorer/src/components/validator-map/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ interface Props {
// NOTE: This component is lazy imported, so it needs to be default exported:
export default function ValidatorMap({ minHeight }: Props) {
const [network] = useNetwork();
const { data: systemState, isError: systemStateError } =
useIotaClientQuery('getLatestIotaSystemState');
const { data: systemState, isError: systemStateError } = useIotaClientQuery(
'getLatestIotaSystemState',
);

const { request } = useAppsBackend();

Expand Down
5 changes: 4 additions & 1 deletion apps/explorer/src/hooks/useSearch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,10 @@ const getResultsForValidatorByPoolIdOrIotaAddress = async (
query: string,
) => {
const normalized = normalizeIotaObjectId(query);
if ((!isValidIotaAddress(normalized) && !isValidIotaObjectId(normalized)) || !systemStateSummery)
if (
(!isValidIotaAddress(normalized) && !isValidIotaObjectId(normalized)) ||
!systemStateSummery
)
return null;

// find validator by pool id or iota address
Expand Down
6 changes: 5 additions & 1 deletion apps/explorer/src/pages/address-result/AddressResult.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,11 @@ export default function AddressResultPage() {
),
}}
content={
isIotaNSAddress ? <IotaNSAddressResult name={id!} /> : <AddressResult address={id!} />
isIotaNSAddress ? (
<IotaNSAddressResult name={id!} />
) : (
<AddressResult address={id!} />
)
}
/>
);
Expand Down
6 changes: 5 additions & 1 deletion apps/explorer/src/pages/id-page/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ function Header({
loading?: boolean;
error?: Error | null;
}) {
const { data: domainName, isLoading, error: resolveIotansError } = useResolveIotaNSName(address);
const {
data: domainName,
isLoading,
error: resolveIotansError,
} = useResolveIotaNSName(address);
const { data, isPending, error: getObjectError } = useGetObject(address!);
const isObject = !!data?.data;
const errorText = getObjectError?.message ?? resolveIotansError?.message ?? error?.message;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ function MoveCall({ data }: TransactionProps<MoveCallIotaTransaction>) {
export function Transaction({
type,
data,
}: TransactionProps<(IotaArgument | IotaArgument[])[] | MoveCallIotaTransaction | IotaMovePackage>) {
}: TransactionProps<
(IotaArgument | IotaArgument[])[] | MoveCallIotaTransaction | IotaMovePackage
>) {
if (type === 'MoveCall') {
return (
<ErrorBoundary>
Expand Down
4 changes: 2 additions & 2 deletions apps/explorer/src/pages/validator/ValidatorDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ function ValidatorDetails() {
}
>
<Text variant="bodySmall/medium">
Staked IOTA is below the minimum IOTA stake threshold to remain a
validator.
Staked IOTA is below the minimum IOTA stake threshold to remain
a validator.
</Text>
</Banner>
</div>
Expand Down

0 comments on commit a864be5

Please sign in to comment.