Skip to content

Commit

Permalink
feat(lib): add all accounts to default client
Browse files Browse the repository at this point in the history
  • Loading branch information
thepiwo committed Feb 7, 2022
1 parent c42c2e4 commit f97e992
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/init/artifacts/test/exampleTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion src/lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 })),
});
};

Expand Down

0 comments on commit f97e992

Please sign in to comment.