Skip to content

Commit

Permalink
Squash feeData
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholaspai committed Dec 5, 2024
1 parent a638412 commit a22ddf7
Showing 1 changed file with 7 additions and 14 deletions.
21 changes: 7 additions & 14 deletions src/dataworker/Dataworker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1567,14 +1567,12 @@ export class Dataworker {
token: feeToken,
holder,
} = await this._getRequiredEthForOrbitPoolRebalanceLeaf(leaf);
const success = await balanceAllocator.requestBalanceAllocations([
{
tokens: [feeToken],
amount: requiredAmount,
holder: holder,
chainId: hubPoolChainId,
},
]);
const feeData = {
tokens: [feeToken],
amount: requiredAmount,
chainId: hubPoolChainId,
};
const success = await balanceAllocator.requestBalanceAllocations([{ ...feeData, holder }]);
if (!success) {
this.logger.debug({
at: "Dataworker#_executePoolRebalanceLeaves",
Expand All @@ -1587,12 +1585,7 @@ export class Dataworker {
});
if (submitExecution) {
const canFund = await balanceAllocator.requestBalanceAllocations([
{
tokens: [feeToken],
amount: requiredAmount,
holder: await signer.getAddress(),
chainId: hubPoolChainId,
},
{ ...feeData, holder: await signer.getAddress() },
]);
if (!canFund) {
throw new Error(
Expand Down

0 comments on commit a22ddf7

Please sign in to comment.