Skip to content

Commit 87468cc

Browse files
committed
Update polkadot packages
1 parent 5cdad5c commit 87468cc

File tree

3 files changed

+274
-191
lines changed

3 files changed

+274
-191
lines changed

package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@
55
"types": "src/types.d.ts",
66
"dependencies": {
77
"@kappasigmamu/canary-component": "^0.4.7",
8-
"@polkadot/api": "^10.11.2",
9-
"@polkadot/api-derive": "^10.11.2",
10-
"@polkadot/extension-dapp": "^0.46.6",
11-
"@polkadot/extension-inject": "^0.46.6",
8+
"@polkadot/api": "^11.3.1",
9+
"@polkadot/api-derive": "^11.3.1",
10+
"@polkadot/extension-dapp": "^0.47.5",
11+
"@polkadot/extension-inject": "^0.47.5",
1212
"@polkadot/keyring": "^12.6.2",
1313
"@polkadot/networks": "^12.6.2",
14-
"@polkadot/react-identicon": "^3.6.4",
15-
"@polkadot/rpc-core": "^10.11.2",
16-
"@polkadot/types": "^10.11.2",
17-
"@polkadot/types-augment": "^10.11.2",
18-
"@polkadot/types-support": "^10.11.2",
19-
"@polkadot/ui-keyring": "^3.6.4",
20-
"@polkadot/ui-settings": "^3.6.4",
14+
"@polkadot/react-identicon": "^3.6.6",
15+
"@polkadot/rpc-core": "^11.3.1",
16+
"@polkadot/types": "^11.3.1",
17+
"@polkadot/types-augment": "^11.3.1",
18+
"@polkadot/types-support": "^11.3.1",
19+
"@polkadot/ui-keyring": "^3.6.6",
20+
"@polkadot/ui-settings": "^3.6.6",
2121
"@polkadot/util": "^12.6.2",
2222
"@polkadot/util-crypto": "^12.6.2",
2323
"@popperjs/core": "^2.11.8",
Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
11
import { ApiPromise } from '@polkadot/api'
2-
import { Data } from '@polkadot/types'
2+
// import { Data } from '@polkadot/types'
33
import { AccountId } from '@polkadot/types/interfaces'
44
import '@polkadot/api-augment/substrate'
5-
import { PalletIdentityIdentityInfo } from '@polkadot/types/lookup'
6-
import { u8aToBuffer } from '@polkadot/util'
5+
// import { PalletIdentityLegacyIdentityInfo } from '@polkadot/types/lookup'
6+
// import { u8aToBuffer } from '@polkadot/util'
77

88
export async function fetchMemberDetails(api: ApiPromise, accountId: AccountId): Promise<SocietyMemberDetails> {
99
const [accountInfo, maybeIdentity] = await Promise.all([
1010
api.derive.accounts.info(accountId),
1111
api.query.identity.identityOf(accountId)
1212
])
1313

14-
const identity = maybeIdentity.isSome ? buildAccountIdentity(maybeIdentity.unwrap().info) : undefined
14+
const identity = maybeIdentity.isSome ? undefined : undefined // temporary until we integrate people's chain
1515

1616
const rawIndex = accountInfo?.accountIndex
1717
const index = rawIndex ? api.registry.createType('AccountIndex', rawIndex.toNumber()).toString() : undefined
1818

1919
return { accountId, identity, index }
2020
}
2121

22-
function buildAccountIdentity(identityInfo: PalletIdentityIdentityInfo): AccountIdentity {
23-
return {
24-
name: decode(identityInfo.display) ?? '(Unable to get name)',
25-
email: decode(identityInfo.email),
26-
legal: decode(identityInfo.legal),
27-
riot: decode(identityInfo.riot),
28-
twitter: decode(identityInfo.twitter),
29-
webpage: decode(identityInfo.web)
30-
}
31-
}
22+
// function buildAccountIdentity(identityInfo: PalletIdentityLegacyIdentityInfo): AccountIdentity {
23+
// return {
24+
// name: decode(identityInfo.display) ?? '(Unable to get name)',
25+
// email: decode(identityInfo.email),
26+
// legal: decode(identityInfo.legal),
27+
// riot: decode(identityInfo.riot),
28+
// twitter: decode(identityInfo.twitter),
29+
// webpage: decode(identityInfo.web)
30+
// }
31+
// }
3232

33-
const decode = (data: Data) => (data.isEmpty ? undefined : u8aToBuffer(data.toU8a()).toString())
33+
// const decode = (data: Data) => (data.isEmpty ? undefined : u8aToBuffer(data.toU8a()).toString())

0 commit comments

Comments
 (0)