Skip to content

Commit 561b0e1

Browse files
committed
test(sdk-coin-polyx): cover missing wallet passphrase guard
Add a test asserting 'missing wallet passphrase' is thrown when userKey and backupKey are present but walletPassphrase is not. The automated review dispatched after the previous test-coverage commit flagged that isMpcv2SigningMaterial()'s walletPassphrase short-circuit and recover()'s outer 'missing wallet passphrase' check were still only exercised indirectly, never via a real (non-stubbed) call with that exact param combination. Ticket: WCI-1228 Session-Id: 3a00bebe-fe12-4aea-9f1a-5a2d0dd8e94b Task-Id: dfadd58f-a04c-4dd9-819b-506439735cec
1 parent 5a8c95a commit 561b0e1

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

  • modules/sdk-coin-polyx/test/unit

modules/sdk-coin-polyx/test/unit/polyx.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,11 @@ describe('Polyx:', function () {
293293
const paramsWithoutBackupKey = { ...mpcV2RecoverParams, backupKey: undefined };
294294
await baseCoin.recover(paramsWithoutBackupKey).should.be.rejectedWith('missing backupKey');
295295
});
296+
297+
it('should throw missing wallet passphrase when userKey and backupKey are present but walletPassphrase is not', async function () {
298+
const paramsWithoutPassphrase = { ...mpcV2RecoverParams, walletPassphrase: undefined };
299+
await baseCoin.recover(paramsWithoutPassphrase).should.be.rejectedWith('missing wallet passphrase');
300+
});
296301
});
297302
});
298303

0 commit comments

Comments
 (0)