Skip to content

Commit

Permalink
fix(accounts): fix failing specs
Browse files Browse the repository at this point in the history
  • Loading branch information
mrcnk committed Oct 24, 2024
1 parent b586ecd commit 7edb17d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ exports[`signs a message 1`] = `
exports[`signs a transaction 1`] = `
{
"data": {
"amount": 3000000000n,
"fee": 100000000n,
"amount": "3000000000",
"fee": "100000000",
"from": "B62qmWKtvNQTtUqo1LxfEEDLyWMg59cp6U7c4uDC7aqgaCEijSc3Hx5",
"memo": "",
"nonce": 1n,
"nonce": "1",
"to": "B62qmWKtvNQTtUqo1LxfEEDLyWMg59cp6U7c4uDC7aqgaCEijSc3Hx5",
"validUntil": 4294967295n,
"validUntil": "4294967295",
},
"publicKey": "B62qmWKtvNQTtUqo1LxfEEDLyWMg59cp6U7c4uDC7aqgaCEijSc3Hx5",
"signature": {
Expand All @@ -45,9 +45,9 @@ exports[`signs a transaction 1`] = `
exports[`signs fields 1`] = `
{
"data": [
1n,
2n,
3n,
"1",
"2",
"3",
],
"publicKey": "B62qmWKtvNQTtUqo1LxfEEDLyWMg59cp6U7c4uDC7aqgaCEijSc3Hx5",
"signature": "7mXCUvhLhFvG9ptrdfNceCrpThkCUyg1ct2z8uwY7eQbKz7UNmhv33TbuDjTznaypJtXRiMJyQWDnf27TH1FSXG7uJHTKAd9",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ it("creates a nullifier", async () => {
const nullifier = await account.createNullifier({
message: message.map((el) => el.toString()),
});
expect(typeof nullifier.private.c).toBe("bigint");
expect(typeof nullifier.private.c).toBe("string");
});

it("signs fields", async () => {
Expand Down
6 changes: 3 additions & 3 deletions packages/connect/src/client.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ describe("json-rpc source", () => {
providerSource: "klesia",
});
const balance = await client.getBalance();
expect(balance).toBeGreaterThanOrEqual(0);
expect(BigInt(balance)).toBeGreaterThanOrEqual(0);
});

it("returns transaction count", async () => {
Expand All @@ -50,7 +50,7 @@ describe("json-rpc source", () => {
providerSource: "klesia",
});
const transactionCount = await client.getTransactionCount();
expect(transactionCount).toBeGreaterThanOrEqual(0);
expect(BigInt(transactionCount)).toBeGreaterThanOrEqual(0);
});

it("returns chain id", async () => {
Expand Down Expand Up @@ -83,7 +83,7 @@ describe("local source", () => {
const transaction = await client.prepareTransactionRequest({
from: PUBLIC_KEY,
to: PUBLIC_KEY,
amount: 1_000_000_000n,
amount: "1000000000",
});
expect(transaction.fee).toBeDefined();
expect(transaction.nonce).toBeDefined();
Expand Down

0 comments on commit 7edb17d

Please sign in to comment.