diff --git a/src/sdk/strategy/cbd-strategy.ts b/src/sdk/strategy/cbd-strategy.ts index 83f61365d..f48accc9f 100644 --- a/src/sdk/strategy/cbd-strategy.ts +++ b/src/sdk/strategy/cbd-strategy.ts @@ -29,21 +29,22 @@ export class CbdStrategy { } public async deploy( - provider: ethers.providers.Web3Provider, - ritualId?: number + web3Provider: ethers.providers.Web3Provider, + ritualId: number ): Promise { - if (ritualId === undefined) { - ritualId = await DkgClient.initializeRitual( - provider, - this.cohort.ursulaAddresses, - true - ); - } - if (ritualId === undefined) { - // Given that we just initialized the ritual, this should never happen - throw new Error('Ritual ID is undefined'); - } - const dkgRitual = await DkgClient.getExistingRitual(provider, ritualId); + // TODO(#264): Enable ritual initialization + // if (ritualId === undefined) { + // ritualId = await DkgClient.initializeRitual( + // web3Provider, + // this.cohort.ursulaAddresses, + // true + // ); + // } + // if (ritualId === undefined) { + // // Given that we just initialized the ritual, this should never happen + // throw new Error('Ritual ID is undefined'); + // } + const dkgRitual = await DkgClient.getExistingRitual(web3Provider, ritualId); return DeployedCbdStrategy.create(dkgRitual, this.cohort.porterUri); } diff --git a/test/unit/cbd-strategy.test.ts b/test/unit/cbd-strategy.test.ts index 9725b9d87..9a300035b 100644 --- a/test/unit/cbd-strategy.test.ts +++ b/test/unit/cbd-strategy.test.ts @@ -17,7 +17,6 @@ import { mockGetExistingRitual, mockGetParticipants, mockGetUrsulas, - mockInitializeRitual, mockRandomSessionStaticSecret, } from '../utils'; @@ -55,12 +54,10 @@ async function makeDeployedCbdStrategy() { const mockedDkgRitual = fakeDkgRitual(mockedDkg); const web3Provider = fakeWeb3Provider(aliceSecretKey.toBEBytes()); const getUrsulasSpy = mockGetUrsulas(ursulas); - const initializeRitualSpy = mockInitializeRitual(ritualId); const getExistingRitualSpy = mockGetExistingRitual(mockedDkgRitual); - const deployedStrategy = await strategy.deploy(web3Provider); + const deployedStrategy = await strategy.deploy(web3Provider, ritualId); expect(getUrsulasSpy).toHaveBeenCalled(); - expect(initializeRitualSpy).toHaveBeenCalled(); expect(getExistingRitualSpy).toHaveBeenCalled(); return { mockedDkg, deployedStrategy };