Skip to content

Commit 800641d

Browse files
inf
1 parent bc17fb9 commit 800641d

File tree

1 file changed

+15
-17
lines changed

1 file changed

+15
-17
lines changed

ui/tx/details/TxInfo.tsx

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import config from 'configs/app';
2020
import useApiQuery from 'lib/api/useApiQuery';
2121
import { WEI, WEI_IN_GWEI } from 'lib/consts';
2222
import useIsMobile from 'lib/hooks/useIsMobile';
23-
import { SUPPORTED_INFERENCE_ADDRESSES } from 'lib/inferences/address';
2423
import getNetworkValidatorTitle from 'lib/networks/getNetworkValidatorTitle';
2524
import * as arbitrum from 'lib/rollups/arbitrum';
2625
import getConfirmationDuration from 'lib/tx/getConfirmationDuration';
@@ -100,7 +99,6 @@ const TxInfo = ({ data, isLoading, socketStatus }: Props) => {
10099
setIsExpanded(true);
101100
}, []);
102101

103-
const hasInference = data?.to?.hash === SUPPORTED_INFERENCE_ADDRESSES.InferenceHub;
104102
const inferenceInfo = useInferenceType(data, isLoading);
105103

106104
if (!data) {
@@ -202,21 +200,6 @@ const TxInfo = ({ data, isLoading, socketStatus }: Props) => {
202200
{ data.method }
203201
</Badge>
204202
) }
205-
{ hasInference && (
206-
<Badge
207-
colorPalette="purple"
208-
loading={ isLoading }
209-
fontSize="10px"
210-
fontWeight={ 500 }
211-
px={ 2 }
212-
py={ 0.5 }
213-
minH="6"
214-
fontFamily="system-ui, -apple-system, sans-serif"
215-
letterSpacing="0.02em"
216-
>
217-
{ inferenceInfo?.type || 'AI Inference' }
218-
</Badge>
219-
) }
220203
</Flex>
221204
{ data.arbitrum?.contains_message && (
222205
<Skeleton loading={ isLoading } onClick={ showAssociatedL1Tx } mt={ 2 }>
@@ -227,6 +210,21 @@ const TxInfo = ({ data, isLoading, socketStatus }: Props) => {
227210
) }
228211
</DetailedInfo.ItemValue>
229212

213+
<DetailedInfo.ItemLabel
214+
hint="Type of ML inference for this transaction, if any"
215+
isLoading={ isLoading }
216+
>
217+
Inference
218+
</DetailedInfo.ItemLabel>
219+
<DetailedInfo.ItemValue>
220+
<Badge
221+
colorPalette={ inferenceInfo?.type ? 'purple' : 'gray' }
222+
loading={ isLoading }
223+
>
224+
{ inferenceInfo?.type || 'None' }
225+
</Badge>
226+
</DetailedInfo.ItemValue>
227+
230228
{ rollupFeature.isEnabled && rollupFeature.type === 'optimistic' && data.op_withdrawals && data.op_withdrawals.length > 0 &&
231229
!config.UI.views.tx.hiddenFields?.L1_status && (
232230
<>

0 commit comments

Comments
 (0)