Skip to content

Commit 5faa288

Browse files
committed
fix pyth for history refill
1 parent 5816fd9 commit 5faa288

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

fees/pyth-entropy/index.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,16 @@ async function fetch(options: FetchOptions): Promise<FetchResult> {
3333

3434
const feePerRequest = await options.api.call({
3535
target: pythEntropyContract,
36-
abi: 'uint128:getFeeV2'
36+
abi: 'uint128:getFeeV2',
37+
permitFailure: true,
3738
});
39+
if (!feePerRequest) {
40+
return {
41+
dailyFees: 0,
42+
dailyRevenue: 0,
43+
dailySupplySideRevenue: 0,
44+
}
45+
}
3846

3947
const requestLogs = await options.getLogs({
4048
target: pythEntropyContract,

0 commit comments

Comments
 (0)