Skip to content

Commit

Permalink
fix: transaction labeling (#118)
Browse files Browse the repository at this point in the history
closes FE-26
  • Loading branch information
matt-user authored Nov 15, 2023
1 parent d570c0e commit 5fba76f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import type { TxIconType, TxStatus } from '../../types';

const TX_ICON_MAP: Record<TxIconType, IconComponent> = {
'Contract Created': IconCode,
Script: IconCode,
ContractCall: IconCode,
Mint: IconCoins,
Transfer: IconTransfer,
Expand Down
3 changes: 2 additions & 1 deletion packages/app/src/systems/Transaction/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ export type TxIconType =
| TxType
| TxAccountType
| 'Message'
| 'Contract Created';
| 'Contract Created'
| 'Script';

export const TX_TYPES = Object.keys({ ...TxTypeEnum, ...TxAccountTypeEnum });
export const TX_STATUS = Object.keys(TxStatusEnum);
Expand Down
2 changes: 1 addition & 1 deletion packages/graphql/src/domains/Transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export class TransactionDomain extends Domain<TransactionItemFragment> {
const { source: transaction } = this;
if (transaction.isMint) return 'Mint';
if (transaction.isCreate) return 'Contract Created';
return 'ContractCall';
return 'Script';
}

get time() {
Expand Down

0 comments on commit 5fba76f

Please sign in to comment.