Skip to content

Commit

Permalink
chore: updated build and cosmetic changes
Browse files Browse the repository at this point in the history
  • Loading branch information
sarvalabs-gokul committed Dec 1, 2023
1 parent 89f7b05 commit 8c93f48
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 11 deletions.
3 changes: 2 additions & 1 deletion docs/source/logic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ applications on the MOI network.
const mnemonic = "mother clarify push liquid ordinary social track ...";
const provider = new JsonRpcProvider("http://localhost:1600/");
const wallet = new Wallet(provider);
return await wallet.fromMnemonic(mnemonic);
await wallet.fromMnemonic(mnemonic);
return wallet;
}
const manifest = { ... }
Expand Down
1 change: 1 addition & 0 deletions packages/js-moi-logic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ npm install js-moi-wallet
const provider = new JsonRpcProvider("http://localhost:1600/");
const wallet = new Wallet(provider);
await wallet.fromMnemonic(mnemonic);
return wallet;
}

(async () => {
Expand Down
3 changes: 2 additions & 1 deletion packages/js-moi-logic/dist/logic-base.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,10 @@ class LogicBase extends element_descriptor_1.default {
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()
payload: ixObject.createPayload(),
}
};
}
Expand Down
2 changes: 1 addition & 1 deletion packages/js-moi-logic/dist/tsconfig.tsbuildinfo

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/js-moi-signer/dist/signer.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AbstractProvider, Options, InteractionResponse, InteractionRequest, InteractionCallResponse, InteractionObject } from "js-moi-providers";
import { AbstractProvider, InteractionCallResponse, InteractionObject, InteractionRequest, InteractionResponse, Options } from "js-moi-providers";
import { SigType, SigningAlgorithms } from "../types";
/**
* An abstract class representing a signer responsible for cryptographic
Expand Down
10 changes: 4 additions & 6 deletions packages/js-moi-signer/dist/signer.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Signer = void 0;
const js_moi_utils_1 = require("js-moi-utils");
const ecdsa_1 = __importDefault(require("./ecdsa"));
const signature_1 = __importDefault(require("./signature"));
const js_moi_utils_1 = require("js-moi-utils");
/**
* An abstract class representing a signer responsible for cryptographic
* activities like signing and verification.
Expand Down Expand Up @@ -105,15 +105,13 @@ class Signer {
* an error during preparation.
*/
async prepareInteraction(ixObject) {
const nonce = await this.getNonce();
if (!ixObject.sender) {
ixObject.sender = this.getAddress();
}
// 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);
}
/**
* Initiates an interaction by calling a method on the connected provider.
Expand Down
2 changes: 1 addition & 1 deletion packages/js-moi-signer/dist/tsconfig.tsbuildinfo

Large diffs are not rendered by default.

0 comments on commit 8c93f48

Please sign in to comment.