// Copyright 2023 @soul-wallet/extension-base // SPDX-License-Identifier: Apache-2.0 import { isEthereumAddress } from '@polkadot/util-crypto'; export function isEqualContractAddress (address1: string, address2: string) { if (isEthereumAddress(address1) && isEthereumAddress(address2)) { return address1.toLowerCase() === address2.toLowerCase(); // EVM address is case-insensitive } return address2 === address1; }