• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

input-output-hk / lace / 9413237952

08 Feb 2024 01:46PM UTC coverage: 52.934% (-0.9%) from 53.839%
9413237952

push

github

f98d1b
rhyslbw
chore: bump version

1989 of 4673 branches covered (42.56%)

Branch coverage included in aggregate %.

4487 of 7561 relevant lines covered (59.34%)

56.03 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

34.48
/apps/browser-extension-wallet/src/features/dapp/components/DappTransactionSuccess.tsx
1
import React, { useEffect } from 'react';
24✔
2
import { useTranslation } from 'react-i18next';
24✔
3
import { Button, PostHogAction } from '@lace/common';
24✔
4
import { Image } from 'antd';
24✔
5
import Success from '../../../assets/icons/success-staking.svg';
24✔
6
import styles from './Layout.module.scss';
24✔
7
import { useAnalyticsContext } from '@providers';
24✔
8
import { TX_CREATION_TYPE_KEY, TxCreationType } from '@providers/AnalyticsProvider/analyticsTracker';
24✔
9
import { useWalletManager } from '@hooks';
24✔
10

11
export const DappTransactionSuccess = (): React.ReactElement => {
24✔
12
  const analytics = useAnalyticsContext();
×
13
  const { t } = useTranslation();
×
14
  const { clearPassword } = useWalletManager();
×
15

16
  const onClose = async () => {
×
17
    await analytics?.sendEventToPostHog(PostHogAction.SendAllDoneCloseClick, {
×
18
      [TX_CREATION_TYPE_KEY]: TxCreationType.External
19
    });
20
    window.close();
×
21
  };
22

23
  useEffect(() => {
×
24
    clearPassword();
×
25
  }, [clearPassword]);
26

27
  useEffect(() => {
×
28
    analytics?.sendEventToPostHog(PostHogAction.SendAllDoneView, {
×
29
      [TX_CREATION_TYPE_KEY]: TxCreationType.External
30
    });
31
  }, [analytics]);
32

33
  return (
×
34
    <div data-testid="dapp-sign-tx-success" className={styles.noWalletContainer}>
35
      <div className={styles.noWalletContent}>
36
        <Image data-testid="dapp-sign-tx-success-image" preview={false} width={112} src={Success} />
37
        <div data-testid="dapp-sign-tx-success-heading" className={styles.heading}>
38
          {t('browserView.transaction.success.youCanSafelyCloseThisPanel')}
39
        </div>
40
        <div data-testid="dapp-sign-tx-success-description" className={styles.description}>
41
          {t('core.dappTransaction.signedSuccessfully')}
42
        </div>
43
      </div>
44
      <div className={styles.footer}>
45
        <Button data-testid="dapp-sign-tx-success-close-button" className={styles.footerBtn} onClick={onClose}>
46
          {t('general.button.close')}
47
        </Button>
48
      </div>
49
    </div>
50
  );
51
};
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc