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 aeb4438 commit 2b3018e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/js-moi-logic/src/logic-base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,10 @@ export abstract class LogicBase extends ElementDescriptor {
params: {
sender: this.signer.getAddress(),
type: this.getIxType(),
nonce: args[1].nonce,
fuel_price: args[1].fuelPrice,
fuel_limit: args[1].fuelLimit,
payload: ixObject.createPayload(),
nonce: args[1].nonce
}
}
}
Expand Down
6 changes: 2 additions & 4 deletions packages/js-moi-signer/src/signer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,14 +126,12 @@ export abstract class Signer {
* an error during preparation.
*/
private async prepareInteraction(ixObject: InteractionObject): Promise<void> {
const nonce = await this.getNonce({
tesseract_number: -1,
});

if (!ixObject.sender) {
ixObject.sender = this.getAddress();
}

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

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

Expand Down

0 comments on commit 2b3018e

Please sign in to comment.