@@ -34,7 +34,7 @@ function retrieveNick (api: DeriveApi, accountId?: AccountId): Observable<string
|
||||
export function info (instanceId: string, api: DeriveApi): (address?: AccountIndex | AccountId | Address | Uint8Array | string | null) => Observable<DeriveAccountInfo> {
|
||||
return memo(instanceId, (address?: AccountIndex | AccountId | Address | Uint8Array | string | null): Observable<DeriveAccountInfo> =>
|
||||
api.derive.accounts.idAndIndex(address).pipe(
|
||||
switchMap(([accountId, accountIndex]): Observable<[Partial<DeriveAccountInfo>, DeriveAccountRegistration, string?]> =>
|
||||
switchMap(([accountId, accountIndex]): Observable<[Partial<DeriveAccountInfo>, DeriveAccountRegistration, string | undefined]> =>
|
||||
combineLatest([
|
||||
of({ accountId, accountIndex }),
|
||||
api.derive.accounts.identity(accountId),
|
||||
|
||||
@@ -3,22 +3,22 @@
|
||||
|
||||
import type { AccountId, AccountIndex, RegistrationJudgement } from '@polkadot/types/interfaces';
|
||||
|
||||
export type AccountIdAndIndex = [AccountId?, AccountIndex?];
|
||||
export type AccountIdAndIndex = [AccountId | undefined, AccountIndex | undefined];
|
||||
|
||||
export type AccountIndexes = Record<string, AccountIndex>;
|
||||
|
||||
export interface DeriveAccountRegistration {
|
||||
display?: string;
|
||||
displayParent?: string;
|
||||
email?: string;
|
||||
image?: string;
|
||||
legal?: string;
|
||||
other?: Record<string, string>;
|
||||
parent?: AccountId;
|
||||
pgp?: string;
|
||||
riot?: string;
|
||||
twitter?: string;
|
||||
web?: string;
|
||||
display?: string | undefined;
|
||||
displayParent?: string | undefined;
|
||||
email?: string | undefined;
|
||||
image?: string | undefined;
|
||||
legal?: string | undefined;
|
||||
other?: Record<string, string> | undefined;
|
||||
parent?: AccountId | undefined;
|
||||
pgp?: string | undefined;
|
||||
riot?: string | undefined;
|
||||
twitter?: string | undefined;
|
||||
web?: string | undefined;
|
||||
judgements: RegistrationJudgement[];
|
||||
}
|
||||
|
||||
@@ -30,14 +30,14 @@ export interface DeriveAccountFlags {
|
||||
}
|
||||
|
||||
export interface DeriveAccountInfo {
|
||||
accountId?: AccountId;
|
||||
accountIndex?: AccountIndex;
|
||||
accountId?: AccountId | undefined;
|
||||
accountIndex?: AccountIndex | undefined;
|
||||
identity: DeriveAccountRegistration;
|
||||
nickname?: string;
|
||||
nickname?: string | undefined;
|
||||
}
|
||||
|
||||
export interface DeriveHasIdentity {
|
||||
display?: string;
|
||||
display?: string | undefined;
|
||||
hasIdentity: boolean;
|
||||
parentId?: string;
|
||||
parentId?: string | undefined;
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ export interface DeriveDemocracyLock {
|
||||
|
||||
export interface DeriveProposalImage extends AtBlock {
|
||||
balance: Balance;
|
||||
proposal?: Call;
|
||||
proposal?: Call | undefined;
|
||||
proposalHash?: HexString;
|
||||
proposalLen?: number;
|
||||
proposer: AccountId;
|
||||
@@ -32,27 +32,27 @@ export interface DeriveProposalImage extends AtBlock {
|
||||
export interface DeriveDispatch extends AtBlock {
|
||||
index: ReferendumIndex;
|
||||
imageHash: HexString;
|
||||
image?: DeriveProposalImage;
|
||||
image?: DeriveProposalImage | undefined;
|
||||
}
|
||||
|
||||
export interface DeriveProposal {
|
||||
balance?: Balance;
|
||||
index: PropIndex;
|
||||
image?: DeriveProposalImage;
|
||||
image?: DeriveProposalImage | undefined;
|
||||
imageHash: Hash;
|
||||
proposer: AccountId;
|
||||
seconds: Vec<AccountId>;
|
||||
}
|
||||
|
||||
export interface DeriveProposalExternal {
|
||||
image?: DeriveProposalImage;
|
||||
image?: DeriveProposalImage | undefined;
|
||||
imageHash: HexString;
|
||||
threshold: PalletDemocracyVoteThreshold;
|
||||
}
|
||||
|
||||
export interface DeriveReferendum {
|
||||
index: ReferendumIndex;
|
||||
image?: DeriveProposalImage;
|
||||
image?: DeriveProposalImage | undefined;
|
||||
imageHash: HexString;
|
||||
status: PalletDemocracyReferendumStatus | ReferendumInfoTo239;
|
||||
}
|
||||
|
||||
@@ -7,10 +7,10 @@ import type { PalletSocietyBid, PalletSocietyBidKind, PalletSocietyVote, PalletS
|
||||
|
||||
export interface DeriveSociety {
|
||||
bids: PalletSocietyBid[];
|
||||
defender?: AccountId;
|
||||
defender?: AccountId | undefined;
|
||||
hasDefender: boolean;
|
||||
head?: AccountId;
|
||||
founder?: AccountId;
|
||||
head?: AccountId | undefined;
|
||||
founder?: AccountId | undefined;
|
||||
maxMembers: u32;
|
||||
pot: BalanceOf;
|
||||
}
|
||||
@@ -28,6 +28,6 @@ export interface DeriveSocietyMember {
|
||||
isSuspended: boolean;
|
||||
payouts: [BlockNumber, Balance][];
|
||||
strikes: StrikeCount;
|
||||
vote?: PalletSocietyVote;
|
||||
vouching?: PalletSocietyVouchingStatus;
|
||||
vote?: PalletSocietyVote | undefined;
|
||||
vouching?: PalletSocietyVouchingStatus | undefined;
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ export function createHeaderExtended (registry: Registry, header?: Header, valid
|
||||
const HeaderBase = registry.createClass('Header');
|
||||
|
||||
class Implementation extends HeaderBase implements HeaderExtended {
|
||||
readonly #author?: AccountId;
|
||||
readonly #author?: AccountId | undefined;
|
||||
|
||||
constructor (registry: Registry, header?: Header, validators?: AccountId[] | null, author?: AccountId | null) {
|
||||
super(registry, header);
|
||||
|
||||
@@ -36,7 +36,7 @@ export function createSignedBlockExtended (registry: Registry, block?: SignedBlo
|
||||
const SignedBlockBase = registry.createClass('SignedBlock');
|
||||
|
||||
class Implementation extends SignedBlockBase implements SignedBlockExtended {
|
||||
readonly #author?: AccountId;
|
||||
readonly #author?: AccountId | undefined;
|
||||
readonly #events: EventRecord[];
|
||||
readonly #extrinsics: TxWithEvent[];
|
||||
|
||||
|
||||
@@ -14,8 +14,8 @@ export interface SignedBlockExtended extends SignedBlock {
|
||||
}
|
||||
|
||||
export interface TxWithEvent {
|
||||
dispatchError?: DispatchError;
|
||||
dispatchInfo?: DispatchInfo;
|
||||
dispatchError?: DispatchError | undefined;
|
||||
dispatchInfo?: DispatchInfo | undefined;
|
||||
events: Event[];
|
||||
extrinsic: Extrinsic;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user