Bump deps (& remove unused overrides) (#5549)

This commit is contained in:
Jaco
2023-03-18 11:59:42 +02:00
committed by GitHub
parent ac8446b30c
commit cf1fabaecf
53 changed files with 138 additions and 170 deletions
+2 -4
View File
@@ -118,8 +118,7 @@ function decodeExtrinsicEra (value: IExtrinsicEra | MortalMethod | MortalEnumDef
* The ImmortalEra for an extrinsic
*/
export class ImmortalEra extends Raw {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
constructor (registry: Registry, value?: AnyU8a) {
constructor (registry: Registry, _value?: AnyU8a) {
// For immortals, we always provide the known value (i.e. treated as a
// constant no matter how it is constructed - it is a fixed structure)
super(registry, IMMORTAL_ERA);
@@ -187,8 +186,7 @@ export class MortalEra extends Tuple {
* greater than 1 << 12, then it will be a factor of the times greater than 1<<12 that
* `period` is.
*/
// eslint-disable-next-line @typescript-eslint/no-unused-vars
public override toU8a (isBare?: boolean): Uint8Array {
public override toU8a (_isBare?: boolean): Uint8Array {
const period = this.period.toNumber();
const encoded = Math.min(
15,
@@ -12,7 +12,7 @@ import { Struct } from '@polkadot/types-codec';
* A default handler for payloads where the version is not known (default throw)
*/
export class GenericExtrinsicPayloadUnknown extends Struct {
constructor (registry: Registry, value?: unknown, { version = 0 }: Partial<ExtrinsicPayloadOptions> = {}) {
constructor (registry: Registry, _value?: unknown, { version = 0 }: Partial<ExtrinsicPayloadOptions> = {}) {
super(registry, {});
throw new Error(`Unsupported extrinsic payload version ${version}`);
@@ -14,7 +14,7 @@ import { UNMASK_VERSION } from './constants.js';
* A default handler for extrinsics where the version is not known (default throw)
*/
export class GenericExtrinsicUnknown extends Struct {
constructor (registry: Registry, value?: unknown, { isSigned = false, version = 0 }: Partial<ExtrinsicOptions> = {}) {
constructor (registry: Registry, _value?: unknown, { isSigned = false, version = 0 }: Partial<ExtrinsicOptions> = {}) {
super(registry, {});
throw new Error(`Unsupported ${isSigned ? '' : 'un'}signed extrinsic version ${version & UNMASK_VERSION}`);
+2 -2
View File
@@ -137,7 +137,7 @@ export class GenericCall<A extends AnyTuple = AnyTuple> extends Struct implement
const c = registry.findMetaCall(decoded.callIndex);
method = `${c.section}.${c.method}`;
} catch (error) {
} catch {
// ignore
}
@@ -218,7 +218,7 @@ export class GenericCall<A extends AnyTuple = AnyTuple> extends Struct implement
try {
call = this.registry.findMetaCall(this.callIndex);
} catch (error) {
} catch {
// swallow
}
+1 -1
View File
@@ -24,7 +24,7 @@ function decodeU8a (registry: Registry, u8a: Uint8Array): MetadataVersioned | Ui
// when we fail on V9, try to re-parse it as v10...
try {
return new MetadataVersioned(registry, u8a);
} catch (error) {
} catch {
u8a[VERSION_IDX] = 10;
return u8a;
@@ -10,7 +10,6 @@ import { hexToU8a, lazyMethod, lazyMethods, stringCamelCase } from '@polkadot/ut
import { objectNameToCamel } from '../util.js';
/** @internal */
// eslint-disable-next-line @typescript-eslint/no-unused-vars
export function decorateConstants (registry: Registry, { pallets }: MetadataLatest, _version: number): Constants {
const result: Constants = {};
@@ -17,7 +17,6 @@ const VERSION_KEY = ':__STORAGE_VERSION__:';
const VERSION_DOCS = { docs: 'Returns the current pallet version from storage', type: 'u16' };
/** @internal */
// eslint-disable-next-line @typescript-eslint/no-unused-vars
export function decorateStorage (registry: Registry, { pallets }: MetadataLatest, _metaVersion: number): Storage {
const result: Storage = getStorage(registry);
-2
View File
@@ -174,7 +174,6 @@ function convertConstants (specs: TypeSpec[], registry: Registry, constants: Mod
* Apply module-specific type overrides (always be done as part of toV14)
* @internal
*/
// eslint-disable-next-line @typescript-eslint/no-unused-vars
function convertErrors (specs: TypeSpec[], registry: Registry, modName: Text, errors: ErrorMetadataV13[], _sectionTypes: OverrideModuleType): PalletErrorMetadataV14 {
const variants = errors.map(({ docs, name }, index): SiVariant =>
registry.createTypeUnsafe('SiVariant', [{
@@ -293,7 +292,6 @@ function convertStorage (specs: TypeSpec[], registry: Registry, { items, prefix
}
/** @internal */
// eslint-disable-next-line @typescript-eslint/no-unused-vars
function convertExtrinsic (registry: Registry, { signedExtensions, version }: ExtrinsicMetadataV13): ExtrinsicMetadataV14 {
return registry.createTypeUnsafe('ExtrinsicMetadataV14', [{
signedExtensions: signedExtensions.map((identifier) => ({
+1 -2
View File
@@ -8,7 +8,6 @@ import type { MetadataLatest, MetadataV14 } from '../../interfaces/metadata/inde
* Convert the Metadata (which is an alias) to latest
* @internal
**/
// eslint-disable-next-line @typescript-eslint/no-unused-vars
export function toLatest (registry: Registry, v14: MetadataV14, _metaVersion: number): MetadataLatest {
export function toLatest (_registry: Registry, v14: MetadataV14, _metaVersion: number): MetadataLatest {
return v14;
}
+1 -1
View File
@@ -241,7 +241,7 @@ export class StorageKey<A extends AnyTuple = AnyTuple> extends Bytes implements
try {
this.#args = decodeArgsFromMeta(this.registry, this.toU8a(true), meta);
} catch (error) {
} catch {
// ignore...
}