From f97e9925c1a60bcb51a03ee0009859f140f167ca Mon Sep 17 00:00:00 2001 From: Philipp Piwo Date: Mon, 27 Dec 2021 16:36:02 +0100 Subject: [PATCH] feat(lib): add all accounts to default client --- package-lock.json | 2 +- src/init/artifacts/test/exampleTests.js | 4 ++-- src/lib/utils.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index a9bc1dd0..57fb5172 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@aeternity/aeproject", - "version": "4.0.0-alpha.1", + "version": "4.0.0-alpha.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/src/init/artifacts/test/exampleTests.js b/src/init/artifacts/test/exampleTests.js index 689edd18..2666d9c2 100644 --- a/src/init/artifacts/test/exampleTests.js +++ b/src/init/artifacts/test/exampleTests.js @@ -30,9 +30,9 @@ describe('ExampleContract', () => { }); it('ExampleContract: set and get', async () => { - const set = await contract.methods.set(42); + const set = await contract.methods.set(42, { onAccount: wallets[1].publicKey }); assert.equal(set.decodedEvents[0].name, 'SetXEvent'); - assert.equal(set.decodedEvents[0].decoded[0], wallets[0].publicKey); + assert.equal(set.decodedEvents[0].decoded[0], wallets[1].publicKey); assert.equal(set.decodedEvents[0].decoded[1], 42); const { decodedResult } = await contract.methods.get(); diff --git a/src/lib/utils.js b/src/lib/utils.js index 008fba67..a99491e2 100644 --- a/src/lib/utils.js +++ b/src/lib/utils.js @@ -89,7 +89,7 @@ const getClient = async () => { })({ nodes: [{ name: 'node', instance }], compilerUrl: networks.devmode.compilerUrl, - accounts: [MemoryAccount({ keypair: wallets[0] })], + accounts: wallets.map((keypair) => MemoryAccount({ keypair })), }); };