Skip to content

Commit

Permalink
test: replaced bip32Ed25519 default strategy (CML for Sodium)
Browse files Browse the repository at this point in the history
  • Loading branch information
AngelCastilloB committed Feb 7, 2023
1 parent 19dba81 commit 6737b0d
Show file tree
Hide file tree
Showing 21 changed files with 38 additions and 44 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/continuous-integration-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
FAUCET_PROVIDER: 'cardano-wallet'
FAUCET_PROVIDER_PARAMS: '{"baseUrl":"http://localhost:8090/v2","mnemonic":"fire method repair aware foot tray accuse brother popular olive find account sick rocket next"}'
KEY_MANAGEMENT_PROVIDER: 'inMemory'
KEY_MANAGEMENT_PARAMS: '{"bip32Ed25519": "CML", "accountIndex": 0, "chainId":{"networkId": 0, "networkMagic": 888}, "password":"some_password","mnemonic":"vacant violin soft weird deliver render brief always monitor general maid smart jelly core drastic erode echo there clump dizzy card filter option defense"}'
KEY_MANAGEMENT_PARAMS: '{"bip32Ed25519": "Sodium", "accountIndex": 0, "chainId":{"networkId": 0, "networkMagic": 888}, "password":"some_password","mnemonic":"vacant violin soft weird deliver render brief always monitor general maid smart jelly core drastic erode echo there clump dizzy card filter option defense"}'
ASSET_PROVIDER: 'http'
ASSET_PROVIDER_PARAMS: '{"baseUrl":"http://localhost:4000/asset"}'
CHAIN_HISTORY_PROVIDER: 'http'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
FAUCET_PROVIDER: 'cardano-wallet'
FAUCET_PROVIDER_PARAMS: '{"baseUrl":"http://localhost:8090/v2","mnemonic":"fire method repair aware foot tray accuse brother popular olive find account sick rocket next"}'
KEY_MANAGEMENT_PROVIDER: 'inMemory'
KEY_MANAGEMENT_PARAMS: '{"bip32Ed25519": "CML", "accountIndex": 0, "chainId":{"networkId": 0, "networkMagic": 888}, "password":"some_password","mnemonic":"vacant violin soft weird deliver render brief always monitor general maid smart jelly core drastic erode echo there clump dizzy card filter option defense"}'
KEY_MANAGEMENT_PARAMS: '{"bip32Ed25519": "Sodium", "accountIndex": 0, "chainId":{"networkId": 0, "networkMagic": 888}, "password":"some_password","mnemonic":"vacant violin soft weird deliver render brief always monitor general maid smart jelly core drastic erode echo there clump dizzy card filter option defense"}'
ASSET_PROVIDER: 'http'
ASSET_PROVIDER_PARAMS: '{"baseUrl":"http://localhost:4000/asset"}'
CHAIN_HISTORY_PROVIDER: 'http'
Expand Down
10 changes: 5 additions & 5 deletions packages/e2e/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ FAUCET_PROVIDER_PARAMS='{"baseUrl":"http://localhost:8090/v2","mnemonic":"fire m

# Key management setup - required by getWallet
KEY_MANAGEMENT_PROVIDER=inMemory
KEY_MANAGEMENT_PARAMS='{"bip32Ed25519": "CML", "accountIndex": 0, "chainId":{"networkId": 0, "networkMagic": 888}, "password":"some_password","mnemonic":"vacant violin soft weird deliver render brief always monitor general maid smart jelly core drastic erode echo there clump dizzy card filter option defense"}'
#KEY_MANAGEMENT_PARAMS='{"bip32Ed25519": "CML", "accountIndex": 0, "chainId":{"networkId": 0, "networkMagic": 888}, "password":"some_password","mnemonic":"slab gorilla reflect display cage aim silver add own arrange crew start female bitter menu inner combine exit swallow bamboo midnight wealth culture picnic"}'
#KEY_MANAGEMENT_PARAMS='{"bip32Ed25519": "CML", "accountIndex": 0, "chainId":{"networkId": 0, "networkMagic": 888}, "password":"some_password","mnemonic":"decorate survey empower stairs pledge humble social leisure baby wrap grief exact monster rug dash kiss perfect select science light frame play swallow day"}'
#KEY_MANAGEMENT_PARAMS='{"bip32Ed25519": "CML", "accountIndex": 0, "chainId":{"networkId": 0, "networkMagic": 888}, "password":"some_password","mnemonic":"phrase raw learn suspect inmate powder combine apology regular hero gain chronic fruit ritual short screen goddess odor keen creek brand today kit machine"}'
#KEY_MANAGEMENT_PARAMS='{"bip32Ed25519": "CML", "accountIndex": 0, "chainId":{"networkId": 0, "networkMagic": 888}, "password":"some_password","mnemonic":"salon zoo engage submit smile frost later decide wing sight chaos renew lizard rely canal coral scene hobby scare step bus leaf tobacco slice"}'
KEY_MANAGEMENT_PARAMS='{"bip32Ed25519": "Sodium", "accountIndex": 0, "chainId":{"networkId": 0, "networkMagic": 888}, "password":"some_password","mnemonic":"vacant violin soft weird deliver render brief always monitor general maid smart jelly core drastic erode echo there clump dizzy card filter option defense"}'
#KEY_MANAGEMENT_PARAMS='{"bip32Ed25519": "Sodium", "accountIndex": 0, "chainId":{"networkId": 0, "networkMagic": 888}, "password":"some_password","mnemonic":"slab gorilla reflect display cage aim silver add own arrange crew start female bitter menu inner combine exit swallow bamboo midnight wealth culture picnic"}'
#KEY_MANAGEMENT_PARAMS='{"bip32Ed25519": "Sodium", "accountIndex": 0, "chainId":{"networkId": 0, "networkMagic": 888}, "password":"some_password","mnemonic":"decorate survey empower stairs pledge humble social leisure baby wrap grief exact monster rug dash kiss perfect select science light frame play swallow day"}'
#KEY_MANAGEMENT_PARAMS='{"bip32Ed25519": "Sodium", "accountIndex": 0, "chainId":{"networkId": 0, "networkMagic": 888}, "password":"some_password","mnemonic":"phrase raw learn suspect inmate powder combine apology regular hero gain chronic fruit ritual short screen goddess odor keen creek brand today kit machine"}'
#KEY_MANAGEMENT_PARAMS='{"bip32Ed25519": "Sodium", "accountIndex": 0, "chainId":{"networkId": 0, "networkMagic": 888}, "password":"some_password","mnemonic":"salon zoo engage submit smile frost later decide wing sight chaos renew lizard rely canal coral scene hobby scare step bus leaf tobacco slice"}'

# Providers setup - required by getWallet
ASSET_PROVIDER=http
Expand Down
1 change: 1 addition & 0 deletions packages/e2e/src/factories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ export const bip32Ed25519Factory = new ProviderFactory<Crypto.Bip32Ed25519>();
// bip32Ed25519

bip32Ed25519Factory.register('CML', async () => new Crypto.CmlBip32Ed25519(CML));
bip32Ed25519Factory.register('Sodium', async () => new Crypto.SodiumBip32Ed25519());

// Faucet providers

Expand Down
3 changes: 1 addition & 2 deletions packages/e2e/src/scripts/mnemonic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
/* eslint-disable @typescript-eslint/no-floating-promises */
import * as Crypto from '@cardano-sdk/crypto';
import { AddressType, InMemoryKeyAgent, util } from '@cardano-sdk/key-management';
import { CML } from '@cardano-sdk/core';
import { localNetworkChainId } from '../util';

/**
Expand All @@ -20,7 +19,7 @@ import { localNetworkChainId } from '../util';
mnemonicWords: mnemonicArray
},
{
bip32Ed25519: new Crypto.CmlBip32Ed25519(CML),
bip32Ed25519: new Crypto.SodiumBip32Ed25519(),
inputResolver: { resolveInputAddress: async () => null },
logger: console
}
Expand Down
4 changes: 2 additions & 2 deletions packages/governance/test/cip36.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable max-len */
import * as Crypto from '@cardano-sdk/crypto';
import { CML, Cardano, coreToCml } from '@cardano-sdk/core';
import { Cardano, coreToCml } from '@cardano-sdk/core';
import { cip36 } from '../src';
import { usingAutoFree } from '@cardano-sdk/util';

Expand Down Expand Up @@ -54,7 +54,7 @@ describe('cip36', () => {
);
const signedCip36Metadata = await cip36.metadataBuilder.signVotingRegistration(votingRegistrationMetadata, {
signBlob: async (blob) => {
const bip32Ed25519 = new Crypto.CmlBip32Ed25519(CML);
const bip32Ed25519 = new Crypto.SodiumBip32Ed25519();
const privateStakeKey = Crypto.Ed25519PrivateNormalKeyHex(
'f5beaeff7932a4164d270afde7716067582412e8977e67986cd9b456fc082e3a'
);
Expand Down
4 changes: 2 additions & 2 deletions packages/key-management/test/InMemoryKeyAgent.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as Crypto from '@cardano-sdk/crypto';
import { AddressType, InMemoryKeyAgent, KeyRole, SerializableInMemoryKeyAgentData, util } from '../src';
import { CML, Cardano } from '@cardano-sdk/core';
import { Cardano } from '@cardano-sdk/core';
import { HexBlob } from '@cardano-sdk/util';
import { dummyLogger } from 'ts-log';

Expand All @@ -12,7 +12,7 @@ describe('InMemoryKeyAgent', () => {
let getPassword: jest.Mock;
let inputResolver: jest.Mocked<Cardano.util.InputResolver>;
let mnemonicWords: string[];
const bip32Ed25519 = new Crypto.CmlBip32Ed25519(CML);
const bip32Ed25519 = new Crypto.SodiumBip32Ed25519();

beforeEach(async () => {
mnemonicWords = util.generateMnemonicWords();
Expand Down
4 changes: 2 additions & 2 deletions packages/key-management/test/KeyAgentBase.test.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/* eslint-disable sonarjs/no-duplicate-string */
import * as Crypto from '@cardano-sdk/crypto';
import { AddressType, KeyAgentBase, KeyAgentType, KeyRole, SerializableInMemoryKeyAgentData } from '../src';
import { CML, Cardano } from '@cardano-sdk/core';
import { Cardano } from '@cardano-sdk/core';
import { dummyLogger } from 'ts-log';

const ACCOUNT_INDEX = 1;
const bip32Ed25519 = new Crypto.CmlBip32Ed25519(CML);
const bip32Ed25519 = new Crypto.SodiumBip32Ed25519();

class MockKeyAgent extends KeyAgentBase {
constructor(data: SerializableInMemoryKeyAgentData) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import { CML } from '@cardano-sdk/core';
import { CmlBip32Ed25519 } from '@cardano-sdk/crypto';
import { SodiumBip32Ed25519 } from '@cardano-sdk/crypto';
import { KeyAgentDependencies } from '../../src/';
import { dummyLogger } from 'ts-log';

export const mockKeyAgentDependencies = (): jest.Mocked<KeyAgentDependencies> => ({
bip32Ed25519: new CmlBip32Ed25519(CML),
bip32Ed25519: new SodiumBip32Ed25519(),
inputResolver: {
resolveInputAddress: jest.fn().mockResolvedValue(null)
},
Expand Down
4 changes: 2 additions & 2 deletions packages/key-management/test/restoreKeyAgent.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ import {
SerializableTrezorKeyAgentData,
restoreKeyAgent
} from '../src';
import { CML, Cardano } from '@cardano-sdk/core';
import { Cardano } from '@cardano-sdk/core';
import { InvalidSerializableDataError } from '../src/errors';
import { STAKE_KEY_DERIVATION_PATH } from '../src/util';
import { dummyLogger } from 'ts-log';

describe('KeyManagement/restoreKeyAgent', () => {
const dependencies: KeyAgentDependencies = {
bip32Ed25519: new Crypto.CmlBip32Ed25519(CML),
bip32Ed25519: new Crypto.SodiumBip32Ed25519(),
inputResolver: { resolveInputAddress: jest.fn() },
logger: dummyLogger
};
Expand Down
4 changes: 2 additions & 2 deletions packages/key-management/test/util/createAsyncKeyAgent.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as Crypto from '@cardano-sdk/crypto';
import { AsyncKeyAgent, InMemoryKeyAgent, KeyAgent, util } from '../../src';
import { CML, Cardano } from '@cardano-sdk/core';
import { Cardano } from '@cardano-sdk/core';
import { HexBlob } from '@cardano-sdk/util';
import { dummyLogger } from 'ts-log';
import { firstValueFrom } from 'rxjs';
Expand All @@ -21,7 +21,7 @@ describe('createAsyncKeyAgent maps KeyAgent to AsyncKeyAgent', () => {
getPassword,
mnemonicWords
},
{ bip32Ed25519: new Crypto.CmlBip32Ed25519(CML), inputResolver, logger: dummyLogger }
{ bip32Ed25519: new Crypto.SodiumBip32Ed25519(), inputResolver, logger: dummyLogger }
);
asyncKeyAgent = util.createAsyncKeyAgent(keyAgent);
});
Expand Down
3 changes: 1 addition & 2 deletions packages/wallet/test/SingleAddressWallet/load.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {
somePartialStakePools
} from '@cardano-sdk/util-dev';
import {
CML,
Cardano,
ChainHistoryProvider,
NetworkInfoProvider,
Expand Down Expand Up @@ -51,7 +50,7 @@ interface Providers {

const createWallet = async (stores: WalletStores, providers: Providers, pollingConfig?: PollingConfig) => {
const { wallet } = await setupWallet({
bip32Ed25519: new Crypto.CmlBip32Ed25519(CML),
bip32Ed25519: new Crypto.SodiumBip32Ed25519(),
createKeyAgent: async (dependencies) => {
const groupedAddress: GroupedAddress = {
accountIndex: 0,
Expand Down
4 changes: 2 additions & 2 deletions packages/wallet/test/SingleAddressWallet/methods.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as Crypto from '@cardano-sdk/crypto';
import * as mocks from '../mocks';
import { AddressType, GroupedAddress } from '@cardano-sdk/key-management';
import { AssetId, createStubStakePoolProvider } from '@cardano-sdk/util-dev';
import { CML, Cardano, CardanoNodeErrors, ProviderError, ProviderFailure } from '@cardano-sdk/core';
import { Cardano, CardanoNodeErrors, ProviderError, ProviderFailure } from '@cardano-sdk/core';
import { HexBlob } from '@cardano-sdk/util';
import { InitializeTxProps, SingleAddressWallet, setupWallet } from '../../src';
import { firstValueFrom, skip } from 'rxjs';
Expand Down Expand Up @@ -55,7 +55,7 @@ describe('SingleAddressWallet methods', () => {
type: AddressType.External
};
({ wallet } = await setupWallet({
bip32Ed25519: new Crypto.CmlBip32Ed25519(CML),
bip32Ed25519: new Crypto.SodiumBip32Ed25519(),
createKeyAgent: async (dependencies) => {
const asyncKeyAgent = await testAsyncKeyAgent([groupedAddress], dependencies);
asyncKeyAgent.deriveAddress = jest.fn().mockResolvedValue(groupedAddress);
Expand Down
3 changes: 1 addition & 2 deletions packages/wallet/test/SingleAddressWallet/rollback.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import * as Crypto from '@cardano-sdk/crypto';
import * as mocks from '../mocks';
import { AddressType, GroupedAddress } from '@cardano-sdk/key-management';
import {
CML,
Cardano,
ChainHistoryProvider,
NetworkInfoProvider,
Expand Down Expand Up @@ -33,7 +32,7 @@ interface Providers {

const createWallet = async (stores: WalletStores, providers: Providers, pollingConfig?: PollingConfig) => {
const { wallet } = await setupWallet({
bip32Ed25519: new Crypto.CmlBip32Ed25519(CML),
bip32Ed25519: new Crypto.SodiumBip32Ed25519(),
createKeyAgent: async (dependencies) => {
const groupedAddress: GroupedAddress = {
accountIndex: 0,
Expand Down
3 changes: 1 addition & 2 deletions packages/wallet/test/SingleAddressWallet/shutdown.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import * as mocks from '../mocks';
import { AddressType, GroupedAddress } from '@cardano-sdk/key-management';
import { AssetId, createStubStakePoolProvider, somePartialStakePools } from '@cardano-sdk/util-dev';
import {
CML,
Cardano,
ChainHistoryProvider,
NetworkInfoProvider,
Expand Down Expand Up @@ -47,7 +46,7 @@ const createWallet = async (
pollingConfig?: PollingConfig
) => {
const { wallet } = await setupWallet({
bip32Ed25519: new Crypto.CmlBip32Ed25519(CML),
bip32Ed25519: new Crypto.SodiumBip32Ed25519(),
createKeyAgent: async (dependencies) => {
const groupedAddress: GroupedAddress = {
accountIndex: 0,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as Crypto from '@cardano-sdk/crypto';
import { CML, Cardano } from '@cardano-sdk/core';
import { Cardano } from '@cardano-sdk/core';
import { CommunicationType, KeyAgent, LedgerKeyAgent, restoreKeyAgent, util } from '@cardano-sdk/key-management';
import { ObservableWallet, SingleAddressWallet, setupWallet } from '../../src';
import { createStubStakePoolProvider } from '@cardano-sdk/util-dev';
Expand Down Expand Up @@ -44,7 +44,7 @@ const getAddress = async (wallet: ObservableWallet) => (await firstValueFrom(wal
describe('LedgerKeyAgent+SingleAddressWallet', () => {
test('creating and restoring LedgerKeyAgent wallet', async () => {
const { wallet: freshWallet, keyAgent: freshKeyAgent } = await setupWallet({
bip32Ed25519: new Crypto.CmlBip32Ed25519(CML),
bip32Ed25519: new Crypto.SodiumBip32Ed25519(),
createKeyAgent: (dependencies) =>
LedgerKeyAgent.createWithDevice(
{
Expand All @@ -57,7 +57,7 @@ describe('LedgerKeyAgent+SingleAddressWallet', () => {
logger
});
const { wallet: restoredWallet } = await setupWallet({
bip32Ed25519: new Crypto.CmlBip32Ed25519(CML),
bip32Ed25519: new Crypto.SodiumBip32Ed25519(),
createKeyAgent: (dependencies) => restoreKeyAgent(freshKeyAgent.serializableData, dependencies),
createWallet,
logger
Expand Down
4 changes: 2 additions & 2 deletions packages/wallet/test/hardware/LedgerKeyAgent.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
util
} from '@cardano-sdk/key-management';
import { AssetId, createStubStakePoolProvider } from '@cardano-sdk/util-dev';
import { CML, Cardano } from '@cardano-sdk/core';
import { Cardano } from '@cardano-sdk/core';
import { SingleAddressWallet, setupWallet } from '../../src';
import { dummyLogger as logger } from 'ts-log';
import { mockKeyAgentDependencies } from '@cardano-sdk/key-management/test/mocks';
Expand All @@ -26,7 +26,7 @@ describe('LedgerKeyAgent', () => {
beforeAll(async () => {
txSubmitProvider = mocks.mockTxSubmitProvider();
({ keyAgent, wallet } = await setupWallet({
bip32Ed25519: new Crypto.CmlBip32Ed25519(CML),
bip32Ed25519: new Crypto.SodiumBip32Ed25519(),
createKeyAgent: async (dependencies) => {
const ledgerKeyAgent = await LedgerKeyAgent.createWithDevice(
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as Crypto from '@cardano-sdk/crypto';
import { CML, Cardano } from '@cardano-sdk/core';
import { Cardano } from '@cardano-sdk/core';
import { CommunicationType, KeyAgent, TrezorKeyAgent, restoreKeyAgent, util } from '@cardano-sdk/key-management';
import { ObservableWallet, SingleAddressWallet, setupWallet } from '../../src';
import { createStubStakePoolProvider } from '@cardano-sdk/util-dev';
Expand Down Expand Up @@ -44,7 +44,7 @@ const getAddress = async (wallet: ObservableWallet) => (await firstValueFrom(wal
describe('TrezorKeyAgent+SingleAddressWallet', () => {
test('creating and restoring TrezorKeyAgent wallet', async () => {
const { wallet: freshWallet, keyAgent: freshKeyAgent } = await setupWallet({
bip32Ed25519: new Crypto.CmlBip32Ed25519(CML),
bip32Ed25519: new Crypto.SodiumBip32Ed25519(),
createKeyAgent: (dependencies) =>
TrezorKeyAgent.createWithDevice(
{
Expand All @@ -63,7 +63,7 @@ describe('TrezorKeyAgent+SingleAddressWallet', () => {
logger
});
const { wallet: restoredWallet } = await setupWallet({
bip32Ed25519: new Crypto.CmlBip32Ed25519(CML),
bip32Ed25519: new Crypto.SodiumBip32Ed25519(),
createKeyAgent: (dependencies) => restoreKeyAgent(freshKeyAgent.serializableData, dependencies),
createWallet,
logger
Expand Down
4 changes: 2 additions & 2 deletions packages/wallet/test/hardware/TrezorKeyAgent.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
util
} from '@cardano-sdk/key-management';
import { AssetId, createStubStakePoolProvider } from '@cardano-sdk/util-dev';
import { CML, Cardano } from '@cardano-sdk/core';
import { Cardano } from '@cardano-sdk/core';
import { SingleAddressWallet, setupWallet } from '../../src';
import { dummyLogger as logger } from 'ts-log';
import { mockKeyAgentDependencies } from '../../../key-management/test/mocks';
Expand All @@ -29,7 +29,7 @@ describe('TrezorKeyAgent', () => {
beforeAll(async () => {
txSubmitProvider = mocks.mockTxSubmitProvider();
({ keyAgent, wallet } = await setupWallet({
bip32Ed25519: new Crypto.CmlBip32Ed25519(CML),
bip32Ed25519: new Crypto.SodiumBip32Ed25519(),

createKeyAgent: async (dependencies) => {
const trezorKeyAgent = await TrezorKeyAgent.createWithDevice(
Expand Down
3 changes: 1 addition & 2 deletions packages/wallet/test/integration/util.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import * as Crypto from '@cardano-sdk/crypto';
import { CML } from '@cardano-sdk/core';
import { SingleAddressWallet, setupWallet } from '../../src';
import { WalletStores } from '../../src/persistence';
import { createStubStakePoolProvider } from '@cardano-sdk/util-dev';
Expand All @@ -16,7 +15,7 @@ import { testAsyncKeyAgent } from '../../../key-management/test/mocks';

export const createWallet = async (stores?: WalletStores) =>
setupWallet({
bip32Ed25519: new Crypto.CmlBip32Ed25519(CML),
bip32Ed25519: new Crypto.SodiumBip32Ed25519(),
createKeyAgent: (dependencies) => testAsyncKeyAgent(undefined, dependencies),
createWallet: async (keyAgent) => {
const txSubmitProvider = mockTxSubmitProvider();
Expand Down
3 changes: 1 addition & 2 deletions packages/wallet/test/setupWallet.test.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import * as Crypto from '@cardano-sdk/crypto';
import { CML } from '@cardano-sdk/core';
import { logger } from '@cardano-sdk/util-dev';
import { setupWallet } from '../src';

jest.mock('../src/services/WalletUtil');
const { createLazyWalletUtil } = jest.requireMock('../src/services/WalletUtil');

describe('setupWallet', () => {
const bip32Ed25519 = new Crypto.CmlBip32Ed25519(CML);
const bip32Ed25519 = new Crypto.SodiumBip32Ed25519();

it('initializes WalletUtil with the wallet that is then used as InputResolver for KeyAgent', async () => {
const initialize = jest.fn();
Expand Down

0 comments on commit 6737b0d

Please sign in to comment.