Skip to content

Commit

Permalink
chore: update comment
Browse files Browse the repository at this point in the history
  • Loading branch information
npty committed Apr 11, 2024
1 parent 81d68c4 commit f5590d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libs/TransactionRecoveryApi/helpers/getCommandId.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { arrayify, concat, hexlify, hexZeroPad, keccak256 } from "ethers/lib/uti

const stringToCharcodeArray = (text: string) => Array.from(text, (char) => char.charCodeAt(0));

// This function should be called from evm source chain only. It doesn't work properly if it's called from cosmos-based or others chains.
// This function is specifically designed for use with EVM-based chains. Its behavior may not be as expected if used with Cosmos-based chains or other types of chains.
export const getCommandId = (messageId: string, sourceEventIndex: number, chainId: number) => {
if (messageId.includes("-")) {
return keccak256(concat([stringToCharcodeArray(messageId), hexlify(chainId)]));
Expand Down

0 comments on commit f5590d5

Please sign in to comment.