Skip to content

Commit 7edb17d

Browse files
committed
fix(accounts): fix failing specs
1 parent b586ecd commit 7edb17d

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

packages/accounts/src/accounts/__snapshots__/private-key-to-account.spec.ts.snap

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ exports[`signs a message 1`] = `
2626
exports[`signs a transaction 1`] = `
2727
{
2828
"data": {
29-
"amount": 3000000000n,
30-
"fee": 100000000n,
29+
"amount": "3000000000",
30+
"fee": "100000000",
3131
"from": "B62qmWKtvNQTtUqo1LxfEEDLyWMg59cp6U7c4uDC7aqgaCEijSc3Hx5",
3232
"memo": "",
33-
"nonce": 1n,
33+
"nonce": "1",
3434
"to": "B62qmWKtvNQTtUqo1LxfEEDLyWMg59cp6U7c4uDC7aqgaCEijSc3Hx5",
35-
"validUntil": 4294967295n,
35+
"validUntil": "4294967295",
3636
},
3737
"publicKey": "B62qmWKtvNQTtUqo1LxfEEDLyWMg59cp6U7c4uDC7aqgaCEijSc3Hx5",
3838
"signature": {
@@ -45,9 +45,9 @@ exports[`signs a transaction 1`] = `
4545
exports[`signs fields 1`] = `
4646
{
4747
"data": [
48-
1n,
49-
2n,
50-
3n,
48+
"1",
49+
"2",
50+
"3",
5151
],
5252
"publicKey": "B62qmWKtvNQTtUqo1LxfEEDLyWMg59cp6U7c4uDC7aqgaCEijSc3Hx5",
5353
"signature": "7mXCUvhLhFvG9ptrdfNceCrpThkCUyg1ct2z8uwY7eQbKz7UNmhv33TbuDjTznaypJtXRiMJyQWDnf27TH1FSXG7uJHTKAd9",

packages/accounts/src/accounts/private-key-to-account.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ it("creates a nullifier", async () => {
4141
const nullifier = await account.createNullifier({
4242
message: message.map((el) => el.toString()),
4343
});
44-
expect(typeof nullifier.private.c).toBe("bigint");
44+
expect(typeof nullifier.private.c).toBe("string");
4545
});
4646

4747
it("signs fields", async () => {

packages/connect/src/client.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ describe("json-rpc source", () => {
3939
providerSource: "klesia",
4040
});
4141
const balance = await client.getBalance();
42-
expect(balance).toBeGreaterThanOrEqual(0);
42+
expect(BigInt(balance)).toBeGreaterThanOrEqual(0);
4343
});
4444

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

5656
it("returns chain id", async () => {
@@ -83,7 +83,7 @@ describe("local source", () => {
8383
const transaction = await client.prepareTransactionRequest({
8484
from: PUBLIC_KEY,
8585
to: PUBLIC_KEY,
86-
amount: 1_000_000_000n,
86+
amount: "1000000000",
8787
});
8888
expect(transaction.fee).toBeDefined();
8989
expect(transaction.nonce).toBeDefined();

0 commit comments

Comments
 (0)