Skip to content

Commit 8eb592f

Browse files
authored
Run yarn dedupe to fix issue with @polkadot/keyring (#337)
* Run `yarn dedupe` This fixes the problem with the `@polkadot/keyring` package, which necessitated an `unknown` type cast on dev account objects. * Remove `as unknown` type cast on dev account objects
1 parent 11ea8dc commit 8eb592f

File tree

2 files changed

+31
-698
lines changed

2 files changed

+31
-698
lines changed

packages/networks/src/defaultAccounts.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ import type { KeyringInstance, KeyringPair } from '@polkadot/keyring/types'
44

55
import { cryptoWaitReady } from '@polkadot/util-crypto'
66

7+
/**
8+
* Type of object containing dev accounts that are used in tests.
9+
*
10+
* The keyrings are used to create fresh accounts: in some networks (e.g. testnets), dev accounts may have
11+
* already been used, and can thus alter the result of testing.
12+
*/
713
export type DefaultAccounts = {
814
alice: KeyringPair
915
bob: KeyringPair
@@ -19,7 +25,7 @@ export type DefaultAccounts = {
1925
keyringEth: KeyringInstance
2026
}
2127

22-
export const defaultAccounts: DefaultAccounts = testingPairs() as unknown as DefaultAccounts
28+
export const defaultAccounts: DefaultAccounts = testingPairs() as DefaultAccounts
2329

2430
/**
2531
* Sr25519 keyring pairs for use in tests.
@@ -29,4 +35,4 @@ export const defaultAccounts: DefaultAccounts = testingPairs() as unknown as Def
2935
*/
3036
export const defaultAccountsSr25519: DefaultAccounts = (await cryptoWaitReady().then(() =>
3137
testingPairs('sr25519'),
32-
)) as unknown as DefaultAccounts
38+
)) as DefaultAccounts

0 commit comments

Comments
 (0)