Skip to content

Commit

Permalink
refactor: code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
sarvalabs-harshrastogi committed Dec 1, 2023
1 parent 2b3018e commit 89f7b05
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions packages/js-moi-signer/src/signer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,14 +130,11 @@ export abstract class Signer {
ixObject.sender = this.getAddress();
}

const nonce = ixObject.nonce ? ixObject.nonce : await this.getNonce();

// Check the validity of the interaction object
this.checkInteraction(ixObject, nonce);

if (ixObject.nonce !== undefined || ixObject.nonce !== null) {
ixObject.nonce = nonce;
if (ixObject.nonce == null) {
ixObject.nonce = await this.getNonce();
}

this.checkInteraction(ixObject, ixObject.nonce);
}

/**
Expand Down

0 comments on commit 89f7b05

Please sign in to comment.