Skip to content

Commit 12f94d8

Browse files
committed
refactor(compactX): code reorg
1 parent 532bd38 commit 12f94d8

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

typescript/solver/solvers/compactX/filler.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import { BuildRules, RulesMap } from "../types.js";
88
import { retrieveTokenBalance } from "../utils.js";
99
import { allowBlockLists, metadata } from "./config/index.js";
1010
import { PriceService } from "./services/price/PriceService.js";
11-
import { TheCompactService } from "./services/TheCompactService.js";
1211
import {
1312
type BroadcastRequest,
1413
BroadcastRequestSchema,
@@ -77,9 +76,6 @@ export class CompactXFiller extends BaseFiller<
7776
const signer = this.multiProvider.getSigner(mandateChainId);
7877
const fillerAddress = await signer.getAddress();
7978

80-
// Get current ETH price for the chain from memory
81-
const ethPrice = this.priceService.getPrice(mandateChainId);
82-
8379
// Calculate simulation values
8480
const minimumAmount = BigInt(request.compact.mandate.minimumAmount);
8581
const bufferedMinimumAmount = (minimumAmount * 101n) / 100n;
@@ -171,6 +167,9 @@ export class CompactXFiller extends BaseFiller<
171167
})
172168
).toBigInt();
173169

170+
// Get current ETH price for the chain from memory
171+
const ethPrice = this.priceService.getPrice(mandateChainId);
172+
174173
const maxSettlementAmount = getMaxSettlementAmount({
175174
estimatedGas,
176175
ethPrice,

0 commit comments

Comments
 (0)