Skip to content

Commit

Permalink
test: fix side tests
Browse files Browse the repository at this point in the history
  • Loading branch information
greatertomi committed May 30, 2024
1 parent e5bcd3b commit 3848952
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { KeyPurpose, Witnesser } from '@cardano-sdk/key-management';

import {
AnyWallet,
StoresFactory,
Expand All @@ -15,11 +17,9 @@ import {
walletManagerProperties,
walletRepositoryProperties
} from '@cardano-sdk/web-extension';

import { InvalidArgumentError, isNotNil } from '@cardano-sdk/util';
import { Metadata, env, logger } from '../util';
import { storage as WebExtensionStorage, runtime } from 'webextension-polyfill';
import { Witnesser } from '@cardano-sdk/key-management';
import { filter, from, merge, of } from 'rxjs';
import { getWallet } from '../../../../src';
import { storage } from '@cardano-sdk/wallet';
Expand Down Expand Up @@ -79,6 +79,7 @@ const walletFactory: WalletFactory<Metadata, Metadata> = {
env,
logger,
name: getWalletName(wallet, props.accountIndex),
purpose: KeyPurpose.STANDARD,
stores,
witnesser
})
Expand Down
28 changes: 15 additions & 13 deletions packages/e2e/test/web-extension/extension/ui.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
/* eslint-disable no-use-before-define */
import { Cardano } from '@cardano-sdk/core';

import * as Crypto from '@cardano-sdk/crypto';
import {
BackgroundServices,
UserPromptService,
Expand All @@ -7,6 +10,15 @@ import {
env,
logger
} from './util';
import { Buffer } from 'buffer';
import {
CommunicationType,
InMemoryKeyAgent,
KeyPurpose,
SerializableInMemoryKeyAgentData,
emip3encrypt
} from '@cardano-sdk/key-management';
import { HexBlob, isNotNil } from '@cardano-sdk/util';
import {
RemoteApiPropertyType,
SigningCoordinator,
Expand All @@ -23,19 +35,8 @@ import {
walletManagerProperties,
walletRepositoryProperties
} from '@cardano-sdk/web-extension';
import { adaPriceServiceChannel, selectors, userPromptServiceChannel, walletName } from './const';

import * as Crypto from '@cardano-sdk/crypto';
import { Buffer } from 'buffer';
import { Cardano } from '@cardano-sdk/core';
import {
CommunicationType,
InMemoryKeyAgent,
SerializableInMemoryKeyAgentData,
emip3encrypt
} from '@cardano-sdk/key-management';
import { HexBlob, isNotNil } from '@cardano-sdk/util';
import { SodiumBip32Ed25519 } from '@cardano-sdk/crypto';
import { adaPriceServiceChannel, selectors, userPromptServiceChannel, walletName } from './const';
import { combineLatest, filter, firstValueFrom, merge, of } from 'rxjs';
import { runtime } from 'webextension-polyfill';

Expand Down Expand Up @@ -304,7 +305,8 @@ const createWalletIfNotExistsAndActivate = async (accountIndex: number) => {
accountIndex,
chainId: env.KEY_MANAGEMENT_PARAMS.chainId,
getPassphrase: async () => passphrase,
mnemonicWords
mnemonicWords,
purpose: KeyPurpose.STANDARD
},
{ bip32Ed25519, logger }
);
Expand Down

0 comments on commit 3848952

Please sign in to comment.