diff --git a/backend/packages/common/src/utils/isValidAddress.js b/backend/packages/common/src/utils/isValidAddress.js index 411d82113..99146bd7e 100644 --- a/backend/packages/common/src/utils/isValidAddress.js +++ b/backend/packages/common/src/utils/isValidAddress.js @@ -1,7 +1,12 @@ const { decodeAddress, encodeAddress } = require("@polkadot/keyring"); const { hexToU8a, isHex } = require("@polkadot/util"); +const { isEthereumAddress } = require("@polkadot/util-crypto"); function isValidAddress(address = "") { + if (isEthereumAddress(address)) { + return true; + } + try { encodeAddress(isHex(address) ? hexToU8a(address) : decodeAddress(address));