Skip to content

Commit 9a5f2fb

Browse files
chore: update status based on txHash
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent d1587ed commit 9a5f2fb

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

src/components/composite/DustFlow/components/RouteOverview.tsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,14 @@ export const RouteOverview: FC<RouteOverviewProps> = ({
6868
];
6969

7070
return labels.map((label, index) => {
71-
const status =
72-
currentActionIndex !== undefined && index < currentActionIndex
73-
? 'completed'
74-
: isExecuting && index === currentActionIndex
75-
? 'executing'
76-
: 'pending';
71+
const isCompleted =
72+
Boolean(actionHashes?.[index]) ||
73+
(currentActionIndex !== undefined && index < currentActionIndex);
74+
const status = isCompleted
75+
? 'completed'
76+
: isExecuting && index === currentActionIndex
77+
? 'executing'
78+
: 'pending';
7779

7880
const txHash = actionHashes?.[index];
7981
const explorerUrl =

0 commit comments

Comments
 (0)