Skip to content

Commit

Permalink
types are fubar again >_<
Browse files Browse the repository at this point in the history
  • Loading branch information
grumpygreenguy committed Aug 14, 2023
1 parent 4468925 commit 3df1a3d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
3 changes: 2 additions & 1 deletion tee-worker/ts-tests/integration-tests/batch.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import { generateWeb3Wallets, assertIdentityLinked, assertIdentityDeactivated }
import { ethers } from 'ethers';
import type { LitentryPrimitivesIdentity } from 'sidechain-api';
import type { LitentryValidationData, Web3Network } from 'parachain-api';
import { Vec } from '@polkadot/types';

describeLitentry('Test Batch Utility', 0, (context) => {
let identities: LitentryPrimitivesIdentity[] = [];
Expand Down Expand Up @@ -57,7 +58,7 @@ describeLitentry('Test Batch Utility', 0, (context) => {
const signer = ethereumSigners[index];
const ethereumIdentity = await buildIdentityHelper(signer.address, 'Evm', context);
identities.push(ethereumIdentity);
we3networks.push(defaultNetworks);
we3networks.push(defaultNetworks as unknown as Vec<Web3Network>); // @fixme #1878
signerIdentities.push(aliceSubject);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ export async function createSignedTrustedGetterIdGraph(
signer,
subject.toHuman()
);
return parachainApi.createType('Getter', { trusted: getterSigned }) as unknown as Getter;
return parachainApi.createType('Getter', { trusted: getterSigned }) as unknown as Getter; // @fixme 1878;
}

export const getSidechainNonce = async (
Expand All @@ -287,7 +287,7 @@ export const getSidechainNonce = async (
subject: LitentryPrimitivesIdentity
): Promise<Index> => {
const getterPublic = createPublicGetter(parachainApi, ['nonce', '(LitentryIdentity)'], subject.toHuman());
const getter = parachainApi.createType('Getter', { public: getterPublic });
const getter = parachainApi.createType('Getter', { public: getterPublic }) as unknown as Getter; // @fixme 1878
const nonce = await sendRequestFromGetter(wsp, parachainApi, mrenclave, teeShieldingKey, getter);
const nonceValue = decodeNonce(nonce.value.toHex());
return parachainApi.createType('Index', nonceValue) as Index;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ describe('Test Identity (direct invocation)', function () {
twitterNonce,
'twitter'
);
const twitterNetworks = context.api.createType('Vec<Web3Network>', []);
const twitterNetworks = context.api.createType('Vec<Web3Network>', []) as unknown as Vec<Web3Network>; // @fixme #1878
linkIdentityRequestParams.push({
nonce: twitterNonce,
identity: twitterIdentity,
Expand All @@ -266,7 +266,10 @@ describe('Test Identity (direct invocation)', function () {
undefined,
[context.ethersWallet.alice]
);
const evmNetworks = context.api.createType('Vec<Web3Network>', ['Ethereum', 'Bsc']);
const evmNetworks = context.api.createType('Vec<Web3Network>', [
'Ethereum',
'Bsc',
]) as unknown as Vec<Web3Network>; // @fixme #1878
linkIdentityRequestParams.push({
nonce: evmNonce,
identity: evmIdentity,
Expand All @@ -288,7 +291,10 @@ describe('Test Identity (direct invocation)', function () {
'substrate',
context.substrateWallet.eve
);
const eveSubstrateNetworks = context.api.createType('Vec<Web3Network>', ['Polkadot', 'Litentry']);
const eveSubstrateNetworks = context.api.createType('Vec<Web3Network>', [
'Polkadot',
'Litentry',
]) as unknown as Vec<Web3Network>; // @fixme #1878
linkIdentityRequestParams.push({
nonce: eveSubstrateNonce,
identity: eveSubstrateIdentity,
Expand Down

0 comments on commit 3df1a3d

Please sign in to comment.