Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
fadeev committed Jul 5, 2024
1 parent e14700f commit fafaa0f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/client/src/deposit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ export const deposit = async function (
if (message && !recipient) {
throw new Error("Please, provide a valid contract address as recipient.");
}
const abiCoder = ethers.utils.defaultAbiCoder;

const recipientHex = ethers.utils.hexZeroPad(recipient, 20);
const encodedMessage = message
? abiCoder.encode(message[0], message[1]).slice(2)
? ethers.utils.defaultAbiCoder.encode(message[0], message[1]).slice(2)
: "";
const data = recipientHex + encodedMessage;

Expand Down

0 comments on commit fafaa0f

Please sign in to comment.