1
- import { Tooltip , Image , chakra } from '@chakra-ui/react' ;
1
+ import { Tooltip , Image , chakra , useColorModeValue } from '@chakra-ui/react' ;
2
2
import BigNumber from 'bignumber.js' ;
3
3
import React from 'react' ;
4
4
@@ -38,6 +38,7 @@ type Props = {
38
38
isLoading ?: boolean ;
39
39
addressDataMap ?: Record < string , AddressParam > ;
40
40
className ?: string ;
41
+ isNoves ?: boolean ;
41
42
} ;
42
43
43
44
type NonStringTxInterpretationVariable = Exclude < TxInterpretationVariable , TxInterpretationVariableString > ;
@@ -173,7 +174,8 @@ const TxInterpretationElementByType = (
173
174
}
174
175
} ;
175
176
176
- const TxInterpretation = ( { summary, isLoading, addressDataMap, className } : Props ) => {
177
+ const TxInterpretation = ( { summary, isLoading, addressDataMap, className, isNoves } : Props ) => {
178
+ const novesLogoUrl = useColorModeValue ( '/static/noves-logo.svg' , '/static/noves-logo-dark.svg' ) ;
177
179
if ( ! summary ) {
178
180
return null ;
179
181
}
@@ -191,7 +193,7 @@ const TxInterpretation = ({ summary, isLoading, addressDataMap, className }: Pro
191
193
const chunks = getStringChunks ( intermediateResult ) ;
192
194
193
195
return (
194
- < Skeleton isLoaded = { ! isLoading } className = { className } fontWeight = { 500 } whiteSpace = "pre-wrap" >
196
+ < Skeleton isLoaded = { ! isLoading } className = { className } fontWeight = { 500 } whiteSpace = "pre-wrap" >
195
197
< Tooltip label = "Transaction summary" >
196
198
< IconSvg name = "lightning" boxSize = { 5 } color = "text_secondary" mr = { 1 } verticalAlign = "text-top" />
197
199
</ Tooltip >
@@ -216,6 +218,14 @@ const TxInterpretation = ({ summary, isLoading, addressDataMap, className }: Pro
216
218
</ chakra . span >
217
219
) ;
218
220
} ) }
221
+ { isNoves && (
222
+ < Tooltip label = "Human readable transaction provided by Noves.fi" >
223
+ < Tag ml = { 2 } display = "inline-flex" alignItems = "center" verticalAlign = "unset" transform = "translateY(-2px)" >
224
+ by
225
+ < Image src = { novesLogoUrl } alt = "Noves logo" h = "12px" ml = { 1.5 } />
226
+ </ Tag >
227
+ </ Tooltip >
228
+ ) }
219
229
</ Skeleton >
220
230
) ;
221
231
} ;
0 commit comments