Skip to content

Commit 8a5a0b8

Browse files
committed
please the linter
1 parent 4da0e62 commit 8a5a0b8

File tree

3 files changed

+15
-8
lines changed

3 files changed

+15
-8
lines changed

e2e/msa/msaKeyManagement.test.ts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ import {
77
Sr25519Signature,
88
generateAddKeyPayload,
99
createProviderKeysAndId,
10-
CENTS, getBlockNumber, assertExtrinsicSucceededAndFeesPaid,
10+
CENTS,
11+
getBlockNumber,
12+
assertExtrinsicSucceededAndFeesPaid,
1113
} from '../scaffolding/helpers';
1214
import { KeyringPair } from '@polkadot/keyring/types';
1315
import { AddKeyData, ExtrinsicHelper } from '../scaffolding/extrinsicHelpers';
@@ -173,7 +175,7 @@ describe('MSA Key management', function () {
173175
await assert.doesNotReject(ExtrinsicHelper.deletePublicKey(keys, getUnifiedPublicKey(thirdKey)).signAndSend());
174176
});
175177

176-
it('adds a new public key for free if there is just one and its before the expiration block', async function() {
178+
it('adds a new public key for free if there is just one and its before the expiration block', async function () {
177179
// Set up
178180
const currentBlock = await getBlockNumber();
179181
setFreeKeyAddExpirationBLock(getSudo().keys, currentBlock + 30);
@@ -198,11 +200,14 @@ describe('MSA Key management', function () {
198200

199201
// assert
200202
assert.notEqual(event, undefined, 'should have added public key');
201-
assert.notEqual(chainEvents['system.ExtrinsicSuccess'], undefined, 'should have returned an ExtrinsicSuccess event');
203+
assert.notEqual(
204+
chainEvents['system.ExtrinsicSuccess'],
205+
undefined,
206+
'should have returned an ExtrinsicSuccess event'
207+
);
202208
assert.equal(chainEvents['balances.Withdraw'], undefined, 'should not have withdrawn a balance');
203209

204-
await setFreeKeyAddExpirationBLock(getSudo().keys, 0 );
205-
210+
await setFreeKeyAddExpirationBLock(getSudo().keys, 0);
206211
});
207212
});
208213

e2e/msa/msaTokens.test.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,10 @@ describe('MSAs Holding Tokens', function () {
5252
describe('getEthereumAddressForMsaId', function () {
5353
it('should return the correct address for a given MSA ID', async function () {
5454
const expectedAddress = CHECKSUMMED_ETH_ADDR_1234.toLowerCase();
55-
const { accountId, accountIdChecksummed } =
56-
await ExtrinsicHelper.apiPromise.call.msaRuntimeApi.getEthereumAddressForMsaId(MSA_ID_1234);
55+
`` const result: any = await ExtrinsicHelper.apiPromise.call.msaRuntimeApi.getEthereumAddressForMsaId(MSA_ID_1234);
56+
const accountId = result?.accountId;
57+
const accountIdChecksummed = result?.accountIdChecksummed;
58+
5759
assert.equal(accountId.toHex(), expectedAddress, `Expected address ${expectedAddress}, but got ${accountId}`);
5860
assert.equal(
5961
accountIdChecksummed.toString(),

e2e/scaffolding/helpers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ export const base64UrlToUint8Array = (base64: string): Uint8Array => new Uint8Ar
669669
export async function getFreeBalance(source: KeyringPair): Promise<bigint> {
670670
const accountInfo = await ExtrinsicHelper.getAccountInfo(source);
671671
const ed = await getExistentialDeposit();
672-
return (accountInfo.data.free.toBigInt() - ed);
672+
return accountInfo.data.free.toBigInt() - ed;
673673
}
674674

675675
// spendable = free - max(frozen - on_hold, ED)

0 commit comments

Comments
 (0)