Skip to content

Commit

Permalink
Reverting change to assert is signer
Browse files Browse the repository at this point in the history
  • Loading branch information
patnir committed Feb 5, 2024
1 parent 354244b commit cf03a87
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 1 addition & 2 deletions ironfish/src/wallet/account/encoder/multiSigKeys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ export function isSignerMultiSig(multiSigKeys: MultiSigKeys): multiSigKeys is Mu
}

export function AssertIsSignerMultiSig(
multiSigKeys: MultiSigKeys | undefined,
multiSigKeys: MultiSigKeys,
): asserts multiSigKeys is MultiSigSigner {
Assert.isNotUndefined(multiSigKeys)
Assert.isTrue(isSignerMultiSig(multiSigKeys))
}
2 changes: 2 additions & 0 deletions ironfish/src/wallet/wallet.test.slow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1215,6 +1215,7 @@ describe('Wallet', () => {

const signingCommitments: Commitment[] = []
for (const participant of participants) {
Assert.isNotUndefined(participant.multiSigKeys)
AssertIsSignerMultiSig(participant.multiSigKeys)
signingCommitments.push(
createSigningCommitment(participant.multiSigKeys.keyPackage, seed),
Expand Down Expand Up @@ -1287,6 +1288,7 @@ describe('Wallet', () => {
const signatureShares: Record<string, string> = {}

for (const participant of participants) {
Assert.isNotUndefined(participant.multiSigKeys)
AssertIsSignerMultiSig(participant.multiSigKeys)
signatureShares[participant.multiSigKeys.identifier] = createSigningShare(
signingPackage,
Expand Down

0 comments on commit cf03a87

Please sign in to comment.