diff --git a/packages/apps-config/src/api/constants.ts b/packages/apps-config/src/api/constants.ts index d67cb3b12bed..897cd4812855 100644 --- a/packages/apps-config/src/api/constants.ts +++ b/packages/apps-config/src/api/constants.ts @@ -37,4 +37,4 @@ export const CERE_NETWORK_GENESIS = '0x81443836a9a24caaa23f1241897d1235717535711 export const CERE_NETWORK_TESTNET_GENESIS = '0x42b9b44b4950b6c1edae543a7696caf8d0a160e9bc0424ab4ab217f7a8ba30dc'; -export const KATE_NETWORK_TESTNET_GENESIS = '0xd12003ac837853b062aaccca5ce87ac4838c48447e41db4a3dcfb5bf312350c6' +export const KATE_NETWORK_TESTNET_GENESIS = '0xd12003ac837853b062aaccca5ce87ac4838c48447e41db4a3dcfb5bf312350c6'; diff --git a/packages/apps-config/src/api/params/inflation.ts b/packages/apps-config/src/api/params/inflation.ts index b4a0fa9b97ec..bccddf74fb3c 100644 --- a/packages/apps-config/src/api/params/inflation.ts +++ b/packages/apps-config/src/api/params/inflation.ts @@ -28,7 +28,7 @@ const DEFAULT_PARAMS: InflationParams = { }; const CERE_NETWORK_INFLATION_PARAMS = { ...DEFAULT_PARAMS, maxInflation: 0.05, minInflation: 0.0001, stakeTarget: 0.2 }; -const AVAIL_NETWORK_INFLATION_PARAMS = { ...DEFAULT_PARAMS, minInflation: 0.01, maxInflation: 0.05 } +const AVAIL_NETWORK_INFLATION_PARAMS = { ...DEFAULT_PARAMS, maxInflation: 0.05, minInflation: 0.01 }; const KNOWN_PARAMS: Record = { [CERE_NETWORK_GENESIS]: CERE_NETWORK_INFLATION_PARAMS, @@ -38,13 +38,13 @@ const KNOWN_PARAMS: Record = { // https://github.com/paritytech/polkadot/blob/816cb64ea16102c6c79f6be2a917d832d98df757/runtime/kusama/src/lib.rs#L526-L527 // 75% ideal target, see // https://github.com/paritytech/polkadot/blob/816cb64ea16102c6c79f6be2a917d832d98df757/runtime/kusama/src/lib.rs#L529-L531 + [KATE_NETWORK_TESTNET_GENESIS]: AVAIL_NETWORK_INFLATION_PARAMS, [KUSAMA_GENESIS]: { ...DEFAULT_PARAMS, auctionAdjust: (0.3 / 60), auctionMax: 60, stakeTarget: 0.75 }, [NEATCOIN_GENESIS]: { ...DEFAULT_PARAMS, stakeTarget: 0.75 }, [NFTMART_GENESIS]: { ...DEFAULT_PARAMS, falloff: 0.04, stakeTarget: 0.60 }, - [POLKADOT_GENESIS]: { ...DEFAULT_PARAMS, stakeTarget: 0.75 }, - [KATE_NETWORK_TESTNET_GENESIS]: AVAIL_NETWORK_INFLATION_PARAMS + [POLKADOT_GENESIS]: { ...DEFAULT_PARAMS, stakeTarget: 0.75 } }; -export function getInflationParams(api: ApiPromise): InflationParams { +export function getInflationParams (api: ApiPromise): InflationParams { return KNOWN_PARAMS[api.genesisHash.toHex()] || DEFAULT_PARAMS; } diff --git a/packages/apps-config/src/api/spec/dataavail.ts b/packages/apps-config/src/api/spec/dataavail.ts index 3e3a672cf8c1..cfe4324f58d3 100644 --- a/packages/apps-config/src/api/spec/dataavail.ts +++ b/packages/apps-config/src/api/spec/dataavail.ts @@ -85,12 +85,12 @@ const definitions: OverrideBundleDefinition = { KateCommitment: { rows: 'Compact', cols: 'Compact', - dataRoot: 'H256', - commitment: 'Vec' + commitment: 'Vec', + dataRoot: 'H256' }, V1HeaderExtension: { - commitment: 'KateCommitment', - appLookup: 'DataLookup' + appLookup: 'DataLookup', + commitment: 'KateCommitment' }, VTHeaderExtension: { newField: 'Vec', diff --git a/packages/apps-config/src/api/typesBundle.ts b/packages/apps-config/src/api/typesBundle.ts index 42aa828fbe73..8b42e6dfdd25 100644 --- a/packages/apps-config/src/api/typesBundle.ts +++ b/packages/apps-config/src/api/typesBundle.ts @@ -49674,17 +49674,12 @@ export const typesBundle = { "KateCommitment": { "rows": "Compact", "cols": "Compact", - "dataRoot": "H256", - "commitment": "Vec" + "commitment": "Vec", + "dataRoot": "H256" }, "V1HeaderExtension": { - "commitment": "KateCommitment", - "appLookup": "DataLookup" - }, - "VTHeaderExtension": { - "newField": "Vec", - "commitment": "KateCommitment", - "appLookup": "DataLookup" + "appLookup": "DataLookup", + "commitment": "KateCommitment" }, "HeaderExtension": { "_enum": { diff --git a/packages/page-settings/src/useExtensions.ts b/packages/page-settings/src/useExtensions.ts index a3959d8ac3dc..172a01e1aead 100644 --- a/packages/page-settings/src/useExtensions.ts +++ b/packages/page-settings/src/useExtensions.ts @@ -117,10 +117,11 @@ async function getExtensionInfo (api: ApiPromise, extension: InjectedExtension): try { isOk = await metadata.provide(def); const hasLoadedUserExtensions = !!def.userExtensions; - const maybeSpec = await api.query.system.lastRuntimeUpgrade() - let spec = 0 + const maybeSpec = await api.query.system.lastRuntimeUpgrade(); + let spec = 0; + if (maybeSpec.isSome) { - spec = maybeSpec.unwrap().specVersion.toNumber() + spec = maybeSpec.unwrap().specVersion.toNumber(); } if (isOk) {