Identity fix. Username has been introduced in identity pallet. (#10491)
* Identity fix * Identity fix
This commit is contained in:
parent
dbdcb495bc
commit
46fa32472b
@ -1,8 +1,9 @@
|
||||
// Copyright 2017-2024 @polkadot/react-query authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { Option } from '@polkadot/types';
|
||||
import type { Bytes, Option } from '@polkadot/types';
|
||||
import type { PalletIdentityRegistration } from '@polkadot/types/lookup';
|
||||
import type { ITuple } from '@polkadot/types/types';
|
||||
import type { HexString } from '@polkadot/util/types';
|
||||
|
||||
import React, { useEffect, useState } from 'react';
|
||||
@ -34,9 +35,9 @@ const JUDGEMENT_ENUM = [
|
||||
];
|
||||
|
||||
const OPT_ID = {
|
||||
transform: (optId: Option<PalletIdentityRegistration>): HexString | null =>
|
||||
transform: (optId: Option<ITuple<[PalletIdentityRegistration, Option<Bytes>]>>): HexString | null =>
|
||||
optId.isSome
|
||||
? optId.unwrap().info.hash.toHex()
|
||||
? optId.unwrap()[0].info.hash.toHex()
|
||||
: null
|
||||
};
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user