@aztec/cli 0.7.2 → 0.7.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -28,14 +28,14 @@ describe('CLI Utils', () => {
28
28
  // returns a parsed Aztec Address
29
29
  const aztecAddress = AztecAddress.random();
30
30
  const result = await getTxSender(client, aztecAddress.toString());
31
- expect(client.getAccounts).toHaveBeenCalledTimes(0);
31
+ expect(client.getRegisteredAccounts).toHaveBeenCalledTimes(0);
32
32
  expect(result).toEqual(aztecAddress);
33
33
 
34
34
  // returns an address found in the aztec client
35
35
  const completeAddress = await CompleteAddress.random();
36
- client.getAccounts.mockResolvedValueOnce([completeAddress]);
36
+ client.getRegisteredAccounts.mockResolvedValueOnce([completeAddress]);
37
37
  const resultWithoutString = await getTxSender(client);
38
- expect(client.getAccounts).toHaveBeenCalled();
38
+ expect(client.getRegisteredAccounts).toHaveBeenCalled();
39
39
  expect(resultWithoutString).toEqual(completeAddress.address);
40
40
 
41
41
  // throws when invalid parameter passed
@@ -47,7 +47,7 @@ describe('CLI Utils', () => {
47
47
  ).rejects.toThrow(`Invalid option 'from' passed: ${errorAddr}`);
48
48
 
49
49
  // Throws error when no string is passed & no accounts found in RPC
50
- client.getAccounts.mockResolvedValueOnce([]);
50
+ client.getRegisteredAccounts.mockResolvedValueOnce([]);
51
51
  await expect(
52
52
  (async () => {
53
53
  await getTxSender(client);
package/src/utils.ts CHANGED
@@ -104,7 +104,7 @@ export async function getTxSender(client: AztecRPC, _from?: string) {
104
104
  throw new Error(`Invalid option 'from' passed: ${_from}`);
105
105
  }
106
106
  } else {
107
- const accounts = await client.getAccounts();
107
+ const accounts = await client.getRegisteredAccounts();
108
108
  if (!accounts.length) {
109
109
  throw new Error('No accounts found in Aztec RPC instance.');
110
110
  }
package/Dockerfile DELETED
@@ -1,15 +0,0 @@
1
- FROM 278380418400.dkr.ecr.eu-west-2.amazonaws.com/yarn-project-base AS builder
2
-
3
- COPY . .
4
-
5
- WORKDIR /usr/src/yarn-project/cli
6
- RUN yarn build && yarn formatting && yarn test
7
-
8
- # Prune dev dependencies. See comment in base image.
9
- RUN yarn cache clean
10
- RUN yarn workspaces focus --production > /dev/null
11
-
12
- FROM node:18-alpine
13
- COPY --from=builder /usr/src/ /usr/src/
14
- WORKDIR /usr/src/yarn-project/cli
15
- ENTRYPOINT ["yarn", "start"]