@agoric/wallet-backend 0.13.4-dev-8c6e4b2.0 → 0.13.4-dev-e816b60.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agoric/wallet-backend",
3
- "version": "0.13.4-dev-8c6e4b2.0+8c6e4b2",
3
+ "version": "0.13.4-dev-e816b60.0+e816b60",
4
4
  "description": "Wallet backend",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -14,22 +14,22 @@
14
14
  "lint:eslint": "eslint ."
15
15
  },
16
16
  "devDependencies": {
17
- "@agoric/vats": "0.13.1-dev-8c6e4b2.0+8c6e4b2",
17
+ "@agoric/vats": "0.13.1-dev-e816b60.0+e816b60",
18
18
  "@endo/bundle-source": "^2.5.1",
19
19
  "@endo/init": "^0.5.56",
20
20
  "ava": "^5.2.0"
21
21
  },
22
22
  "dependencies": {
23
- "@agoric/assert": "0.5.2-dev-8c6e4b2.0+8c6e4b2",
24
- "@agoric/cache": "0.2.4-dev-8c6e4b2.0+8c6e4b2",
25
- "@agoric/ertp": "0.15.4-dev-8c6e4b2.0+8c6e4b2",
26
- "@agoric/internal": "0.2.2-dev-8c6e4b2.0+8c6e4b2",
27
- "@agoric/notifier": "0.5.2-dev-8c6e4b2.0+8c6e4b2",
28
- "@agoric/smart-wallet": "0.4.3-dev-8c6e4b2.0+8c6e4b2",
29
- "@agoric/store": "0.8.4-dev-8c6e4b2.0+8c6e4b2",
30
- "@agoric/time": "0.2.2-dev-8c6e4b2.0+8c6e4b2",
31
- "@agoric/vat-data": "0.4.4-dev-8c6e4b2.0+8c6e4b2",
32
- "@agoric/zoe": "0.25.4-dev-8c6e4b2.0+8c6e4b2",
23
+ "@agoric/assert": "0.5.2-dev-e816b60.0+e816b60",
24
+ "@agoric/cache": "0.2.4-dev-e816b60.0+e816b60",
25
+ "@agoric/ertp": "0.15.4-dev-e816b60.0+e816b60",
26
+ "@agoric/internal": "0.2.2-dev-e816b60.0+e816b60",
27
+ "@agoric/notifier": "0.5.2-dev-e816b60.0+e816b60",
28
+ "@agoric/smart-wallet": "0.4.3-dev-e816b60.0+e816b60",
29
+ "@agoric/store": "0.8.4-dev-e816b60.0+e816b60",
30
+ "@agoric/time": "0.2.2-dev-e816b60.0+e816b60",
31
+ "@agoric/vat-data": "0.4.4-dev-e816b60.0+e816b60",
32
+ "@agoric/zoe": "0.25.4-dev-e816b60.0+e816b60",
33
33
  "@endo/eventual-send": "^0.17.2",
34
34
  "@endo/marshal": "^0.8.5",
35
35
  "@endo/nat": "^4.1.27",
@@ -57,5 +57,5 @@
57
57
  "publishConfig": {
58
58
  "access": "public"
59
59
  },
60
- "gitHead": "8c6e4b219ca371fca79a536335b2423f2de48ef9"
60
+ "gitHead": "e816b60793132a5b2c94001250c85248a0f18228"
61
61
  }
package/src/lib-wallet.js CHANGED
@@ -31,6 +31,7 @@ import {
31
31
  makeNotifierKit,
32
32
  observeIteration,
33
33
  observeNotifier,
34
+ subscribeEach,
34
35
  } from '@agoric/notifier';
35
36
  import { makePromiseKit } from '@endo/promise-kit';
36
37
 
@@ -1892,7 +1893,7 @@ export function makeWalletRoot({
1892
1893
  // don't really trust.
1893
1894
  // The param is{import('@agoric/vats/src/vat-bank.js').Bank} but that here triggers https://github.com/Agoric/agoric-sdk/issues/4620
1894
1895
  const importBankAssets = async bank => {
1895
- observeIteration(E(bank).getAssetSubscription(), {
1896
+ observeIteration(subscribeEach(E(bank).getAssetSubscription()), {
1896
1897
  async updateState({ proposedName, issuerName, issuer, brand }) {
1897
1898
  try {
1898
1899
  issuerName = await addIssuer(issuerName, issuer);
@@ -2,10 +2,9 @@
2
2
  import { test } from '@agoric/zoe/tools/prepare-test-env-ava.js';
3
3
 
4
4
  import { makeIssuerKit } from '@agoric/ertp';
5
- import { makeZoeKit } from '@agoric/zoe';
6
- import fakeVatAdmin from '@agoric/zoe/tools/fakeVatAdmin.js';
5
+ import { makeZoeForTest } from '@agoric/zoe/tools/setup-zoe.js';
7
6
  // eslint-disable-next-line import/no-extraneous-dependencies
8
- import { makeBoard } from '@agoric/vats/src/lib-board.js';
7
+ import { makeFakeBoard } from '@agoric/vats/tools/board-utils.js';
9
8
  // eslint-disable-next-line import/no-extraneous-dependencies
10
9
  import { heapZone } from '@agoric/zone';
11
10
  import {
@@ -24,8 +23,8 @@ function makeFakeMyAddressNameAdmin() {
24
23
  }
25
24
 
26
25
  const setup = async () => {
27
- const { zoeService: zoe } = makeZoeKit(fakeVatAdmin);
28
- const board = makeBoard();
26
+ const zoe = makeZoeForTest();
27
+ const board = makeFakeBoard();
29
28
 
30
29
  const pursesStateChangeHandler = _data => {};
31
30
  const inboxStateChangeHandler = _data => {};
@@ -8,13 +8,12 @@ import { makeIssuerKit, AmountMath, AssetKind } from '@agoric/ertp';
8
8
 
9
9
  import { M } from '@agoric/store';
10
10
 
11
- import { makeZoeKit } from '@agoric/zoe';
12
- import fakeVatAdmin from '@agoric/zoe/tools/fakeVatAdmin.js';
11
+ import { makeZoeForTest } from '@agoric/zoe/tools/setup-zoe.js';
13
12
  import { E } from '@endo/eventual-send';
14
13
 
15
14
  import { assert } from '@agoric/assert';
16
15
  // eslint-disable-next-line import/no-extraneous-dependencies
17
- import { makeBoard } from '@agoric/vats/src/lib-board.js';
16
+ import { makeFakeBoard } from '@agoric/vats/tools/board-utils.js';
18
17
  // eslint-disable-next-line import/no-extraneous-dependencies
19
18
  import {
20
19
  makeNameHubKit,
@@ -63,7 +62,7 @@ async function setupTest(
63
62
  const moolaBundle = makeIssuerKit('moola');
64
63
  const simoleanBundle = makeIssuerKit('simolean');
65
64
  const rpgBundle = makeIssuerKit('rpg', AssetKind.SET);
66
- const board = makeBoard();
65
+ const board = makeFakeBoard();
67
66
 
68
67
  const automaticRefundP = (automaticRefund &&
69
68
  (async () => {
@@ -142,7 +141,7 @@ const waitForUpdate = async (notifier, thunk) => {
142
141
  };
143
142
 
144
143
  test.before(async t => {
145
- const { zoeService: zoe } = makeZoeKit(fakeVatAdmin);
144
+ const zoe = makeZoeForTest();
146
145
 
147
146
  // Create AutomaticRefund instance
148
147
  const automaticRefundContractUrl = await importMetaResolve(
@@ -1496,7 +1495,7 @@ test('addOffer offer.invitation', async t => {
1496
1495
  });
1497
1496
 
1498
1497
  test('addOffer makeContinuingInvitation', async t => {
1499
- const board = makeBoard();
1498
+ const board = makeFakeBoard();
1500
1499
 
1501
1500
  // Create ContinuingInvitationExample instance
1502
1501
  const url = await importMetaResolve(
@@ -1586,7 +1585,7 @@ test('addOffer makeContinuingInvitation', async t => {
1586
1585
  });
1587
1586
 
1588
1587
  test('getZoe, getBoard', async t => {
1589
- const board = makeBoard();
1588
+ const board = makeFakeBoard();
1590
1589
 
1591
1590
  const pursesStateChangeHandler = (/** @type {any} */ _data) => {};
1592
1591
  const inboxStateChangeHandler = (/** @type {any} */ _data) => {};
@@ -1605,7 +1604,7 @@ test('getZoe, getBoard', async t => {
1605
1604
  });
1606
1605
 
1607
1606
  test('stamps from dateNow', async t => {
1608
- const board = makeBoard();
1607
+ const board = makeFakeBoard();
1609
1608
 
1610
1609
  const startDateMS = new Date(2020, 0, 1).valueOf();
1611
1610
  let currentDateMS = startDateMS;