From 52d96986615765fd5a374cd1035bc4eaada9e8ef Mon Sep 17 00:00:00 2001 From: Kheops <26880866+0xKheops@users.noreply.github.com> Date: Fri, 1 Dec 2023 10:49:54 +0900 Subject: [PATCH] fix: cleanup bytes32 ERC20 symbols (#1168) --- apps/extension/src/core/util/getErc20ContractData.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/extension/src/core/util/getErc20ContractData.ts b/apps/extension/src/core/util/getErc20ContractData.ts index 338815a56f..0a77ddb32e 100644 --- a/apps/extension/src/core/util/getErc20ContractData.ts +++ b/apps/extension/src/core/util/getErc20ContractData.ts @@ -54,7 +54,7 @@ export const getErc20ContractData = async ( contract.read.symbol(), contract.read.decimals(), ]) - symbol = hexToString(bytesSymbol) + symbol = hexToString(bytesSymbol).replace(/\0/g, "").trim() // remove NULL characters } else { throw e }