Skip to content

Commit

Permalink
fix: deposit transaction error
Browse files Browse the repository at this point in the history
  • Loading branch information
Wagalidoom committed May 15, 2024
1 parent b31afaf commit a6128c2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion hooks/use-deposit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,12 +163,14 @@ function useDeposit() {
console.log("sending deposit transaction");
await Promise.all(
deposits.map(async (deposit) => {
let data = "0x";
let data = "";
data += deposit.withdrawal_credentials;
data += deposit.pubkey;
data += deposit.signature;
data += deposit.deposit_data_root;

console.log(data);

try {
writeContract({ address: contractConfig.addresses.token, abi: ERC677ABI, functionName: "transferAndCall", args: [contractConfig.addresses.deposit, depositAmountBN, `0x${data}`] });
} catch (error) {
Expand Down

0 comments on commit a6128c2

Please sign in to comment.