Skip to content

Commit 844f53e

Browse files
please the linter
Update e2e/scaffolding/helpers.ts remove backticks Co-authored-by: Joe Caputo <[email protected]>
1 parent 6d50183 commit 844f53e

File tree

3 files changed

+16
-9
lines changed

3 files changed

+16
-9
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
@@ -51,8 +51,10 @@ describe('MSAs Holding Tokens', function () {
5151
describe('getEthereumAddressForMsaId', function () {
5252
it('should return the correct address for a given MSA ID', async function () {
5353
const expectedAddress = CHECKSUMMED_ETH_ADDR_1234.toLowerCase();
54-
const { accountId, accountIdChecksummed } =
55-
await ExtrinsicHelper.apiPromise.call.msaRuntimeApi.getEthereumAddressForMsaId(MSA_ID_1234);
54+
const result: any = await ExtrinsicHelper.apiPromise.call.msaRuntimeApi.getEthereumAddressForMsaId(MSA_ID_1234);
55+
const accountId = result?.accountId;
56+
const accountIdChecksummed = result?.accountIdChecksummed;
57+
5658
assert.equal(accountId.toHex(), expectedAddress, `Expected address ${expectedAddress}, but got ${accountId}`);
5759
assert.equal(
5860
accountIdChecksummed.toString(),

e2e/scaffolding/helpers.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ export async function setEpochLength(keys: KeyringPair, epochLength: number): Pr
539539
}
540540
}
541541

542-
export async function setFreeKeyAddExpirationBLock(keys: KeyringPair, expires_at: number): Promise<void> {
542+
export async function setFreeKeyAddExpirationBlock(keys: KeyringPair, expires_at: number): Promise<void> {
543543
const setFreeKeyAddExpirationOp = ExtrinsicHelper.setFreeKeyAddExpiration(keys, expires_at);
544544
await assert.doesNotReject(setFreeKeyAddExpirationOp.sudoSignAndSend());
545545
}
@@ -730,7 +730,7 @@ export const base64UrlToUint8Array = (base64: string): Uint8Array => new Uint8Ar
730730
export async function getFreeBalance(source: KeyringPair): Promise<bigint> {
731731
const accountInfo = await ExtrinsicHelper.getAccountInfo(source);
732732
const ed = await getExistentialDeposit();
733-
return (accountInfo.data.free.toBigInt() - ed);
733+
return accountInfo.data.free.toBigInt() - ed;
734734
}
735735

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

0 commit comments

Comments
 (0)