Skip to content

Commit

Permalink
Kusama by default (#91)
Browse files Browse the repository at this point in the history
  • Loading branch information
Szegoo committed Apr 30, 2024
1 parent ac47b77 commit 48ea3d5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/contexts/network/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ const NetworkProvider = ({ children }: Props) => {
if (network === 'rococo') setActiveNetwork(NetworkType.ROCOCO);
else if (network === 'kusama') setActiveNetwork(NetworkType.KUSAMA);
else {
// invalid network param. redirect to the default chain: rococo
// invalid network param. redirect to the default chain: kusama
router.push(
{
pathname: router.pathname,
query: {
...router.query,
network: 'rococo',
network: 'kusama',
},
},
undefined,
Expand Down
6 changes: 3 additions & 3 deletions src/utils/functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export const formatBalance = (balance: string, regionXChain: boolean) => {
//
// https://github.com/paritytech/polkadot-sdk/pull/3485
export const leadinFactorAt = (network: any, when: number) => {
if (!network || network === 'rococo') return 2 - when;
if (network === 'rococo') return 2 - when;
else {
return 5 - 4 * when;
}
Expand Down Expand Up @@ -160,7 +160,7 @@ export const sendTx = (

export const getBlockTime = (network: any): number => {
// Coretime on Rococo has async backing and due to this it has a block time of 6 seconds.
const blockTime = !network || network == 'rococo' ? 6000 : 12000;
const blockTime = !network || network == 'kusama' ? 12000 : 6000;
return blockTime;
};

Expand All @@ -169,7 +169,7 @@ export const rcBlockToParachainBlock = (
blockNumber: number
): number => {
// Coretime on Rococo has async backing and due to this it has a block time of 6 seconds.
return !network || network == 'rococo'
return network == 'rococo'
? blockNumber
: Math.floor(blockNumber / 2);
};

0 comments on commit 48ea3d5

Please sign in to comment.