Skip to content

Commit ae5d8c4

Browse files
committed
fix: update DealEventProps structure and adjust SmartLinkGroup types in buildTransactionDetails
1 parent 50d8846 commit ae5d8c4

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

src/modules/events/DealEvent.tsx

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,13 @@ type DealEventProps = {
55
transaction?: {
66
txHash?: string;
77
};
8-
dealid?: string;
8+
deal: {
9+
dealid?: string;
10+
};
911
workerpool?: { address: string };
1012
};
1113

12-
const DealEvent = ({
13-
type,
14-
transaction,
15-
dealid,
16-
workerpool,
17-
}: DealEventProps) => {
14+
const DealEvent = ({ type, transaction, deal, workerpool }: DealEventProps) => {
1815
return (
1916
<div className="flex gap-1">
2017
{type && <>{type} </>}
@@ -29,14 +26,18 @@ const DealEvent = ({
2926
</div>
3027
)}
3128

32-
{dealid && (
29+
{deal.dealid && (
3330
<div className="flex items-center gap-1">
3431
{'deal '}
35-
<SmartLinkGroup type="deal" addressOrId={dealid} label={dealid} />
32+
<SmartLinkGroup
33+
type="deal"
34+
addressOrId={deal.dealid}
35+
label={deal.dealid}
36+
/>
3637
</div>
3738
)}
3839

39-
{workerpool && (
40+
{workerpool?.address && (
4041
<div className="flex items-center gap-1">
4142
{'workerpool '}
4243
<SmartLinkGroup

src/modules/transactions/transaction/buildTransactionDetails.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export function buildTransactionDetails({
1515
TxHash: (
1616
<div className="flex flex-wrap items-center gap-1">
1717
<SmartLinkGroup
18-
type="transaction"
18+
type="address"
1919
isCurrentPage={true}
2020
addressOrId={transaction.txHash}
2121
label={transaction.txHash}
@@ -26,7 +26,7 @@ export function buildTransactionDetails({
2626
...(transaction.from && {
2727
From: (
2828
<SmartLinkGroup
29-
type="transaction"
29+
type="address"
3030
addressOrId={transaction.from.address}
3131
label={transaction.from.address}
3232
/>

0 commit comments

Comments
 (0)