@@ -24,6 +24,8 @@ import RuleDrawer from '../SecurityEngine/RuleDrawer';
24
24
import RuleResult from './RuleResult' ;
25
25
import UserListDrawer from './UserListDrawer' ;
26
26
import { EIP6963ProviderInfo , SelectWallet } from './SelectWallet' ;
27
+ import { ConnectedSite } from '@/background/service/permission' ;
28
+ import { ReactComponent as RcIconMetamask } from 'ui/assets/metamask-mode-circle-cc.svg' ;
27
29
28
30
interface ConnectProps {
29
31
params : any ;
@@ -230,6 +232,8 @@ const Connect = (props: ConnectProps) => {
230
232
null
231
233
) ;
232
234
235
+ const [ currentSite , setCurrentSite ] = useState < ConnectedSite > ( ) ;
236
+
233
237
const userListResult = useMemo ( ( ) => {
234
238
const originBlacklist = engineResults . find (
235
239
( result ) => result . id === '1006'
@@ -466,6 +470,7 @@ const Connect = (props: ConnectProps) => {
466
470
const init = async ( ) => {
467
471
const account = await wallet . getCurrentAccount ( ) ;
468
472
const site = await wallet . getSite ( origin ) ;
473
+ setCurrentSite ( site ) ;
469
474
let level : 'very_low' | 'low' | 'medium' | 'high' = 'low' ;
470
475
let collectList : { name : string ; logo_url : string } [ ] = [ ] ;
471
476
let defaultChain = CHAINS_ENUM . ETH ;
@@ -653,7 +658,18 @@ const Connect = (props: ConnectProps) => {
653
658
/>
654
659
</ div >
655
660
< div className = "connect-card" >
656
- < FallbackSiteLogo url = { icon } origin = { origin } width = "40px" />
661
+ < div className = "relative" >
662
+ < FallbackSiteLogo url = { icon } origin = { origin } width = "40px" />
663
+ { currentSite ?. isMetamaskMode ? (
664
+ < div className = "absolute top-[-4px] right-[-4px] text-r-neutral-title-2" >
665
+ < RcIconMetamask
666
+ width = { 20 }
667
+ height = { 20 }
668
+ viewBox = "0 0 16 16"
669
+ />
670
+ </ div >
671
+ ) : null }
672
+ </ div >
657
673
< p className = "connect-origin" > { origin } </ p >
658
674
</ div >
659
675
</ div >
0 commit comments