Bump dev deps (#9199)

This commit is contained in:
Jaco 2023-03-18 13:04:20 +02:00 committed by GitHub
parent c82ac0579d
commit c069df72c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
48 changed files with 131 additions and 135 deletions

View File

@ -69,7 +69,7 @@
"devDependencies": { "devDependencies": {
"@crustio/crust-pin": "^1.0.0", "@crustio/crust-pin": "^1.0.0",
"@pinata/sdk": "^2.1.0", "@pinata/sdk": "^2.1.0",
"@polkadot/dev": "^0.72.9", "@polkadot/dev": "^0.72.15",
"@types/chart.js": "^2.9.37", "@types/chart.js": "^2.9.37",
"@types/file-saver": "^2.0.5", "@types/file-saver": "^2.0.5",
"@types/react-beautiful-dnd": "^13.1.3", "@types/react-beautiful-dnd": "^13.1.3",
@ -82,7 +82,7 @@
"concurrently": "^7.6.0", "concurrently": "^7.6.0",
"devtron": "^1.4.0", "devtron": "^1.4.0",
"dnslink-cloudflare": "^3.0.0", "dnslink-cloudflare": "^3.0.0",
"electron": "^23.1.3", "electron": "^23.1.4",
"electron-builder": "23.6.0", "electron-builder": "23.6.0",
"electron-builder-notarize": "^1.5.1", "electron-builder-notarize": "^1.5.1",
"i18next-scanner": "^4.1.1", "i18next-scanner": "^4.1.1",

View File

@ -95,7 +95,7 @@ const signedBalancePredicate = (raw: Codec): raw is SignedBalance =>
); );
export const createCustomAccount = <A = string>(currency: string, currencyToAsset: (curr: string, api?: ApiInterfaceRx) => A, accountDataType = 'AccountData'): export const createCustomAccount = <A = string>(currency: string, currencyToAsset: (curr: string, api?: ApiInterfaceRx) => A, accountDataType = 'AccountData'):
(instanceId: string, api: ApiInterfaceRx) => RxResult<(arg: string | Uint8Array | AccountId) => Observable<AccountData>> => (instanceId: string, api: ApiInterfaceRx) => { (instanceId: string, api: ApiInterfaceRx) => RxResult<(arg: string | Uint8Array | AccountId) => Observable<AccountData>> => (_instanceId: string, api: ApiInterfaceRx) => {
const registry = api.registry; const registry = api.registry;
const transform = <SB extends Enum>(balance: SB): AccountData => { const transform = <SB extends Enum>(balance: SB): AccountData => {

View File

@ -15,7 +15,7 @@
"sideEffects": false, "sideEffects": false,
"version": "0.124.2-169-x", "version": "0.124.2-169-x",
"dependencies": { "dependencies": {
"@polkadot/dev": "^0.72.9", "@polkadot/dev": "^0.72.15",
"@polkadot/react-components": "^0.124.2-169-x", "@polkadot/react-components": "^0.124.2-169-x",
"electron-log": "^5.0.0-beta.16", "electron-log": "^5.0.0-beta.16",
"electron-updater": "^5.3.0" "electron-updater": "^5.3.0"

View File

@ -3,7 +3,6 @@
import { HeadersReceivedResponse, session } from 'electron'; import { HeadersReceivedResponse, session } from 'electron';
// eslint-disable-next-line @typescript-eslint/no-unused-vars
export function setupContentSecurityPolicy (_: string): void { export function setupContentSecurityPolicy (_: string): void {
session.defaultSession.webRequest.onHeadersReceived((details, respond: (response: HeadersReceivedResponse) => void) => { session.defaultSession.webRequest.onHeadersReceived((details, respond: (response: HeadersReceivedResponse) => void) => {
respond({ respond({

View File

@ -40,7 +40,7 @@ export const accountStoreIpcHandler = (fileStore: FileStore): IpcMainHandler =>
'account-store-get': async (key: string) => new Promise((resolve) => { 'account-store-get': async (key: string) => new Promise((resolve) => {
try { try {
fileStore.get(safeWriteKey(key), resolve); fileStore.get(safeWriteKey(key), resolve);
} catch (err) { } catch {
resolve(null); resolve(null);
} }
}), }),

View File

@ -12,7 +12,7 @@ function needsApiCheck (api: ApiPromise): boolean {
try { try {
// needs storageDepositLimit // needs storageDepositLimit
return assertReturn(api.tx.contracts.instantiateWithCode.meta.args.length === 6, 'Invalid args'); return assertReturn(api.tx.contracts.instantiateWithCode.meta.args.length === 6, 'Invalid args');
} catch (error) { } catch {
console.warn('Contract interface does not support storageDepositLimit, disabling route'); console.warn('Contract interface does not support storageDepositLimit, disabling route');
return false; return false;

View File

@ -13,7 +13,7 @@ function needsApiCheck (api: ApiPromise): boolean {
api.tx.democracy.vote(1, { Standard: { balance: 1, vote: { aye: true, conviction: 1 } } }); api.tx.democracy.vote(1, { Standard: { balance: 1, vote: { aye: true, conviction: 1 } } });
return true; return true;
} catch (error) { } catch {
console.warn('Unable to create referendum vote transaction, disabling democracy route'); console.warn('Unable to create referendum vote transaction, disabling democracy route');
return false; return false;

View File

@ -18,7 +18,7 @@
"dependencies": { "dependencies": {
"@polkadot/apps-config": "^0.124.2-169-x", "@polkadot/apps-config": "^0.124.2-169-x",
"@polkadot/apps-routing": "^0.124.2-169-x", "@polkadot/apps-routing": "^0.124.2-169-x",
"@polkadot/dev": "^0.72.9", "@polkadot/dev": "^0.72.15",
"@polkadot/react-api": "^0.124.2-169-x", "@polkadot/react-api": "^0.124.2-169-x",
"@polkadot/react-components": "^0.124.2-169-x", "@polkadot/react-components": "^0.124.2-169-x",
"@polkadot/react-hooks": "^0.124.2-169-x", "@polkadot/react-hooks": "^0.124.2-169-x",
@ -38,7 +38,7 @@
"empty": "^0.10.1", "empty": "^0.10.1",
"html-webpack-plugin": "^5.5.0", "html-webpack-plugin": "^5.5.0",
"https-browserify": "^1.0.0", "https-browserify": "^1.0.0",
"mini-css-extract-plugin": "^2.7.3", "mini-css-extract-plugin": "^2.7.5",
"os-browserify": "^0.3.0", "os-browserify": "^0.3.0",
"path-browserify": "^1.0.1", "path-browserify": "^1.0.1",
"process": "^0.11.10", "process": "^0.11.10",

View File

@ -14,7 +14,7 @@ function hasEndpoint (api: ApiPromise, endpoint: string, needsApiInstances: bool
return area === 'consts' return area === 'consts'
? isObject((api as unknown as ApiMapper)[area][section][method]) ? isObject((api as unknown as ApiMapper)[area][section][method])
: isFunction((api as unknown as ApiMapper)[area][section][method]); : isFunction((api as unknown as ApiMapper)[area][section][method]);
} catch (error) { } catch {
return false; return false;
} }
} }

View File

@ -41,7 +41,7 @@ function SidebarEditableSection ({ accountIndex, address, isBeingEdited, onUpdat
setTags(accountOrAddress?.meta.tags ? (accountOrAddress.meta.tags as string[]).sort() : []); setTags(accountOrAddress?.meta.tags ? (accountOrAddress.meta.tags as string[]).sort() : []);
setIsEditingName(false); setIsEditingName(false);
setIsEditingTags(false); setIsEditingTags(false);
} catch (error) { } catch {
// ignore // ignore
} }
} }

View File

@ -65,7 +65,7 @@ function ChangePass ({ address, className = '', onClose }: Props): React.ReactEl
} }
account.decodePkcs8(oldPass); account.decodePkcs8(oldPass);
} catch (error) { } catch {
setOldPass((state: OldPass) => ({ ...state, isOldValid: false })); setOldPass((state: OldPass) => ({ ...state, isOldValid: false }));
setIsBusy(false); setIsBusy(false);
@ -74,7 +74,7 @@ function ChangePass ({ address, className = '', onClose }: Props): React.ReactEl
try { try {
keyring.encryptAccount(account, newPass1.password); keyring.encryptAccount(account, newPass1.password);
} catch (error) { } catch {
setNewPass2((state: NewPass) => ({ ...state, isValid: false })); setNewPass2((state: NewPass) => ({ ...state, isValid: false }));
setIsBusy(false); setIsBusy(false);

View File

@ -21,6 +21,6 @@
}, },
"devDependencies": { "devDependencies": {
"@testing-library/react": "^14.0.0", "@testing-library/react": "^14.0.0",
"testcontainers": "^9.1.3" "testcontainers": "^9.2.1"
} }
} }

View File

@ -68,7 +68,7 @@ function Create ({ onClose, onStatusChange }: Props): React.ReactElement<Props>
setName({ isNameValid: !!(newName || '').trim(), name: newName }); setName({ isNameValid: !!(newName || '').trim(), name: newName });
} }
} }
} catch (error) { } catch {
isAddressValid = false; isAddressValid = false;
} }

View File

@ -54,7 +54,7 @@ function Call ({ className = '', contract, messageIndex, onCallResult, onChangeM
value && message.isMutating && setExecTx((): SubmittableExtrinsic<'promise'> | null => { value && message.isMutating && setExecTx((): SubmittableExtrinsic<'promise'> | null => {
try { try {
return contract.tx[message.method]({ gasLimit: weight.weight, storageDepositLimit: null, value: message.isPayable ? value : 0 }, ...params); return contract.tx[message.method]({ gasLimit: weight.weight, storageDepositLimit: null, value: message.isPayable ? value : 0 }, ...params);
} catch (error) { } catch {
return null; return null;
} }
}); });

View File

@ -86,7 +86,7 @@ function Deploy ({ codeHash, constructorIndex = 0, onClose, setConstructorIndex
storageDepositLimit: null, storageDepositLimit: null,
value: contractAbi?.constructors[constructorIndex].isPayable ? value : undefined value: contractAbi?.constructors[constructorIndex].isPayable ? value : undefined
}, ...params); }, ...params);
} catch (error) { } catch {
return null; return null;
} }
} }

View File

@ -28,7 +28,7 @@ function ValidateAddr ({ address, onChange }: Props): React.ReactElement<Props>
try { try {
keyring.decodeAddress(address || ''); keyring.decodeAddress(address || '');
setIsAddress(true); setIsAddress(true);
} catch (error) { } catch {
setIsAddress(false); setIsAddress(false);
} }
}, [address]); }, [address]);

View File

@ -83,8 +83,7 @@ function Messages ({ className = '', contract, contractAbi: { constructors, info
}, [_onRefresh, contract, isUpdating, optInfo, trigger]); }, [_onRefresh, contract, isUpdating, optInfo, trigger]);
const _setMessageResult = useCallback( const _setMessageResult = useCallback(
// eslint-disable-next-line @typescript-eslint/no-unused-vars (_messageIndex: number, _result?: ContractCallOutcome): void => {
(messageIndex: number, result?: ContractCallOutcome): void => {
// ignore // ignore
}, },
[] []

View File

@ -25,7 +25,7 @@ async function retrieveInfo (api: ApiPromise): Promise<Partial<Info>> {
]); ]);
return { blockNumber, extrinsics, health, peers }; return { blockNumber, extrinsics, health, peers };
} catch (error) { } catch {
return {}; return {};
} }
} }

View File

@ -194,7 +194,7 @@ function CrustFiles ({ className }: Props): React.ReactElement<Props> {
wFiles.setFiles([...fitter, ...filterOld]); wFiles.setFiles([...fitter, ...filterOld]);
_onImportResult(t<string>('Import Success'), 'success'); _onImportResult(t<string>('Import Success'), 'success');
}; };
} catch (e) { } catch {
_onImportResult(t<string>('file content error'), 'error'); _onImportResult(t<string>('file content error'), 'error');
} }
}, [wFiles, _onImportResult, t]); }, [wFiles, _onImportResult, t]);

View File

@ -137,7 +137,6 @@ function doDownload (strings: Strings, withEmpty: boolean): void {
); );
} }
// eslint-disable-next-line @typescript-eslint/no-unused-vars
function progressDisplay ([done, total, _]: [number, number, number] = [0, 0, 0]): { done: number; progress: string; total: number } { function progressDisplay ([done, total, _]: [number, number, number] = [0, 0, 0]): { done: number; progress: string; total: number } {
return { return {
done, done,

View File

@ -118,19 +118,18 @@ async function getExtensionInfo (api: ApiPromise, extension: InjectedExtension):
saveProperties(api, extension); saveProperties(api, extension);
triggerAll(); triggerAll();
} }
} catch (error) { } catch {
// ignore // ignore
} }
return isOk; return isOk;
} }
}; };
} catch (error) { } catch {
return null; return null;
} }
} }
// eslint-disable-next-line @typescript-eslint/no-unused-vars
async function getKnown (api: ApiPromise, extensions: InjectedExtension[], _: number): Promise<ExtensionKnown[]> { async function getKnown (api: ApiPromise, extensions: InjectedExtension[], _: number): Promise<ExtensionKnown[]> {
const all = await Promise.all( const all = await Promise.all(
extensions.map((extension) => getExtensionInfo(api, extension)) extensions.map((extension) => getExtensionInfo(api, extension))

View File

@ -55,7 +55,7 @@ function InjectKeys ({ onClose }: Props): React.ReactElement<Props> | null {
assert(mnemonicValidate(phrase), 'Invalid mnemonic phrase'); assert(mnemonicValidate(phrase), 'Invalid mnemonic phrase');
setPublicKey(u8aToHex(keyring.createFromUri(suri, {}, crypto).publicKey)); setPublicKey(u8aToHex(keyring.createFromUri(suri, {}, crypto).publicKey));
} catch (error) { } catch {
setPublicKey(EMPTY_KEY); setPublicKey(EMPTY_KEY);
} }
}, [crypto, suri]); }, [crypto, suri]);

View File

@ -26,7 +26,7 @@ interface Entry {
stashInfo: ListNode | null; stashInfo: ListNode | null;
} }
function findEntry (upper: BN, bagLower: BN, stashId: string, list: ListNode[] = []): Entry { function findEntry (_upper: BN, _bagLower: BN, stashId: string, list: ListNode[] = []): Entry {
const stashInfo = list.find((o) => o.stashId === stashId) || null; const stashInfo = list.find((o) => o.stashId === stashId) || null;
const other = (stashInfo && stashInfo.jump && list.find((o) => o.stashId === stashInfo.jump)) || null; const other = (stashInfo && stashInfo.jump && list.find((o) => o.stashId === stashInfo.jump)) || null;

View File

@ -246,8 +246,8 @@ export default function withCall<P extends ApiProps> (endpoint: string, { at, at
: await apiMethod(...params) : await apiMethod(...params)
); );
} }
} catch (error) { } catch {
// console.warn(endpoint, '::', error); // ignore
} }
} }
@ -274,8 +274,8 @@ export default function withCall<P extends ApiProps> (endpoint: string, { at, at
callUpdated: true, callUpdated: true,
callUpdatedAt: Date.now() callUpdatedAt: Date.now()
}); });
} catch (error) { } catch {
// console.warn(endpoint, '::', (error as Error).message); // ignore
} }
} }

View File

@ -1,7 +1,6 @@
// Copyright 2017-2023 @polkadot/react-api authors & contributors // Copyright 2017-2023 @polkadot/react-api authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
// eslint-disable-next-line @typescript-eslint/no-unused-vars export default function echoTransform <T> (x: T, _index: number): T {
export default function echoTransform <T> (x: T, index: number): T {
return x; return x;
} }

View File

@ -4,7 +4,6 @@
import type { Hash } from '@polkadot/types/interfaces'; import type { Hash } from '@polkadot/types/interfaces';
import type { Codec } from '@polkadot/types/types'; import type { Codec } from '@polkadot/types/types';
// eslint-disable-next-line @typescript-eslint/no-unused-vars
type AtQuery <I extends unknown[]> = (hash: string | Uint8Array, ...params: I) => Promise<Codec>; type AtQuery <I extends unknown[]> = (hash: string | Uint8Array, ...params: I) => Promise<Codec>;
export default async function getHistoric <T extends Codec, I extends unknown[] = unknown[]> (atQuery: AtQuery<I>, params: I, hashes: Hash[]): Promise<[Hash, T][]> { export default async function getHistoric <T extends Codec, I extends unknown[] = unknown[]> (atQuery: AtQuery<I>, params: I, hashes: Hash[]): Promise<[Hash, T][]> {

View File

@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/react-api authors & contributors // Copyright 2017-2023 @polkadot/react-api authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
function flatten (key: string | null, value?: unknown): unknown { function flatten (_key: string | null, value?: unknown): unknown {
return !value return !value
? value ? value
: (value as Record<string, unknown>).$$typeof : (value as Record<string, unknown>).$$typeof

View File

@ -30,10 +30,10 @@
"@polkadot/util-crypto": "^11.0.2", "@polkadot/util-crypto": "^11.0.2",
"@types/chartjs-plugin-crosshair": "^1.1.1", "@types/chartjs-plugin-crosshair": "^1.1.1",
"chart.js": "^4.2.1", "chart.js": "^4.2.1",
"chartjs-plugin-annotation": "^2.2.0", "chartjs-plugin-annotation": "^2.2.1",
"chartjs-plugin-crosshair": "^1.2.0", "chartjs-plugin-crosshair": "^1.2.0",
"codeflask": "^1.4.1", "codeflask": "^1.4.1",
"i18next": "^22.4.11", "i18next": "^22.4.12",
"i18next-browser-languagedetector": "^7.0.1", "i18next-browser-languagedetector": "^7.0.1",
"owasp-password-strength-test": "^1.3.0", "owasp-password-strength-test": "^1.3.0",
"react": "^18.2.0", "react": "^18.2.0",

View File

@ -104,7 +104,7 @@ function lookupLock (lookup: Record<string, string>, lockId: Raw): string {
try { try {
return lookup[lockHex] || lockHex; return lookup[lockHex] || lockHex;
} catch (error) { } catch {
return lockHex; return lockHex;
} }
} }

View File

@ -61,7 +61,7 @@ const MULTI_DEFAULT: string[] = [];
function transformToAddress (value?: string | Uint8Array | null): string | null { function transformToAddress (value?: string | Uint8Array | null): string | null {
try { try {
return toAddress(value, false, keyring.keyring.type === 'ethereum' ? 20 : 32) || null; return toAddress(value, false, keyring.keyring.type === 'ethereum' ? 20 : 32) || null;
} catch (error) { } catch {
// noop, handled by return // noop, handled by return
} }
@ -144,7 +144,7 @@ class InputAddress extends React.PureComponent<Props, State> {
? value.map((v) => toAddress(v)) ? value.map((v) => toAddress(v))
: (toAddress(value) || undefined) : (toAddress(value) || undefined)
}; };
} catch (error) { } catch {
return null; return null;
} }
} }

View File

@ -43,7 +43,7 @@ export function extractInitial (api: ApiPromise, initialValue: SubmittableExtrin
} }
: { initialValue: (input.value as SubmittableExtrinsicFunction<'promise'>) } : { initialValue: (input.value as SubmittableExtrinsicFunction<'promise'>) }
: { initialValue }; : { initialValue };
} catch (error) { } catch {
return { initialValue }; return { initialValue };
} }
} }

View File

@ -87,7 +87,7 @@ export function getDispatchError (dispatchError: DispatchError): string {
const error = dispatchError.registry.findMetaError(mod); const error = dispatchError.registry.findMetaError(mod);
message = `${error.section}.${error.name}`; message = `${error.section}.${error.name}`;
} catch (error) { } catch {
// swallow // swallow
} }
} else if (dispatchError.isToken) { } else if (dispatchError.isToken) {

View File

@ -3,7 +3,6 @@
import type { ThemeDef } from '@polkadot/react-hooks/ctx/types'; import type { ThemeDef } from '@polkadot/react-hooks/ctx/types';
// eslint-disable-next-line @typescript-eslint/no-unused-vars
export default (_theme: ThemeDef): string => ` export default (_theme: ThemeDef): string => `
.ui--output { .ui--output {
background: var(--bg-input); background: var(--bg-input);

View File

@ -3,7 +3,6 @@
import type { ThemeDef } from '@polkadot/react-hooks/ctx/types'; import type { ThemeDef } from '@polkadot/react-hooks/ctx/types';
// eslint-disable-next-line @typescript-eslint/no-unused-vars
export default (_theme: ThemeDef): string => ` export default (_theme: ThemeDef): string => `
.ui.hidden.divider { .ui.hidden.divider {
margin: 0.5rem 0; margin: 0.5rem 0;

View File

@ -12,7 +12,7 @@ export function getAddressMeta (address: string, type: KeyringItemType | null =
const pair = keyring.getAddress(address, type); const pair = keyring.getAddress(address, type);
meta = pair && pair.meta; meta = pair && pair.meta;
} catch (error) { } catch {
// we could pass invalid addresses, so it may throw // we could pass invalid addresses, so it may throw
} }

View File

@ -23,8 +23,8 @@ export function toAddress (value?: string | Uint8Array | null, allowIndices = fa
} else { } else {
return keyring.encodeAddress(u8a); return keyring.encodeAddress(u8a);
} }
} catch (error) { } catch {
// noop, undefined return indicates invalid/transient // undefined return below indicates invalid/transient
} }
} }

View File

@ -138,7 +138,7 @@ function useAccountInfoImpl (value: string | null, isContract = false): UseAccou
setMeta(accountOrAddress?.meta); setMeta(accountOrAddress?.meta);
setName(accountOrAddress?.meta.name || ''); setName(accountOrAddress?.meta.name || '');
setSortedTags(accountOrAddress?.meta.tags ? (accountOrAddress.meta.tags as string[]).sort() : []); setSortedTags(accountOrAddress?.meta.tags ? (accountOrAddress.meta.tags as string[]).sort() : []);
} catch (error) { } catch {
// ignore // ignore
} }
} }
@ -167,7 +167,7 @@ function useAccountInfoImpl (value: string | null, isContract = false): UseAccou
const pair = keyring.getPair(value); const pair = keyring.getPair(value);
pair && keyring.saveAccountMeta(pair, meta); pair && keyring.saveAccountMeta(pair, meta);
} catch (error) { } catch {
const pair = keyring.getAddress(value); const pair = keyring.getAddress(value);
if (pair) { if (pair) {
@ -200,7 +200,7 @@ function useAccountInfoImpl (value: string | null, isContract = false): UseAccou
const currentKeyring = keyring.getPair(value); const currentKeyring = keyring.getPair(value);
currentKeyring && keyring.saveAccountMeta(currentKeyring, meta); currentKeyring && keyring.saveAccountMeta(currentKeyring, meta);
} catch (error) { } catch {
keyring.saveAddress(value, meta); keyring.saveAddress(value, meta);
} }
} }

View File

@ -16,7 +16,7 @@ import Bare from './Bare.js';
function getBitLength (registry: Registry, { type }: TypeDef): BitLength { function getBitLength (registry: Registry, { type }: TypeDef): BitLength {
try { try {
return registry.createType(type as 'u32').bitLength() as BitLength; return registry.createType(type as 'u32').bitLength() as BitLength;
} catch (error) { } catch {
return 32; return 32;
} }
} }

View File

@ -49,7 +49,7 @@ function convertInput (value: string): [boolean, boolean, Uint8Array] {
} else if (value.startsWith('0x')) { } else if (value.startsWith('0x')) {
try { try {
return [true, false, hexToU8a(value)]; return [true, false, hexToU8a(value)];
} catch (error) { } catch {
return [false, false, new Uint8Array([])]; return [false, false, new Uint8Array([])];
} }
} }
@ -57,7 +57,7 @@ function convertInput (value: string): [boolean, boolean, Uint8Array] {
// maybe it is an ss58? // maybe it is an ss58?
try { try {
return [true, true, decodeAddress(value)]; return [true, true, decodeAddress(value)];
} catch (error) { } catch {
// we continue // we continue
} }

View File

@ -17,13 +17,9 @@ interface Props extends BaseProps {
function isValidAddress (value: string | null | undefined, isEthereum: boolean): boolean { function isValidAddress (value: string | null | undefined, isEthereum: boolean): boolean {
if (value) { if (value) {
try { try {
if (isEthereum) { return isEthereum
return isEthereumAddress(value); ? isEthereumAddress(value)
} else { : validateAddress(value);
return validateAddress(value);
}
return true;
} catch (err) { } catch (err) {
console.error(err); console.error(err);
} }

View File

@ -24,7 +24,7 @@ export function createParam (hex: string | String, ignoreLength = false): StateP
u8a = hexToU8a(hex.toString()); u8a = hexToU8a(hex.toString());
isValid = ignoreLength || u8a.length !== 0; isValid = ignoreLength || u8a.length !== 0;
} catch (error) { } catch {
u8a = new Uint8Array([]); u8a = new Uint8Array([]);
} }

View File

@ -14,7 +14,7 @@ function expandDef (registry: Registry, td: TypeDef): TypeDef {
return getTypeDef( return getTypeDef(
registry.createType(td.type as 'u32').toRawType() registry.createType(td.type as 'u32').toRawType()
); );
} catch (e) { } catch {
return td; return td;
} }
} }

View File

@ -58,7 +58,7 @@ function findCall (tx: Call | SubmittableExtrinsic<'promise'>): { method: string
const { method, section } = tx.registry.findMetaCall(tx.callIndex); const { method, section } = tx.registry.findMetaCall(tx.callIndex);
return { method, section }; return { method, section };
} catch (error) { } catch {
return { method: 'unknown', section: 'unknown' }; return { method: 'unknown', section: 'unknown' };
} }
} }

View File

@ -23,7 +23,7 @@ interface Props {
function getPair (address: string): KeyringPair | null { function getPair (address: string): KeyringPair | null {
try { try {
return keyring.getPair(address); return keyring.getPair(address);
} catch (error) { } catch {
return null; return null;
} }
} }

View File

@ -20,7 +20,7 @@ export default class ApiSigner implements Signer {
public async signPayload (payload: SignerPayloadJSON): Promise<SignerResult> { public async signPayload (payload: SignerPayloadJSON): Promise<SignerResult> {
return new Promise((resolve, reject): void => { return new Promise((resolve, reject): void => {
this.#queuePayload(this.#registry, payload, (id: number, result: SignerResult | null): void => { this.#queuePayload(this.#registry, payload, (_id: number, result: SignerResult | null): void => {
if (result) { if (result) {
resolve(result); resolve(result);
} else { } else {

View File

@ -17,7 +17,7 @@
"version": "0.124.2-169-x", "version": "0.124.2-169-x",
"dependencies": { "dependencies": {
"@testing-library/react": "^14.0.0", "@testing-library/react": "^14.0.0",
"testcontainers": "^9.1.3" "testcontainers": "^9.2.1"
}, },
"devDependencies": { "devDependencies": {
"@polkadot/types-support": "^10.1.3", "@polkadot/types-support": "^10.1.3",

View File

@ -116,7 +116,6 @@
"@polkadot/test-support/types": ["test-support/src/types.ts"], "@polkadot/test-support/types": ["test-support/src/types.ts"],
"@polkadot/test-support/transaction": ["test-support/src/transaction/index.ts"], "@polkadot/test-support/transaction": ["test-support/src/transaction/index.ts"],
"@polkadot/test-support/utils": ["test-support/src/utils/index.ts"] "@polkadot/test-support/utils": ["test-support/src/utils/index.ts"]
}, }
"skipLibCheck": true
} }
} }

139
yarn.lock
View File

@ -1378,7 +1378,7 @@ __metadata:
"@polkadot/react-components": ^0.124.2-169-x "@polkadot/react-components": ^0.124.2-169-x
"@testing-library/react": ^14.0.0 "@testing-library/react": ^14.0.0
file-saver: ^2.0.5 file-saver: ^2.0.5
testcontainers: ^9.1.3 testcontainers: ^9.2.1
languageName: unknown languageName: unknown
linkType: soft linkType: soft
@ -1722,7 +1722,7 @@ __metadata:
version: 0.0.0-use.local version: 0.0.0-use.local
resolution: "@polkadot/apps-electron@workspace:packages/apps-electron" resolution: "@polkadot/apps-electron@workspace:packages/apps-electron"
dependencies: dependencies:
"@polkadot/dev": ^0.72.9 "@polkadot/dev": ^0.72.15
"@polkadot/react-components": ^0.124.2-169-x "@polkadot/react-components": ^0.124.2-169-x
"@types/react-dom": ^18.0.11 "@types/react-dom": ^18.0.11
"@types/tmp": ^0.2.3 "@types/tmp": ^0.2.3
@ -1748,7 +1748,7 @@ __metadata:
dependencies: dependencies:
"@polkadot/apps-config": ^0.124.2-169-x "@polkadot/apps-config": ^0.124.2-169-x
"@polkadot/apps-routing": ^0.124.2-169-x "@polkadot/apps-routing": ^0.124.2-169-x
"@polkadot/dev": ^0.72.9 "@polkadot/dev": ^0.72.15
"@polkadot/react-api": ^0.124.2-169-x "@polkadot/react-api": ^0.124.2-169-x
"@polkadot/react-components": ^0.124.2-169-x "@polkadot/react-components": ^0.124.2-169-x
"@polkadot/react-hooks": ^0.124.2-169-x "@polkadot/react-hooks": ^0.124.2-169-x
@ -1764,7 +1764,7 @@ __metadata:
empty: ^0.10.1 empty: ^0.10.1
html-webpack-plugin: ^5.5.0 html-webpack-plugin: ^5.5.0
https-browserify: ^1.0.0 https-browserify: ^1.0.0
mini-css-extract-plugin: ^2.7.3 mini-css-extract-plugin: ^2.7.5
os-browserify: ^0.3.0 os-browserify: ^0.3.0
path-browserify: ^1.0.1 path-browserify: ^1.0.1
process: ^0.11.10 process: ^0.11.10
@ -1776,34 +1776,34 @@ __metadata:
languageName: unknown languageName: unknown
linkType: soft linkType: soft
"@polkadot/dev-test@npm:^0.72.9": "@polkadot/dev-test@npm:^0.72.15":
version: 0.72.9 version: 0.72.15
resolution: "@polkadot/dev-test@npm:0.72.9" resolution: "@polkadot/dev-test@npm:0.72.15"
dependencies: dependencies:
jsdom: ^21.1.1 jsdom: ^21.1.1
tslib: ^2.5.0 tslib: ^2.5.0
checksum: 8bbd4d5417cdc6ed1ca65af5bc8ec5ff6b26f172e02392cf627efc5093a49e9b6cb58f534fed9c8a997d07d69f1173b382f80210ff0bd4cfb8cbc9306e78180d checksum: 827bc33d30dd305cc4e43f3e87aa8aad66d928d5692d9ec2df6f4490ee955cec7780a4e06d70631c7626f81f960b591e5bcd208e144cc8ecb7f60853a8878343
languageName: node languageName: node
linkType: hard linkType: hard
"@polkadot/dev-ts@npm:^0.72.9": "@polkadot/dev-ts@npm:^0.72.15":
version: 0.72.9 version: 0.72.15
resolution: "@polkadot/dev-ts@npm:0.72.9" resolution: "@polkadot/dev-ts@npm:0.72.15"
dependencies: dependencies:
json5: ^2.2.3 json5: ^2.2.3
tslib: ^2.5.0 tslib: ^2.5.0
typescript: ^5.0.2 typescript: ^5.0.2
checksum: 40756eb32e7e72bd16a1d009ac9e11a0fe513df696ff90552af2ac2cea81d60b084015300d39e85e3006678533779ac03b174623f39f745a1b767cf08167ee49 checksum: 9ac0a59b3d7790ee747e6575e2c83a1c97c0aca9573a22c0423c3fdf33f2b61caf03561fe011756deb86a759540826cbbac718bc192298f22149479604bc5b54
languageName: node languageName: node
linkType: hard linkType: hard
"@polkadot/dev@npm:^0.72.9": "@polkadot/dev@npm:^0.72.15":
version: 0.72.9 version: 0.72.15
resolution: "@polkadot/dev@npm:0.72.9" resolution: "@polkadot/dev@npm:0.72.15"
dependencies: dependencies:
"@eslint/js": ^8.36.0 "@eslint/js": ^8.36.0
"@polkadot/dev-test": ^0.72.9 "@polkadot/dev-test": ^0.72.15
"@polkadot/dev-ts": ^0.72.9 "@polkadot/dev-ts": ^0.72.15
"@rollup/plugin-alias": ^4.0.3 "@rollup/plugin-alias": ^4.0.3
"@rollup/plugin-commonjs": ^24.0.1 "@rollup/plugin-commonjs": ^24.0.1
"@rollup/plugin-dynamic-import-vars": ^2.0.3 "@rollup/plugin-dynamic-import-vars": ^2.0.3
@ -1837,7 +1837,7 @@ __metadata:
typescript: ^5.0.2 typescript: ^5.0.2
webpack: ^5.76.2 webpack: ^5.76.2
webpack-cli: ^5.0.1 webpack-cli: ^5.0.1
webpack-dev-server: ^4.12.0 webpack-dev-server: ^4.13.0
webpack-merge: ^5.8.0 webpack-merge: ^5.8.0
webpack-subresource-integrity: ^5.2.0-rc.1 webpack-subresource-integrity: ^5.2.0-rc.1
yargs: ^17.7.1 yargs: ^17.7.1
@ -1865,7 +1865,7 @@ __metadata:
polkadot-exec-rollup: scripts/polkadot-exec-rollup.mjs polkadot-exec-rollup: scripts/polkadot-exec-rollup.mjs
polkadot-exec-tsc: scripts/polkadot-exec-tsc.mjs polkadot-exec-tsc: scripts/polkadot-exec-tsc.mjs
polkadot-exec-webpack: scripts/polkadot-exec-webpack.mjs polkadot-exec-webpack: scripts/polkadot-exec-webpack.mjs
checksum: da6e188058e31d8eb11e8547a4e75ae391b6620ce102f9c640c3acf70173c0d8b9f1e5ee0028858e37600575500d753436b5fd583493a14bedabb27f258f692d checksum: 03ea1b1b886783a2cdaf978c8e51b2ef6f75ddd7e91b4d72dffc2d0efbf7f5c15ed9bb63fc331bbef93ff9df9bb280a3b74c5f1030ce7c6e3dd94be613c270ed
languageName: node languageName: node
linkType: hard linkType: hard
@ -2017,10 +2017,10 @@ __metadata:
"@types/codeflask": ^1.4.3 "@types/codeflask": ^1.4.3
"@types/owasp-password-strength-test": ^1.3.0 "@types/owasp-password-strength-test": ^1.3.0
chart.js: ^4.2.1 chart.js: ^4.2.1
chartjs-plugin-annotation: ^2.2.0 chartjs-plugin-annotation: ^2.2.1
chartjs-plugin-crosshair: ^1.2.0 chartjs-plugin-crosshair: ^1.2.0
codeflask: ^1.4.1 codeflask: ^1.4.1
i18next: ^22.4.11 i18next: ^22.4.12
i18next-browser-languagedetector: ^7.0.1 i18next-browser-languagedetector: ^7.0.1
owasp-password-strength-test: ^1.3.0 owasp-password-strength-test: ^1.3.0
react: ^18.2.0 react: ^18.2.0
@ -2182,7 +2182,7 @@ __metadata:
"@polkadot/types-support": ^10.1.3 "@polkadot/types-support": ^10.1.3
"@testing-library/jest-dom": ^5.16.5 "@testing-library/jest-dom": ^5.16.5
"@testing-library/react": ^14.0.0 "@testing-library/react": ^14.0.0
testcontainers: ^9.1.3 testcontainers: ^9.2.1
tsconfig-paths: ^4.1.2 tsconfig-paths: ^4.1.2
languageName: unknown languageName: unknown
linkType: soft linkType: soft
@ -2842,12 +2842,12 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"@types/archiver@npm:^5.3.1": "@types/archiver@npm:^5.3.2":
version: 5.3.1 version: 5.3.2
resolution: "@types/archiver@npm:5.3.1" resolution: "@types/archiver@npm:5.3.2"
dependencies: dependencies:
"@types/glob": "*" "@types/readdir-glob": "*"
checksum: 1c6babc7f50acf5bf7fa3d5fa76bb68702e4463e6a412d259cdddff611dbbb9832ea4b2f41d675fd95ac1aa8b087daa882423073e41db9e296f14d41f2ea88e6 checksum: 9db5b4fdc1740fa07d08340ed827598cc6eda97406ac18a06a158670c7124d4120650a3b9cd660e9e39b42f033cf8f052566da32681e8ad91163473df88a3c4c
languageName: node languageName: node
linkType: hard linkType: hard
@ -2963,13 +2963,13 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"@types/dockerode@npm:^3.3.14": "@types/dockerode@npm:^3.3.15":
version: 3.3.14 version: 3.3.15
resolution: "@types/dockerode@npm:3.3.14" resolution: "@types/dockerode@npm:3.3.15"
dependencies: dependencies:
"@types/docker-modem": "*" "@types/docker-modem": "*"
"@types/node": "*" "@types/node": "*"
checksum: 6a8472622861fb0c97908963a8236d6e439c9feefc845b866326272ad0e5c33f537206fb4633424c5e3c8ec63559cb14bc737e2f88f0fcdf11496a9162d5b139 checksum: b8fa13f86c761175a5813eb41fbd1e46d0646f008e5c84738b51c1aa82ce4f3758502efe8c3c583463e7cb7dc77e2faadfff91f4e6274e844e68a0ebf9deeae5
languageName: node languageName: node
linkType: hard linkType: hard
@ -3046,7 +3046,7 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"@types/glob@npm:*, @types/glob@npm:^7.1.1": "@types/glob@npm:^7.1.1":
version: 7.1.3 version: 7.1.3
resolution: "@types/glob@npm:7.1.3" resolution: "@types/glob@npm:7.1.3"
dependencies: dependencies:
@ -3381,6 +3381,15 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"@types/readdir-glob@npm:*":
version: 1.1.1
resolution: "@types/readdir-glob@npm:1.1.1"
dependencies:
"@types/node": "*"
checksum: cc888be86e729c1e2f799a926c091b464d58016aaee69e08b58878668ec0137e985236775a3eaac14273554bf45c7da92fe19b900370f8d02f47a32709000ba8
languageName: node
linkType: hard
"@types/resolve@npm:1.20.2": "@types/resolve@npm:1.20.2":
version: 1.20.2 version: 1.20.2
resolution: "@types/resolve@npm:1.20.2" resolution: "@types/resolve@npm:1.20.2"
@ -5625,12 +5634,12 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"chartjs-plugin-annotation@npm:^2.2.0": "chartjs-plugin-annotation@npm:^2.2.1":
version: 2.2.0 version: 2.2.1
resolution: "chartjs-plugin-annotation@npm:2.2.0" resolution: "chartjs-plugin-annotation@npm:2.2.1"
peerDependencies: peerDependencies:
chart.js: ">=3.7.0" chart.js: ">=3.7.0"
checksum: 355456597b8dc7ceb7198658f6f3045116b828e5e66c557823961863cb20cd7c7af67f3645832f3e27e008b728fe158761bc8116f2ee86c2043bf31be6774cbb checksum: 443582b13779105c8f147638253e56e30d72c4cf28abab2da30a9f2637ccb068f5fade81ec6a9d78c03d10722107057ab9cc93042bb3951da63bc3edf79322a3
languageName: node languageName: node
linkType: hard linkType: hard
@ -7177,14 +7186,14 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"dockerode@npm:^3.3.4": "dockerode@npm:^3.3.5":
version: 3.3.4 version: 3.3.5
resolution: "dockerode@npm:3.3.4" resolution: "dockerode@npm:3.3.5"
dependencies: dependencies:
"@balena/dockerignore": ^1.0.2 "@balena/dockerignore": ^1.0.2
docker-modem: ^3.0.0 docker-modem: ^3.0.0
tar-fs: ~2.0.1 tar-fs: ~2.0.1
checksum: 6cb4b9d1c42feb3acfa77daf103b070cc412351dc7dc0a1553cc774ccd1be1a1412a87f8aa13c3155c63ec5c61a7cadc833b4248c4d8342814bbf708f795b952 checksum: 7f6650422b07fa7ea9d5801f04b1a432634446b5fe37b995b8302b953b64e93abf1bb4596c2fb574ba47aafee685ef2ab959cc86c9654add5a26d09541bbbcc6
languageName: node languageName: node
linkType: hard linkType: hard
@ -7512,16 +7521,16 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"electron@npm:^23.1.3": "electron@npm:^23.1.4":
version: 23.1.3 version: 23.1.4
resolution: "electron@npm:23.1.3" resolution: "electron@npm:23.1.4"
dependencies: dependencies:
"@electron/get": ^2.0.0 "@electron/get": ^2.0.0
"@types/node": ^16.11.26 "@types/node": ^16.11.26
extract-zip: ^2.0.1 extract-zip: ^2.0.1
bin: bin:
electron: cli.js electron: cli.js
checksum: 091a7acd2379c8b8e9df76244ca2e0f5f2aa9e4a94da9c08f56fdc4762f27f5fd7f3505a027c00601f64c5beeb27e5c707a2061ff37654ded55e21cedeb0b926 checksum: 42e167d5ae4e60b9a2bab191321645cb76b901d3c88dc7ae1551ecad2946aa4ebef9e49c347ca3db76032d84802d878a64a1123111579a270e3b8406c5a18b16
languageName: node languageName: node
linkType: hard linkType: hard
@ -10196,12 +10205,12 @@ fsevents@~2.3.2:
languageName: node languageName: node
linkType: hard linkType: hard
"i18next@npm:*, i18next@npm:^22.4.11": "i18next@npm:*, i18next@npm:^22.4.12":
version: 22.4.11 version: 22.4.12
resolution: "i18next@npm:22.4.11" resolution: "i18next@npm:22.4.12"
dependencies: dependencies:
"@babel/runtime": ^7.20.6 "@babel/runtime": ^7.20.6
checksum: 7f68c6801eb1eff240953066841d507cb00ce3eb6e2a8a6446f9a16453aab168352a36fdfe62c88e04795b1bc0a47439b2d463ed67e1c6bf19e0fb3a57fa457a checksum: 78e8c74f8686cd7c44cac206bf9006314db742a1717cff962db7fea24c87766a3edaa3cb7584b59d7eb275e2f7cae15068e76495ca5c803f152b2434a2af3832
languageName: node languageName: node
linkType: hard linkType: hard
@ -12317,14 +12326,14 @@ fsevents@~2.3.2:
languageName: node languageName: node
linkType: hard linkType: hard
"mini-css-extract-plugin@npm:^2.7.3": "mini-css-extract-plugin@npm:^2.7.5":
version: 2.7.3 version: 2.7.5
resolution: "mini-css-extract-plugin@npm:2.7.3" resolution: "mini-css-extract-plugin@npm:2.7.5"
dependencies: dependencies:
schema-utils: ^4.0.0 schema-utils: ^4.0.0
peerDependencies: peerDependencies:
webpack: ^5.0.0 webpack: ^5.0.0
checksum: 9f3a25c1298280d40e56552e5cfd7f84fea25ddd8530bd8ecfd6b08caffe59a1c55c020f1f3c8beb7c04f5e92ce71ed43a52a72deed5570c686316348f13b6f4 checksum: afc37cdfb765e8826a1babbab3cd8a99ffc4eaeabb6c013a6b3c80801e44ebc37d930b98c6f66168bb8cd545fcb2e8fc2630d72b4501a1bb8add1547c2534a53
languageName: node languageName: node
linkType: hard linkType: hard
@ -13715,7 +13724,7 @@ fsevents@~2.3.2:
dependencies: dependencies:
"@crustio/crust-pin": ^1.0.0 "@crustio/crust-pin": ^1.0.0
"@pinata/sdk": ^2.1.0 "@pinata/sdk": ^2.1.0
"@polkadot/dev": ^0.72.9 "@polkadot/dev": ^0.72.15
"@types/chart.js": ^2.9.37 "@types/chart.js": ^2.9.37
"@types/file-saver": ^2.0.5 "@types/file-saver": ^2.0.5
"@types/react-beautiful-dnd": ^13.1.3 "@types/react-beautiful-dnd": ^13.1.3
@ -13728,7 +13737,7 @@ fsevents@~2.3.2:
concurrently: ^7.6.0 concurrently: ^7.6.0
devtron: ^1.4.0 devtron: ^1.4.0
dnslink-cloudflare: ^3.0.0 dnslink-cloudflare: ^3.0.0
electron: ^23.1.3 electron: ^23.1.4
electron-builder: 23.6.0 electron-builder: 23.6.0
electron-builder-notarize: ^1.5.1 electron-builder-notarize: ^1.5.1
i18next-scanner: ^4.1.1 i18next-scanner: ^4.1.1
@ -16600,25 +16609,25 @@ fsevents@~2.3.2:
languageName: node languageName: node
linkType: hard linkType: hard
"testcontainers@npm:^9.1.3": "testcontainers@npm:^9.2.1":
version: 9.1.3 version: 9.2.1
resolution: "testcontainers@npm:9.1.3" resolution: "testcontainers@npm:9.2.1"
dependencies: dependencies:
"@balena/dockerignore": ^1.0.2 "@balena/dockerignore": ^1.0.2
"@types/archiver": ^5.3.1 "@types/archiver": ^5.3.2
"@types/dockerode": ^3.3.14 "@types/dockerode": ^3.3.15
archiver: ^5.3.1 archiver: ^5.3.1
async-lock: ^1.4.0 async-lock: ^1.4.0
byline: ^5.0.0 byline: ^5.0.0
debug: ^4.3.4 debug: ^4.3.4
docker-compose: ^0.23.19 docker-compose: ^0.23.19
dockerode: ^3.3.4 dockerode: ^3.3.5
get-port: ^5.1.1 get-port: ^5.1.1
node-fetch: ^2.6.9 node-fetch: ^2.6.9
properties-reader: ^2.2.0 properties-reader: ^2.2.0
ssh-remote-port-forward: ^1.0.4 ssh-remote-port-forward: ^1.0.4
tar-fs: ^2.1.1 tar-fs: ^2.1.1
checksum: e2834f9990190cd96c059a98b623a807066ac98781ffd1b78670e82b3a89b7cfd78728caa82091fba01c4083d5495e43309ff58b24668cde8a3ff447af87b8ad checksum: a94d985463cbf3e415503c2eaa7547bb353fb602398dfa5042f32711e828e9f6bf26a2396e31709513a28d2981374368a59a9eb0063b3e89106c83553385e594
languageName: node languageName: node
linkType: hard linkType: hard
@ -18070,9 +18079,9 @@ fsevents@~2.3.2:
languageName: node languageName: node
linkType: hard linkType: hard
"webpack-dev-server@npm:^4.12.0": "webpack-dev-server@npm:^4.13.0":
version: 4.12.0 version: 4.13.0
resolution: "webpack-dev-server@npm:4.12.0" resolution: "webpack-dev-server@npm:4.13.0"
dependencies: dependencies:
"@types/bonjour": ^3.5.9 "@types/bonjour": ^3.5.9
"@types/connect-history-api-fallback": ^1.3.5 "@types/connect-history-api-fallback": ^1.3.5
@ -18111,7 +18120,7 @@ fsevents@~2.3.2:
optional: true optional: true
bin: bin:
webpack-dev-server: bin/webpack-dev-server.js webpack-dev-server: bin/webpack-dev-server.js
checksum: 3e33acb774457ee787038d66c12e04c3e4a9f91bbff7ca143083e4ac1937b1615a1b9e7387ec623df8ebc36f56b3c34742578c09f665fe811b6e38d2e8222a94 checksum: 7546dd3b5a05f886209caf3c06265c717dea292e5a1a8e392bb8f1c9c58c7f87cc03daa0b92fa6eb56812c8c88304044bef923642e18c54b0a17ea233c02fdf4
languageName: node languageName: node
linkType: hard linkType: hard