@agoric/smart-wallet 0.5.4-dev-7390224.0 → 0.5.4-dev-d1562a1.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/smart-wallet",
3
- "version": "0.5.4-dev-7390224.0+7390224",
3
+ "version": "0.5.4-dev-d1562a1.0+d1562a1",
4
4
  "description": "Wallet contract",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -17,9 +17,9 @@
17
17
  "lint:eslint": "eslint ."
18
18
  },
19
19
  "devDependencies": {
20
- "@agoric/casting": "0.4.3-dev-7390224.0+7390224",
21
- "@agoric/cosmic-proto": "0.4.1-dev-7390224.0+7390224",
22
- "@agoric/swingset-vat": "0.32.3-dev-7390224.0+7390224",
20
+ "@agoric/casting": "0.4.3-dev-d1562a1.0+d1562a1",
21
+ "@agoric/cosmic-proto": "0.4.1-dev-d1562a1.0+d1562a1",
22
+ "@agoric/swingset-vat": "0.32.3-dev-d1562a1.0+d1562a1",
23
23
  "@endo/bundle-source": "^3.4.2",
24
24
  "@endo/captp": "^4.4.2",
25
25
  "@endo/init": "^1.1.6",
@@ -27,15 +27,15 @@
27
27
  "import-meta-resolve": "^2.2.1"
28
28
  },
29
29
  "dependencies": {
30
- "@agoric/ertp": "0.16.3-dev-7390224.0+7390224",
31
- "@agoric/internal": "0.3.3-dev-7390224.0+7390224",
32
- "@agoric/notifier": "0.6.3-dev-7390224.0+7390224",
33
- "@agoric/store": "0.9.3-dev-7390224.0+7390224",
34
- "@agoric/vat-data": "0.5.3-dev-7390224.0+7390224",
35
- "@agoric/vats": "0.15.2-dev-7390224.0+7390224",
36
- "@agoric/vow": "0.1.1-dev-7390224.0+7390224",
37
- "@agoric/zoe": "0.26.3-dev-7390224.0+7390224",
38
- "@agoric/zone": "0.2.3-dev-7390224.0+7390224",
30
+ "@agoric/ertp": "0.16.3-dev-d1562a1.0+d1562a1",
31
+ "@agoric/internal": "0.3.3-dev-d1562a1.0+d1562a1",
32
+ "@agoric/notifier": "0.6.3-dev-d1562a1.0+d1562a1",
33
+ "@agoric/store": "0.9.3-dev-d1562a1.0+d1562a1",
34
+ "@agoric/vat-data": "0.5.3-dev-d1562a1.0+d1562a1",
35
+ "@agoric/vats": "0.15.2-dev-d1562a1.0+d1562a1",
36
+ "@agoric/vow": "0.1.1-dev-d1562a1.0+d1562a1",
37
+ "@agoric/zoe": "0.26.3-dev-d1562a1.0+d1562a1",
38
+ "@agoric/zone": "0.2.3-dev-d1562a1.0+d1562a1",
39
39
  "@endo/errors": "^1.2.7",
40
40
  "@endo/eventual-send": "^1.2.7",
41
41
  "@endo/far": "^1.1.8",
@@ -72,5 +72,5 @@
72
72
  "typeCoverage": {
73
73
  "atLeast": 94.64
74
74
  },
75
- "gitHead": "739022455dbfb7e7d7d90e8ae7cef948cde3e97a"
75
+ "gitHead": "d1562a131b6712dc4c5b11d91afccd0f7f0a05e6"
76
76
  }
@@ -1,4 +1,4 @@
1
- export function makeWatchOfferOutcomes(vowTools: VowTools): (watchers: OutcomeWatchers, seat: UserSeat) => Promise<any>;
1
+ export function makeWatchOfferOutcomes(vowTools: VowTools): (watchers: OutcomeWatchers, seat: UserSeat) => Promise<any[]>;
2
2
  export function prepareOfferWatcher(baggage: Baggage, vowTools: VowTools): (walletHelper: any, deposit: {
3
3
  receive: (payment: Payment) => Promise<Amount>;
4
4
  }, offerSpec: OfferSpec, address: string, invitationAmount: import("@agoric/ertp").SetAmount<import("@endo/patterns").Key>, seatRef: UserSeat<unknown>) => import("@endo/exo").GuardedKit<{
@@ -1 +1 @@
1
- {"version":3,"file":"offerWatcher.d.ts","sourceRoot":"","sources":["offerWatcher.js"],"names":[],"mappings":"AAwEO,iDADK,QAAQ,cAKP,eAAe,QACf,QAAQ,kBAYpB;AAmCM,6CAHI,OAAO,YACP,QAAQ;aAWO,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAA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OAAO,YAAY,EAAE,iBAAiB;QAkBjD,uDAAuD;8BAA3C,QAAQ,GAAG,qBAAqB;QAoC5C;;;;;;WAMG;yBADQ,KAAK;;IAclB,gDAAgD;oBAArC,eAAe,CAAC,gBAAgB,CAAC;IA+B5C,+CAA+C;mBAApC,eAAe,CAAC,eAAe,CAAC;IA0B3C,iDAAiD;qBAAtC,eAAe,CAAC,iBAAiB,CAAC;GA2BlD;;;;gCA5SkB,CAAC,oBACP,eAAe,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC;8BAI7B;IACR,aAAa,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IAC7C,eAAe,EAAE,mBAAmB,CAAC,MAAM,CAAC,CAAC;IAC7C,cAAc,EAAE,mBAAmB,CAAC,qBAAqB,CAAC,CAAC;CAC5D;+BAsSU,UAAU,CAAC,OAAO,mBAAmB,CAAC;2BACtC,UAAU,CAAC,gBAAgB,CAAC;8BApTV,aAAa;6BADnB,kBAAkB;+BAJhB,aAAa;8BAEd,kBAAkB;2CADL,YAAY;oCAEnB,4BAA4B"}
@@ -72,13 +72,18 @@ const watchForPayout = ({ paymentWatcher }, seat) => {
72
72
  /** @param {VowTools} vowTools */
73
73
  export const makeWatchOfferOutcomes = vowTools => {
74
74
  const watchForOfferResult = makeWatchForOfferResult(vowTools);
75
- const { asPromise, allVows } = vowTools;
75
+ const { when, allVows } = vowTools;
76
76
  /**
77
77
  * @param {OutcomeWatchers} watchers
78
78
  * @param {UserSeat} seat
79
79
  */
80
80
  const watchOfferOutcomes = (watchers, seat) => {
81
- return asPromise(
81
+ // Use `when` to get a promise from the vow.
82
+ // Unlike `asPromise` this doesn't warn in case of disconnections, which is
83
+ // fine since we actually handle the outcome durably through the watchers.
84
+ // Only the `executeOffer` caller relies on the settlement of this promise,
85
+ // and only in tests.
86
+ return when(
82
87
  allVows([
83
88
  watchForOfferResult(watchers, seat),
84
89
  watchForNumWants(watchers, seat),