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

input-output-hk / lace / 8449370367

27 Mar 2024 09:18AM UTC coverage: 50.567% (-0.9%) from 51.421%
8449370367

push

github

web-flow
feat: transaction representation refactor (#883)

- transaction includes transaction fees
- it displays returned deposit and deposits
- it shows from address sections wiht tokens and nfts
- it shows to address section with tokens and nfts
- it displays tokens and nfts in the summary
- it summarises the balance in coins of a transactions
- it displays the dapp name in the origin tab

2172 of 5362 branches covered (40.51%)

Branch coverage included in aggregate %.

63 of 177 new or added lines in 10 files covered. (35.59%)

2 existing lines in 1 file now uncovered.

5146 of 9110 relevant lines covered (56.49%)

52.17 hits per line

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

0.0
/packages/core/src/ui/components/DappTransactionHeader/DappTransactionHeader.tsx
NEW
1
import React from 'react';
×
NEW
2
import { Typography } from 'antd';
×
3

NEW
4
import styles from './DappTransactionHeader.module.scss';
×
NEW
5
import { useTranslate } from '@src/ui/hooks';
×
6

NEW
7
import { TransactionType, SummaryExpander, Card } from '@lace/ui';
×
8

NEW
9
const { Text } = Typography;
×
10

NEW
11
export enum TransactionTypes {
×
NEW
12
  Withdrawal = 'withdrawal',
×
NEW
13
  Receive = 'receive',
×
NEW
14
  Sent = 'sent',
×
NEW
15
  Send = 'send',
×
NEW
16
  Sending = 'sending',
×
NEW
17
  Mint = 'mint',
×
NEW
18
  'Self Transaction' = 'self'
×
19
}
20

21
type TransactionType = keyof typeof TransactionTypes;
22

23
export interface DappTransactionHeaderProps {
24
  name: string;
25
  transactionType?: TransactionType;
26
}
27

NEW
28
export const DappTransactionHeader = ({ transactionType, name }: DappTransactionHeaderProps): React.ReactElement => {
×
NEW
29
  const { t } = useTranslate();
×
30

NEW
31
  return (
×
32
    <div data-testid="transaction-type-container">
33
      <TransactionType label={t('package.core.dappTransaction.transaction')} transactionType={transactionType} />
34
      <SummaryExpander title={t('package.core.dappTransaction.origin')}>
35
        <Card.Outlined className={styles.dappInfoContainer}>
36
          <Text className={styles.dappInfo}>
37
            <span data-testid="dapp-transaction-origin">{name}</span>
38
          </Text>
39
        </Card.Outlined>
40
      </SummaryExpander>
41
    </div>
42
  );
43
};
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