Skip to content

Commit

Permalink
fix : rename confirmations,polygon finality update
Browse files Browse the repository at this point in the history
  • Loading branch information
tHeMaskedMan981 committed Jun 18, 2024
1 parent 19251ce commit 8eb8710
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion scripts/rpcConfig/constants/defaultFinalityBucket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ import { ChainSlug } from "../../../src/enums/chainSlug";
import { FinalityBucket } from "../../../src/socket-types";

export const defaultFinalityBucket = {
[ChainSlug.POLYGON_MAINNET]: FinalityBucket.slow,
[ChainSlug.POLYGON_MAINNET]: FinalityBucket.medium,
[ChainSlug.MAINNET]: FinalityBucket.medium,
};
4 changes: 2 additions & 2 deletions scripts/rpcConfig/constants/finality.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const finalityOverrides: {
} = {
[ChainSlug.POLYGON_MAINNET]: {
[FinalityBucket.fast]: 64,
[FinalityBucket.medium]: 150,
[FinalityBucket.slow]: 256,
[FinalityBucket.medium]: 256,
[FinalityBucket.slow]: 1000,
},
};
2 changes: 1 addition & 1 deletion scripts/rpcConfig/constants/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export * from "./batcherSupportedChainSlug";
export * from "./confirmations";
export * from "./reSyncInterval";
export * from "./explorers";
export * from "./icons";
export * from "./rpc";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ChainSlug } from "../../../src";

export const confirmations = {
export const reSyncInterval = {
[ChainSlug.POLYGON_MAINNET]: 256,
[ChainSlug.MAINNET]: 6,
};
8 changes: 4 additions & 4 deletions scripts/rpcConfig/rpcConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
FinalityBucket,
} from "../../src";
import {
confirmations,
reSyncInterval,
explorers,
icons,
batcherSupportedChainSlugs,
Expand Down Expand Up @@ -94,7 +94,7 @@ const getChainData = async (
chainTxData: await getChainTxData(chainSlug, txData),
nativeToken: getCurrency(chainSlug),
chainType: getChainType(chainSlug),
confirmations: getConfirmations(chainSlug),
reSyncInterval: getReSyncInterval(chainSlug),
finalityInfo: getFinality(chainSlug),
defaultFinalityBucket: getDefaultFinalityBucket(chainSlug),
icon: icons[chainSlug],
Expand Down Expand Up @@ -170,6 +170,6 @@ export const getDefaultFinalityBucket = (
return defaultFinalityBucket[chainSlug] ?? FinalityBucket.fast;
};

export const getConfirmations = (chainSlug: ChainSlug) => {
return confirmations[chainSlug] ?? 0;
export const getReSyncInterval = (chainSlug: ChainSlug) => {
return reSyncInterval[chainSlug] ?? 0;
};
2 changes: 1 addition & 1 deletion src/socket-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ export interface ChainTxData {
export interface S3ChainConfig {
rpc: string;
blockNumber: number;
confirmations: number;
reSyncInterval: number;
siblings: ChainSlug[];
chainName: string;
eventBlockRange?: number;
Expand Down

0 comments on commit 8eb8710

Please sign in to comment.