Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/Accordions/TransactionAccordion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export const TransactionAccordion: React.FC<Props> = ({
leftContent={
<FFAccordionText
color="primary"
text={t(FF_TX_CATEGORY_MAP[tx.type]?.nicename)}
text={t(FF_TX_CATEGORY_MAP[tx.type]?.nicename ?? tx.type)}
isHeader
/>
}
Expand Down
5 changes: 4 additions & 1 deletion src/components/Cards/EventCards/EventCardWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ export const EventCardWrapper = ({ event, onHandleViewEvent, link }: Props) => {
onClick={() => onHandleViewEvent(event)}
title={
event.transaction
? t(FF_TX_CATEGORY_MAP[event.transaction?.type]?.nicename)
? t(
FF_TX_CATEGORY_MAP[event.transaction?.type]?.nicename ??
event.transaction?.type
)
: t(t(FF_EVENTS_CATEGORY_MAP[event.type]?.nicename))
}
description={getEnrichedEventText(event)}
Expand Down
4 changes: 3 additions & 1 deletion src/components/Slides/TransactionSlide.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,9 @@ export const TransactionSlide: React.FC<Props> = ({
{/* Title */}
<SlideHeader
subtitle={t('transaction')}
title={t(FF_TX_CATEGORY_MAP[transaction.type]?.nicename)}
title={t(
FF_TX_CATEGORY_MAP[transaction.type]?.nicename ?? transaction.type
)}
/>
{/* Data list */}
<Grid container item>
Expand Down
6 changes: 6 additions & 0 deletions src/interfaces/enums/transactionTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export enum FF_TX {
NONE = 'none',
// Blockchain Event
CONTRACT_INVOKE = 'contract_invoke',
CONTRACT_INVOKE_PIN = 'contract_invoke_pin',
NETWORK_ACTION = 'network_action',
CONTRACT_DEPLOY = 'contract_deploy',
//Message/Definitions
Expand All @@ -70,6 +71,11 @@ export const FF_TX_CATEGORY_MAP: { [key in FF_TX]: IBlockchainCategory } = {
color: FFColors.Yellow,
nicename: 'contractInvoke',
},
[FF_TX.CONTRACT_INVOKE_PIN]: {
category: TxCategoryEnum.BLOCKCHAIN,
color: FFColors.Yellow,
nicename: 'contractInvokePin',
},
[FF_TX.NETWORK_ACTION]: {
category: TxCategoryEnum.BLOCKCHAIN,
color: FFColors.Yellow,
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Activity/views/TransactionDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ export const TransactionDetails: () => JSX.Element = () => {
}}
pb={1}
>
{t(FF_TX_CATEGORY_MAP[tx.type]?.nicename)}
{t(FF_TX_CATEGORY_MAP[tx.type]?.nicename ?? tx.type)}
</Typography>
<TxList tx={tx} txStatus={txStatus} showTxLink={false} />
</Paper>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Activity/views/Transactions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ export const ActivityTransactions: () => JSX.Element = () => {
value: (
<FFTableText
color="primary"
text={t(FF_TX_CATEGORY_MAP[tx.type]?.nicename)}
text={t(FF_TX_CATEGORY_MAP[tx.type]?.nicename ?? tx.type)}
/>
),
},
Expand Down
1 change: 1 addition & 0 deletions src/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
"contractInterfaceConfirmed": "Contract Interface Confirmed",
"contractInterfaces": "Contract Interfaces",
"contractInvoke": "Contract Invoke",
"contractInvokePin": "Contract Invoke w/ Pin",
"contractListener": "Contract Listener",
"contractListeners": "Contract Listeners",
"copyToClipboard": "Copy to Clipboard",
Expand Down