Skip to content

Commit 8d67c7c

Browse files
author
BitGo Agent
committed
test(sdk-lib-mpc): load WASM before getFirstMessage on restored session
The session restore test was calling getFirstMessage() on a restored DKG instance without first loading the WASM module. initDkg() is what triggers loadWasmMps(); restoreSession() does not. Added initDkg() before restoreSession() so WASM is loaded — restoreSession then overwrites state and keys from the persisted blob as expected. Ticket: WCI-1261 Session-Id: ac4bfdd3-68f2-464c-bb89-a871628f8093 Task-Id: bf6d94d3-a6fd-40c3-9c4a-efc7ffd08fdf
1 parent 190c256 commit 8d67c7c

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

  • modules/sdk-lib-mpc/test/unit/tss/eddsa

modules/sdk-lib-mpc/test/unit/tss/eddsa/dkg.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,9 @@ describe('EdDSA MPS DKG', function () {
463463
const parsed = JSON.parse(session);
464464
assert.deepStrictEqual(parsed.retrofitData, retrofitUser, 'getSession must include retrofitData');
465465

466+
// initDkg loads the WASM module; restoreSession then overwrites state/keys from the blob
466467
const restored = new EddsaMPSDkg.DKG(3, 2, 0);
468+
await restored.initDkg(userKP.privKey, [backupKP.pubKey, bitgoKP.pubKey]);
467469
restored.restoreSession(session);
468470

469471
// Drive backup and bitgo normally so restored party can complete round 0

0 commit comments

Comments
 (0)