Skip to content

Commit 19145ac

Browse files
committed
format code
1 parent c541348 commit 19145ac

File tree

1 file changed

+12
-18
lines changed

1 file changed

+12
-18
lines changed

tee-worker/ts-tests/identity.test.ts

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
1-
import {
2-
describeLitentry,
3-
encryptWithTeeShieldingKey,
4-
generateVerificationMessage,
5-
listenEvent,
6-
sendTxUntilInBlock,
7-
checkFailReason,
8-
} from './utils';
1+
import { describeLitentry, encryptWithTeeShieldingKey, generateVerificationMessage, listenEvent, sendTxUntilInBlock, checkFailReason } from './utils';
92
import { hexToU8a, u8aConcat, u8aToHex, u8aToU8a, stringToU8a } from '@polkadot/util';
103
import {
114
setUserShieldingKey,
@@ -298,11 +291,9 @@ describeLitentry('Test Identity', (context) => {
298291
assertIdentityRemoved(context.defaultSigner[1], substrate_extension_identity_removed);
299292
});
300293

301-
step('remove prime identity NOT allowed', async function () {
302-
// create substrate identity
303-
const [resp_substrate] = (await createIdentities(context, context.defaultSigner[0], aesKey, true, [
304-
substrateIdentity,
305-
])) as IdentityGenericEvent[];
294+
step('remove prime identity NOT allowed', async function () {
295+
// create substrate identity
296+
const [resp_substrate] = (await createIdentities(context, context.defaultSigner[0], aesKey, true, [substrateIdentity])) as IdentityGenericEvent[];
306297
assertIdentityCreated(context.defaultSigner[0], resp_substrate);
307298

308299
if (resp_substrate) {
@@ -322,9 +313,13 @@ describeLitentry('Test Identity', (context) => {
322313
}
323314

324315
// remove substrate identity
325-
const [substrate_identity_removed] = (await removeIdentities(context, context.defaultSigner[0], aesKey, true, [
326-
substrateIdentity,
327-
])) as IdentityGenericEvent[];
316+
const [substrate_identity_removed] = (await removeIdentities(
317+
context,
318+
context.defaultSigner[0],
319+
aesKey,
320+
true,
321+
[substrateIdentity]
322+
)) as IdentityGenericEvent[];
328323
assertIdentityRemoved(context.defaultSigner[0], substrate_identity_removed);
329324

330325
// remove prime identity
@@ -341,10 +336,9 @@ describeLitentry('Test Identity', (context) => {
341336
await sendTxUntilInBlock(context.substrate, tx, context.defaultSigner[0]);
342337

343338
const events = await listenEvent(context.substrate, 'identityManagement', ['StfError']);
344-
345339
expect(events.length).to.be.equal(1);
346340
const result = events[0].method as string;
347-
});
341+
});
348342

349343
step('remove error identities', async function () {
350344
const identites = [twitterIdentity, ethereumIdentity, substrateIdentity];

0 commit comments

Comments
 (0)