Files
tom goriunovandGitHub 176cdb5aba Show conflicting proxy implementations warning (#3179)
* Show conflicting proxy implementations warning

Resolves #2884

* fix: add conflicting_implementations field to contract mocks

* fix tests

* proxy info tweaks

* fix ts
2026-01-05 19:14:56 +01:00

28 lines
1.1 KiB
TypeScript

import { VStack } from '@chakra-ui/react';
import React from 'react';
import type { SmartContractConflictingImplementation, SmartContractProxyType } from 'types/api/contract';
import ContractCodeProxyPattern from '../alerts/ContractDetailsAlertProxyPattern';
import ConnectWalletAlert from './alerts/ConnectWalletAlert';
import ContractCustomAbiAlert from './alerts/ContractCustomAbiAlert';
interface Props {
isLoading?: boolean;
isCustomAbi?: boolean;
proxyType?: SmartContractProxyType;
conflictingImplementations?: Array<SmartContractConflictingImplementation>;
}
const ContractMethodsAlerts = ({ isLoading, isCustomAbi, proxyType, conflictingImplementations }: Props) => {
return (
<VStack gap={ 1 } alignItems="stretch">
<ConnectWalletAlert isLoading={ isLoading }/>
{ proxyType && <ContractCodeProxyPattern isLoading={ isLoading } type={ proxyType } conflictingImplementations={ conflictingImplementations }/> }
{ isCustomAbi && <ContractCustomAbiAlert isLoading={ isLoading }/> }
</VStack>
);
};
export default React.memo(ContractMethodsAlerts);