mirror of
https://github.com/pezkuwichain/pezkuwi-ui.git
synced 2026-06-12 07:21:03 +00:00
Bump deps (#769)
This commit is contained in:
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2023 @polkadot/ui authors & contributors
|
||||
// Copyright 2017-2023 @polkadot/ui-shared authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
module.exports = require('@polkadot/dev/config/prettier.cjs');
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2023 @polkadot/dev authors & contributors
|
||||
// Copyright 2017-2023 @polkadot/ui-shared authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import baseConfig from '@polkadot/dev/config/eslint';
|
||||
|
||||
+4
-4
@@ -33,13 +33,13 @@
|
||||
"test:one": "polkadot-dev-run-test --env browser"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/dev": "^0.75.26",
|
||||
"@polkadot/x-bundle": "^12.3.2",
|
||||
"@types/node": "^20.4.0",
|
||||
"@polkadot/dev": "^0.76.16",
|
||||
"@polkadot/x-bundle": "^12.4.1",
|
||||
"@types/node": "^20.5.0",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"react-is": "^18.2.0",
|
||||
"react-native": "^0.71.12"
|
||||
"react-native": "^0.72.4"
|
||||
},
|
||||
"resolutions": {
|
||||
"typescript": "^5.1.6"
|
||||
|
||||
@@ -21,20 +21,20 @@
|
||||
"version": "3.5.2-1-x",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@polkadot/keyring": "^12.3.2",
|
||||
"@polkadot/keyring": "^12.4.1",
|
||||
"@polkadot/ui-settings": "3.5.2-1-x",
|
||||
"@polkadot/ui-shared": "3.5.2-1-x",
|
||||
"@polkadot/util": "^12.3.2",
|
||||
"@polkadot/util-crypto": "^12.3.2",
|
||||
"@polkadot/util": "^12.4.1",
|
||||
"@polkadot/util-crypto": "^12.4.1",
|
||||
"ethereum-blockies-base64": "^1.0.2",
|
||||
"jdenticon": "3.2.0",
|
||||
"react-copy-to-clipboard": "^5.1.0",
|
||||
"styled-components": "^6.0.2",
|
||||
"tslib": "^2.6.0"
|
||||
"styled-components": "^6.0.7",
|
||||
"tslib": "^2.6.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react-copy-to-clipboard": "^5.0.4",
|
||||
"@types/react-dom": "^18.2.6",
|
||||
"@types/react-dom": "^18.2.7",
|
||||
"xmlserializer": "^0.6.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
|
||||
@@ -10,7 +10,7 @@ import { beachballIcon } from '@polkadot/ui-shared';
|
||||
function Identicon ({ address, className = '', size, style = {} }: Props): React.ReactElement<Props> {
|
||||
const updateElem = useCallback(
|
||||
(node: HTMLDivElement): void => {
|
||||
node && node.appendChild(
|
||||
node?.appendChild(
|
||||
beachballIcon(address, { isAlternative: false, size })
|
||||
);
|
||||
},
|
||||
|
||||
@@ -22,12 +22,12 @@
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@polkadot/ui-settings": "3.5.2-1-x",
|
||||
"@polkadot/util": "^12.3.2",
|
||||
"@polkadot/util-crypto": "^12.3.2",
|
||||
"@polkadot/util": "^12.4.1",
|
||||
"@polkadot/util-crypto": "^12.4.1",
|
||||
"qrcode-generator": "^1.4.4",
|
||||
"react-qr-reader": "^2.2.1",
|
||||
"styled-components": "^6.0.2",
|
||||
"tslib": "^2.6.0"
|
||||
"styled-components": "^6.0.7",
|
||||
"tslib": "^2.6.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react-qr-reader": "^2.1.4"
|
||||
|
||||
@@ -22,10 +22,10 @@
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@polkadot/ui-shared": "3.5.2-1-x",
|
||||
"@polkadot/util": "^12.3.2",
|
||||
"@polkadot/util-crypto": "^12.3.2",
|
||||
"@polkadot/util": "^12.4.1",
|
||||
"@polkadot/util-crypto": "^12.4.1",
|
||||
"react-native-svg": "^12.5.1",
|
||||
"tslib": "^2.6.0"
|
||||
"tslib": "^2.6.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react-native": "^0.72.2"
|
||||
|
||||
@@ -20,14 +20,14 @@
|
||||
"version": "3.5.2-1-x",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@polkadot/keyring": "^12.3.2",
|
||||
"@polkadot/keyring": "^12.4.1",
|
||||
"@polkadot/ui-settings": "3.5.2-1-x",
|
||||
"@polkadot/util": "^12.3.2",
|
||||
"@polkadot/util-crypto": "^12.3.2",
|
||||
"@polkadot/util": "^12.4.1",
|
||||
"@polkadot/util-crypto": "^12.4.1",
|
||||
"mkdirp": "^3.0.1",
|
||||
"rxjs": "^7.8.1",
|
||||
"store": "^2.0.12",
|
||||
"tslib": "^2.6.0"
|
||||
"tslib": "^2.6.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/mkdirp": "^2.0.0",
|
||||
|
||||
@@ -152,8 +152,14 @@ export class Keyring extends Base implements KeyringStruct {
|
||||
|
||||
return Object
|
||||
.keys(available)
|
||||
.map((address): KeyringAddress => this.getAddress(address, 'account') as KeyringAddress)
|
||||
.filter((account) => env.isDevelopment() || account.meta.isTesting !== true);
|
||||
.map((address) => this.getAddress(address, 'account'))
|
||||
.filter((account): account is KeyringAddress =>
|
||||
!!account &&
|
||||
(
|
||||
env.isDevelopment() ||
|
||||
account.meta.isTesting !== true
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
public getAddress (_address: string | Uint8Array, type: KeyringItemType | null = null): KeyringAddress | undefined {
|
||||
@@ -180,7 +186,8 @@ export class Keyring extends Base implements KeyringStruct {
|
||||
|
||||
return Object
|
||||
.keys(available)
|
||||
.map((address): KeyringAddress => this.getAddress(address) as KeyringAddress);
|
||||
.map((address) => this.getAddress(address))
|
||||
.filter((account): account is KeyringAddress => !!account);
|
||||
}
|
||||
|
||||
public getContract (address: string | Uint8Array): KeyringAddress | undefined {
|
||||
@@ -195,11 +202,12 @@ export class Keyring extends Base implements KeyringStruct {
|
||||
.filter(([, { json: { meta: { contract } } }]): boolean =>
|
||||
!!contract && contract.genesisHash === this.genesisHash
|
||||
)
|
||||
.map(([address]) => this.getContract(address) as KeyringAddress);
|
||||
.map(([address]) => this.getContract(address))
|
||||
.filter((account): account is KeyringAddress => !!account);
|
||||
}
|
||||
|
||||
private rewriteKey (json: KeyringJson, key: string, hexAddr: string, creator: (addr: string) => string): void {
|
||||
if (hexAddr.substring(0, 2) === '0x') {
|
||||
if (hexAddr.startsWith('0x')) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -252,7 +260,7 @@ export class Keyring extends Base implements KeyringStruct {
|
||||
const [, hexAddr] = key.split(':');
|
||||
|
||||
// move genesisHash to top-level (TODO Remove from contracts section?)
|
||||
json.meta.genesisHash = json.meta.genesisHash || (json.meta.contract && json.meta.contract.genesisHash);
|
||||
json.meta.genesisHash = json.meta.genesisHash || (json.meta.contract?.genesisHash);
|
||||
|
||||
this.contracts.add(this._store, address, json);
|
||||
this.rewriteKey(json, key, hexAddr, contractKey);
|
||||
@@ -269,7 +277,7 @@ export class Keyring extends Base implements KeyringStruct {
|
||||
}
|
||||
|
||||
private allowGenesis (json?: KeyringJson | { meta: KeyringJson$Meta } | null): boolean {
|
||||
if (json && json.meta && this.genesisHash) {
|
||||
if (json?.meta && this.genesisHash) {
|
||||
const hashes: (string | null | undefined)[] = Object.values(chains).find((hashes): boolean =>
|
||||
hashes.includes(this.genesisHash || '')
|
||||
) || [this.genesisHash];
|
||||
@@ -370,7 +378,7 @@ export class Keyring extends Base implements KeyringStruct {
|
||||
public saveAddress (address: string, meta: KeyringPair$Meta, type: KeyringAddressType = 'address'): KeyringPair$Json {
|
||||
const available = this.addresses.subject.getValue();
|
||||
|
||||
const json = (available[address] && available[address].json) || {
|
||||
const json = available[address]?.json || {
|
||||
address,
|
||||
meta: {
|
||||
isRecent: undefined,
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2023 @polkadot/util authors & contributors
|
||||
// Copyright 2017-2023 @polkadot/ui-keyring authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Be able to import json in TS
|
||||
|
||||
@@ -12,9 +12,7 @@ export interface SingleAddress {
|
||||
type?: KeypairType | undefined;
|
||||
}
|
||||
|
||||
export interface SubjectInfo {
|
||||
[index: string]: SingleAddress;
|
||||
}
|
||||
export type SubjectInfo = Record<string, SingleAddress>;
|
||||
|
||||
export interface AddressSubject {
|
||||
add: (store: KeyringStore, address: string, json: KeyringJson, type?: KeypairType) => SingleAddress;
|
||||
|
||||
@@ -37,7 +37,7 @@ const sortByCreated = (a: SingleAddress, b: SingleAddress): number => {
|
||||
export class KeyringOption implements KeyringOptionInstance {
|
||||
#allSub: Subscription | null = null;
|
||||
|
||||
public readonly optionsSubject: BehaviorSubject<KeyringOptions> = new BehaviorSubject(this.emptyOptions());
|
||||
public readonly optionsSubject = new BehaviorSubject<KeyringOptions>(this.emptyOptions());
|
||||
|
||||
public createOptionHeader (name: string): KeyringSectionOption {
|
||||
return {
|
||||
@@ -77,7 +77,7 @@ export class KeyringOption implements KeyringOptionInstance {
|
||||
}
|
||||
}
|
||||
|
||||
private linkItems (items: { [index: string]: KeyringSectionOptions }): KeyringSectionOptions {
|
||||
private linkItems (items: Record<string, KeyringSectionOptions>): KeyringSectionOptions {
|
||||
return Object.keys(items).reduce((result, header): KeyringSectionOptions => {
|
||||
const options = items[header];
|
||||
|
||||
|
||||
@@ -21,11 +21,11 @@
|
||||
"version": "3.5.2-1-x",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@polkadot/networks": "^12.3.2",
|
||||
"@polkadot/util": "^12.3.2",
|
||||
"@polkadot/networks": "^12.4.1",
|
||||
"@polkadot/util": "^12.4.1",
|
||||
"eventemitter3": "^5.0.1",
|
||||
"store": "^2.0.12",
|
||||
"tslib": "^2.6.0"
|
||||
"tslib": "^2.6.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/store": "^2.0.2"
|
||||
|
||||
@@ -57,7 +57,7 @@ export class Settings implements SettingsStruct {
|
||||
this.#emitter = new EventEmitter();
|
||||
|
||||
// will become deprecated for supporting substrate connect light clients. apiType structure should be used instead
|
||||
this.#apiUrl = (typeof settings.apiUrl === 'string' && settings.apiUrl) || (hasProcess && process.env && process.env['WS_URL']) || (ENDPOINT_DEFAULT.value as string);
|
||||
this.#apiUrl = (typeof settings.apiUrl === 'string' && settings.apiUrl) || (hasProcess && process.env?.['WS_URL']) || (ENDPOINT_DEFAULT.value as string);
|
||||
this.#apiType = { param: this.#apiUrl, type: 'json-rpc' as EndpointType };
|
||||
this.#camera = withDefault(CAMERA, settings.camera, CAMERA_DEFAULT);
|
||||
this.#ledgerConn = withDefault(LEDGER_CONN, settings.ledgerConn, LEDGER_CONN_DEFAULT);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Copyright 2017-2023 @polkadot/ui-settings authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
export type Option = {
|
||||
export interface Option {
|
||||
disabled?: boolean;
|
||||
info: string;
|
||||
text: string;
|
||||
|
||||
@@ -22,11 +22,11 @@
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"colord": "^2.9.3",
|
||||
"tslib": "^2.6.0"
|
||||
"tslib": "^2.6.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/util": "^12.3.2",
|
||||
"@polkadot/util-crypto": "^12.3.2",
|
||||
"@polkadot/util": "^12.4.1",
|
||||
"@polkadot/util-crypto": "^12.4.1",
|
||||
"@types/xmlserializer": "^0.6.3",
|
||||
"xmlserializer": "^0.6.1"
|
||||
},
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
// Copyright 2016 Dan Finlay
|
||||
|
||||
export function container (diameter: number, background = 'white', className = '', _style: { [index: string]: string } = {}): HTMLElement {
|
||||
export function container (diameter: number, background = 'white', className = '', _style: Record<string, string> = {}): HTMLElement {
|
||||
const element = document.createElement('div');
|
||||
const style = Object.assign({
|
||||
background,
|
||||
|
||||
@@ -12,7 +12,7 @@ import { container as newContainer } from './container.js';
|
||||
import { SHAPE_COUNT } from './defaults.js';
|
||||
import { seeder as newSeeder } from './seeder.js';
|
||||
|
||||
export function beachballIcon (seed: string | Uint8Array, { size = 256 }: Options, className = '', style?: { [index: string]: string }): HTMLElement {
|
||||
export function beachballIcon (seed: string | Uint8Array, { size = 256 }: Options, className = '', style?: Record<string, string>): HTMLElement {
|
||||
const seeder = newSeeder(seed);
|
||||
const colorGen = colors(seeder);
|
||||
const outer = newContainer(size, 'white', className, style);
|
||||
|
||||
@@ -3,6 +3,4 @@
|
||||
|
||||
export type Seeder = () => number;
|
||||
|
||||
export interface ColorGen {
|
||||
(alpha?: number): string;
|
||||
}
|
||||
export type ColorGen = (alpha?: number) => string;
|
||||
|
||||
@@ -22,10 +22,10 @@
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@polkadot/ui-shared": "3.5.2-1-x",
|
||||
"@polkadot/util": "^12.3.2",
|
||||
"@polkadot/util-crypto": "^12.3.2",
|
||||
"@polkadot/util": "^12.4.1",
|
||||
"@polkadot/util-crypto": "^12.4.1",
|
||||
"jdenticon": "3.2.0",
|
||||
"tslib": "^2.6.0"
|
||||
"tslib": "^2.6.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"vue": "^2.7.14"
|
||||
|
||||
@@ -7,7 +7,7 @@ import { defineComponent, h } from 'vue';
|
||||
|
||||
import { beachballIcon } from '@polkadot/ui-shared';
|
||||
|
||||
type PropsType = {
|
||||
interface PropsType {
|
||||
address: string;
|
||||
size: number;
|
||||
isAlternative: boolean;
|
||||
|
||||
@@ -6,7 +6,7 @@ import type { VNode } from 'vue';
|
||||
import * as jdenticon from 'jdenticon';
|
||||
import { defineComponent, h } from 'vue';
|
||||
|
||||
type PropsType = {
|
||||
interface PropsType {
|
||||
publicKey: string,
|
||||
size: number
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ import { polkadotIcon } from '@polkadot/ui-shared';
|
||||
|
||||
import { adaptVNodeAttrs } from '../util.js';
|
||||
|
||||
type propsType = {
|
||||
interface propsType {
|
||||
address: string;
|
||||
isAlternative: boolean;
|
||||
size: number;
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2023 @polkadot/ui authors & contributors
|
||||
// Copyright 2017-2023 @polkadot/ui-shared authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import path from 'path';
|
||||
|
||||
Reference in New Issue
Block a user