@agoric/wallet 0.19.0-u16.0 → 0.19.0-u17.0

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.
package/api/deploy.js CHANGED
@@ -2,8 +2,8 @@
2
2
  // Agoric wallet deployment script.
3
3
  // FIXME: This is just hacked together for the legacy wallet.
4
4
 
5
+ import { Fail } from '@endo/errors';
5
6
  import { E } from '@endo/eventual-send';
6
- import { Fail } from '@agoric/assert';
7
7
  import path from 'path';
8
8
 
9
9
  const dirname = path.dirname(new URL(import.meta.url).pathname);
@@ -16,6 +16,7 @@ export default async function deployWallet(
16
16
  // console.log('have home', home);
17
17
  const {
18
18
  agoric: {
19
+ DISCONNECTED,
19
20
  agoricNames,
20
21
  bank,
21
22
  namesByAddress,
@@ -27,6 +28,11 @@ export default async function deployWallet(
27
28
  local: { http, localTimerService, spawner, wallet: oldWallet, scratch },
28
29
  } = home;
29
30
 
31
+ if (DISCONNECTED) {
32
+ console.warn(DISCONNECTED);
33
+ return;
34
+ }
35
+
30
36
  let walletVat = await E(scratch).get('wallet/api');
31
37
  if (!walletVat) {
32
38
  // Bundle the wallet sources.
package/api/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agoric/wallet-backend",
3
- "version": "0.15.0-u16.0",
3
+ "version": "0.15.0-u17.0",
4
4
  "description": "Wallet backend",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -14,28 +14,28 @@
14
14
  "lint:eslint": "eslint ."
15
15
  },
16
16
  "devDependencies": {
17
- "@agoric/vats": "^0.16.0-u16.0",
18
- "@endo/bundle-source": "^3.2.3",
19
- "@endo/far": "^1.1.2",
20
- "@endo/init": "^1.1.2",
17
+ "@agoric/vats": "^0.16.0-u17.0",
18
+ "@endo/bundle-source": "^3.4.0",
19
+ "@endo/far": "^1.1.5",
20
+ "@endo/init": "^1.1.4",
21
21
  "ava": "^5.3.0"
22
22
  },
23
23
  "dependencies": {
24
- "@agoric/assert": "^0.6.1-u16.0",
25
- "@agoric/cache": "^0.3.3-u16.0",
26
- "@agoric/ertp": "^0.16.3-u16.0",
27
- "@agoric/internal": "^0.4.0-u16.0",
28
- "@agoric/notifier": "^0.7.0-u16.0",
29
- "@agoric/smart-wallet": "^0.5.4-u16.0",
30
- "@agoric/store": "^0.9.3-u16.0",
31
- "@agoric/time": "^0.3.3-u16.0",
32
- "@agoric/vat-data": "^0.5.3-u16.0",
33
- "@agoric/zoe": "^0.26.3-u16.0",
34
- "@agoric/zone": "^0.3.0-u16.0",
35
- "@endo/eventual-send": "^1.2.2",
36
- "@endo/marshal": "^1.5.0",
37
- "@endo/nat": "^5.0.7",
38
- "@endo/promise-kit": "^1.1.2",
24
+ "@agoric/cache": "^0.3.3-u17.0",
25
+ "@agoric/ertp": "^0.16.3-u17.0",
26
+ "@agoric/internal": "^0.4.0-u17.0",
27
+ "@agoric/notifier": "^0.7.0-u17.0",
28
+ "@agoric/smart-wallet": "^0.5.4-u17.0",
29
+ "@agoric/store": "^0.9.3-u17.0",
30
+ "@agoric/time": "^0.3.3-u17.0",
31
+ "@agoric/vat-data": "^0.5.3-u17.0",
32
+ "@agoric/zoe": "^0.26.3-u17.0",
33
+ "@agoric/zone": "^0.3.0-u17.0",
34
+ "@endo/errors": "^1.2.5",
35
+ "@endo/eventual-send": "^1.2.5",
36
+ "@endo/marshal": "^1.5.3",
37
+ "@endo/nat": "^5.0.10",
38
+ "@endo/promise-kit": "^1.1.5",
39
39
  "import-meta-resolve": "^2.2.1"
40
40
  },
41
41
  "keywords": [],
@@ -65,5 +65,5 @@
65
65
  "typeCoverage": {
66
66
  "atLeast": 0
67
67
  },
68
- "gitHead": "bbdf652c3f413381cb352a8a360db1063974fafd"
68
+ "gitHead": "515c4c0efccfc91b97da30037c10fc4b076851e2"
69
69
  }
@@ -1,4 +1,4 @@
1
- import { assert, Fail, q } from '@agoric/assert';
1
+ import { assert, Fail, q } from '@endo/errors';
2
2
  import { E } from '@endo/eventual-send';
3
3
  import { passStyleOf } from '@endo/marshal';
4
4
  import { AmountMath } from '@agoric/ertp';
@@ -1,6 +1,6 @@
1
1
  // @ts-check
2
2
 
3
- import { assert } from '@agoric/assert';
3
+ import { assert } from '@endo/errors';
4
4
  import { E } from '@endo/eventual-send';
5
5
 
6
6
  import { makeScalarWeakMapStore } from '@agoric/store';
@@ -1,8 +1,8 @@
1
1
  // @ts-check
2
2
 
3
+ import { assert, Fail, q } from '@endo/errors';
3
4
  import { makeMarshal, mapIterable } from '@endo/marshal';
4
5
  import { makeLegacyMap, makeScalarMapStore } from '@agoric/store';
5
- import { assert, Fail, q } from '@agoric/assert';
6
6
 
7
7
  /**
8
8
  * @typedef {string[]} Path
@@ -11,7 +11,7 @@
11
11
  * and dapps.
12
12
  */
13
13
 
14
- import { assert, q, Fail } from '@agoric/assert';
14
+ import { assert, q, Fail } from '@endo/errors';
15
15
  import { makeScalarStoreCoordinator } from '@agoric/cache';
16
16
  import { objectMap, WalletName } from '@agoric/internal';
17
17
  import { slotStringUnserialize } from '@agoric/internal/src/storage-test-utils.js';
@@ -1682,7 +1682,7 @@ export function makeWalletRoot({
1682
1682
  (kind, lookup) =>
1683
1683
  (...path) => {
1684
1684
  path.length === 1 ||
1685
- Fail`${assert.quote(
1685
+ Fail`${q(
1686
1686
  kind,
1687
1687
  )} lookup must be called with a single offer ID, not ${path}`;
1688
1688
  return lookup(path[0]);
package/api/src/pubsub.js CHANGED
@@ -11,9 +11,9 @@ export default function makePubsub(E) {
11
11
  },
12
12
  publish(m) {
13
13
  lastPublished = m;
14
- subscribers.forEach(s => {
14
+ for (const s of subscribers) {
15
15
  E(s).notify(m);
16
- });
16
+ }
17
17
  },
18
18
  });
19
19
  }
package/api/src/wallet.js CHANGED
@@ -58,7 +58,7 @@ export function buildRootObject(vatPowers) {
58
58
 
59
59
  const pushOfferSubscriptions = (channelHandle, offers) => {
60
60
  const subs = offerSubscriptions.get(channelHandle);
61
- (subs || []).forEach(({ origin, status }) => {
61
+ for (const { origin, status } of subs || []) {
62
62
  // Filter by optional status and origin.
63
63
  const result = harden(
64
64
  offers.filter(
@@ -75,7 +75,7 @@ export function buildRootObject(vatPowers) {
75
75
  },
76
76
  [channelHandle],
77
77
  );
78
- });
78
+ }
79
79
  };
80
80
 
81
81
  const subscribeToOffers = (channelHandle, { origin, status = null }) => {
@@ -1,16 +1,15 @@
1
1
  // @ts-check
2
2
  import { test as anyTest } from '@agoric/zoe/tools/prepare-test-env-ava.js';
3
3
 
4
+ import { assert } from '@endo/errors';
5
+ import { E } from '@endo/eventual-send';
4
6
  import bundleSource from '@endo/bundle-source';
5
- import { makeCache } from '@agoric/cache';
6
- import { makeIssuerKit, AmountMath, AssetKind } from '@agoric/ertp';
7
7
 
8
8
  import { M } from '@agoric/store';
9
-
9
+ import { makeCache } from '@agoric/cache';
10
+ import { makeIssuerKit, AmountMath, AssetKind } from '@agoric/ertp';
10
11
  import { makeZoeForTest } from '@agoric/zoe/tools/setup-zoe.js';
11
- import { E } from '@endo/eventual-send';
12
12
 
13
- import { assert } from '@agoric/assert';
14
13
  import { makeFakeBoard } from '@agoric/vats/tools/board-utils.js';
15
14
  import {
16
15
  makeNameHubKit,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agoric/wallet",
3
- "version": "0.19.0-u16.0",
3
+ "version": "0.19.0-u17.0",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "license": "Apache-2.0",
@@ -27,5 +27,5 @@
27
27
  "publishConfig": {
28
28
  "access": "public"
29
29
  },
30
- "gitHead": "bbdf652c3f413381cb352a8a360db1063974fafd"
30
+ "gitHead": "515c4c0efccfc91b97da30037c10fc4b076851e2"
31
31
  }