Skip to content

Commit

Permalink
fix: estimateBatch and sendBatch use same callData
Browse files Browse the repository at this point in the history
  • Loading branch information
HappySean2845 committed Nov 23, 2023
1 parent 1a0870a commit 42ee0d9
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions src/CyberAccount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,14 +147,13 @@ class CyberAccount {
args: [this.encodeMultiSendCallData(batch)],
});

return multiSendCallData;
// return this.encodeExecuteCallData(
// {
// to: CyberAccount.MULTI_SEND_ADDRESS,
// data: multiSendCallData,
// },
// 1,
// );
return this.encodeExecuteCallData(
{
to: CyberAccount.MULTI_SEND_ADDRESS,
data: multiSendCallData,
},
1,
);
}

private encodeMultiSendCallData(batch: UserOperationCallData[]) {
Expand Down Expand Up @@ -544,7 +543,7 @@ class CyberAccount {
const sender = this.address;
const to = CyberAccount.MULTI_SEND_ADDRESS;
const value = this.sumBatchTxValues(transactionData).toString();
const callData = this.encodeBatchExecuteCallData(transactionData);
const callData = this.encodeMultiSendFunctionData(transactionData);

const estimation = await this.paymaster?.estimateUserOperation(
{
Expand Down

0 comments on commit 42ee0d9

Please sign in to comment.