mirror of
https://github.com/pezkuwichain/pezkuwi-apps.git
synced 2026-11-25 23:29:54 +00:00
Move to @pezkuwi/dev 0.86.4 (eslint 10 toolchain)
- dev ^0.86.4 at the root and in packages/apps; directives renamed by pezkuwi-dev-migrate-eslint10. - eslint --fix with the 0.86.4 config; one fix broke syntax (typescript-eslint prefer-optional-chain turned `(isStarted && onStart) && onStart()` into `(isStarted && onStart?.();` in TxButton) and is corrected by hand. - The remaining findings fixed rather than disabled: optional chains (each suggestion reviewed), `cause` on rethrown errors, `if` instead of `a && promise` in effects, parallel instead of sequential awaits in Promise.all, Error rejections, no `delete` on arrays (the storage query cache is a Map; an upload's file list no longer keeps a hole), no `[object Object]` stringification (TFunction's second argument is text or options), dead code removed (referenda's never-shown expand button, react-query's unused CoreDescriptor).
This commit is contained in:
1 parent
c800e9affb
commit
45d479d2ec
325 files changed
+2942
-3531
No files matched your search
@@ -1,29 +0,0 @@
|
||||
// Copyright 2017-2026 @pezkuwi/react-query authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { PezkuwiRuntimeTeyrchainsAssignerCoretimeCoreDescriptor } from '@pezkuwi/types/lookup';
|
||||
|
||||
import React from 'react';
|
||||
|
||||
import { useApi, useCall } from '@pezkuwi/react-hooks';
|
||||
|
||||
interface Props {
|
||||
children?: React.ReactNode;
|
||||
className?: string;
|
||||
query: string;
|
||||
}
|
||||
|
||||
function BrokerStatus ({ children, className = '', query }: Props): React.ReactElement<Props> {
|
||||
const { api } = useApi();
|
||||
const status = useCall<PezkuwiRuntimeTeyrchainsAssignerCoretimeCoreDescriptor>(api.query.broker?.status);
|
||||
const strStatus = status === undefined ? '' : status.toJSON()[query];
|
||||
|
||||
return (
|
||||
<div className={className}>
|
||||
{strStatus?.toString()}
|
||||
{children}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default React.memo(BrokerStatus);
|
||||
@@ -32,7 +32,7 @@ interface Props {
|
||||
const M_LENGTH = 6 + 1;
|
||||
const K_LENGTH = 3 + 1;
|
||||
|
||||
type LabelPost = string | React.ReactNode
|
||||
type LabelPost = string | React.ReactNode;
|
||||
|
||||
function getFormat (registry: Registry, formatIndex = 0): [number, string] {
|
||||
const decimals = registry.chainDecimals;
|
||||
|
||||
Reference in new issue
Block a user