Skip to content

Commit

Permalink
fix: cleanup bytes32 ERC20 symbols (#1168)
Browse files Browse the repository at this point in the history
  • Loading branch information
0xKheops authored Dec 1, 2023
1 parent 8d5d7cd commit 52d9698
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/extension/src/core/util/getErc20ContractData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 52d9698

Please sign in to comment.