Skip to content

Commit

Permalink
refactor(tangle-dapp): Typo
Browse files Browse the repository at this point in the history
  • Loading branch information
yurixander committed Nov 2, 2024
1 parent 1f2d542 commit 90d2aa5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
14 changes: 8 additions & 6 deletions apps/tangle-dapp/app/claim/success/SuccessClient.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
'use client';

import type { HexString } from '@polkadot/util/types';
import { ExternalLinkLine, ShieldedCheckLineIcon } from '@webb-tools/icons';
import Button from '@webb-tools/webb-ui-components/components/buttons/Button';
import { KeyValueWithButton } from '@webb-tools/webb-ui-components/components/KeyValueWithButton';
import { AppTemplate } from '@webb-tools/webb-ui-components/containers/AppTemplate';
import { Typography } from '@webb-tools/webb-ui-components/typography/Typography';
import { type FC } from 'react';
import { Hash } from 'viem';

import useSubstrateExplorerUrl from '../../../hooks/useSubstrateExplorerUrl';

const SuccessClient: FC<{ blockHash: HexString }> = ({ blockHash }) => {
const SuccessClient: FC<{ blockHash: Hash }> = ({ blockHash }) => {
const { getExplorerUrl } = useSubstrateExplorerUrl();

const txExplorerUrl = getExplorerUrl(blockHash, 'block');
Expand All @@ -35,8 +35,8 @@ const SuccessClient: FC<{ blockHash: HexString }> = ({ blockHash }) => {

<Typography variant="body1" ta="center">
You have successfully claimed TNT airdrop! Your transaction has been
confirmed on the Tangle Network. You can view your transaction on
the explorer below.
confirmed on the Tangle network. View transaction details on the
explorer link below.
</Typography>

{txExplorerUrl ? (
Expand All @@ -46,9 +46,11 @@ const SuccessClient: FC<{ blockHash: HexString }> = ({ blockHash }) => {
size="sm"
variant="link"
className="mx-auto"
rightIcon={<ExternalLinkLine className="!fill-current" />}
rightIcon={
<ExternalLinkLine className="fill-current dark:fill-current" />
}
>
Open Explorer
View Explorer
</Button>
) : blockHash ? (
<KeyValueWithButton
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export default function useRestakeTxEventHandlersWithNoti<
Context extends Record<string, unknown>,
>({ options = {}, ...props }: Props<Context> = {}) {
const { notificationApi } = useWebbUI();
const { resolveExplorerUrl: resoleExplorerUrl } = useSubstrateExplorerUrl();
const { resolveExplorerUrl } = useSubstrateExplorerUrl();

return useMemo<TxEventHandlers<Context>>(
() => ({
Expand All @@ -69,7 +69,7 @@ export default function useRestakeTxEventHandlersWithNoti<
},
onTxInBlock: (txHash, blockHash, context) => {
const key = TxEvent.IN_BLOCK;
const url = resoleExplorerUrl(txHash, blockHash);
const url = resolveExplorerUrl(txHash, blockHash);

notificationApi.remove(TxEvent.SENDING);

Expand All @@ -87,7 +87,7 @@ export default function useRestakeTxEventHandlersWithNoti<
},
onTxSuccess: (txHash, blockHash, context) => {
const key = TxEvent.SUCCESS;
const url = resoleExplorerUrl(txHash, blockHash);
const url = resolveExplorerUrl(txHash, blockHash);

notificationApi.remove(TxEvent.SENDING);
notificationApi.remove(TxEvent.IN_BLOCK);
Expand Down Expand Up @@ -128,6 +128,6 @@ export default function useRestakeTxEventHandlersWithNoti<
props?.onTxFailed?.(error, context);
},
}),
[notificationApi, options, props, resoleExplorerUrl],
[notificationApi, options, props, resolveExplorerUrl],
);
}

0 comments on commit 90d2aa5

Please sign in to comment.