Skip to content

Commit

Permalink
fix evm conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
onnovisser committed Sep 18, 2023
1 parent 5be33b4 commit 59cc554
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions centrifuge-js/src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ export function computeMultisig(multisig: Multisig): ComputedMultisig {
export function evmToSubstrateAddress(address: string, chainId: number) {
// Bytes EVM\0 as suffix
const suffix = '45564d00'
const chainHex = chainId.toString(16).padStart(4, '0')
const chainHex = chainId.toString(16).padStart(16, '0')

return `0x${address.substring(2).toLowerCase()}000000000000${chainHex}${suffix}`
return `0x${address.substring(2).toLowerCase()}${chainHex}${suffix}`
}

0 comments on commit 59cc554

Please sign in to comment.