Identity fix. Username has been introduced in identity pallet. (#10491)

* Identity fix

* Identity fix
This commit is contained in:
Nikhil Ranjan 2024-04-22 18:20:48 +04:00 committed by GitHub
parent dbdcb495bc
commit 46fa32472b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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
};