@agoric/wallet 0.19.0-u18.0 → 0.19.0-u18.1
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/CHANGELOG.md +17 -0
- package/api/CHANGELOG.md +41 -0
- package/api/bundles/bundle-wallet-js-meta.json +227 -377
- package/api/bundles/bundle-wallet.js +1 -1
- package/api/package.json +21 -21
- package/api/src/lib-dehydrate.js +1 -7
- package/api/src/lib-wallet.js +0 -8
- package/api/src/wallet.js +3 -2
- package/package.json +3 -2
package/api/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/wallet-backend",
|
|
3
|
-
"version": "0.15.0-u18.
|
|
3
|
+
"version": "0.15.0-u18.5",
|
|
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-u18.
|
|
18
|
-
"@endo/bundle-source": "^3.
|
|
19
|
-
"@endo/far": "^1.1.
|
|
20
|
-
"@endo/init": "^1.1.
|
|
17
|
+
"@agoric/vats": "^0.16.0-u18.5",
|
|
18
|
+
"@endo/bundle-source": "^3.5.0",
|
|
19
|
+
"@endo/far": "^1.1.9",
|
|
20
|
+
"@endo/init": "^1.1.7",
|
|
21
21
|
"ava": "^5.3.0"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@agoric/cache": "^0.3.3-u18.
|
|
25
|
-
"@agoric/ertp": "^0.16.3-u18.
|
|
26
|
-
"@agoric/internal": "^0.4.0-u18.
|
|
27
|
-
"@agoric/notifier": "^0.7.0-u18.
|
|
28
|
-
"@agoric/smart-wallet": "^0.5.4-u18.
|
|
29
|
-
"@agoric/store": "^0.9.3-u18.
|
|
30
|
-
"@agoric/time": "^0.3.3-u18.
|
|
31
|
-
"@agoric/vat-data": "^0.5.3-u18.
|
|
32
|
-
"@agoric/zoe": "^0.26.3-u18.
|
|
33
|
-
"@agoric/zone": "^0.3.0-u18.
|
|
34
|
-
"@endo/errors": "^1.2.
|
|
35
|
-
"@endo/eventual-send": "^1.2.
|
|
36
|
-
"@endo/marshal": "^1.6.
|
|
37
|
-
"@endo/nat": "^5.0.
|
|
38
|
-
"@endo/promise-kit": "^1.1.
|
|
24
|
+
"@agoric/cache": "^0.3.3-u18.1",
|
|
25
|
+
"@agoric/ertp": "^0.16.3-u18.1",
|
|
26
|
+
"@agoric/internal": "^0.4.0-u18.1",
|
|
27
|
+
"@agoric/notifier": "^0.7.0-u18.1",
|
|
28
|
+
"@agoric/smart-wallet": "^0.5.4-u18.5",
|
|
29
|
+
"@agoric/store": "^0.9.3-u18.1",
|
|
30
|
+
"@agoric/time": "^0.3.3-u18.1",
|
|
31
|
+
"@agoric/vat-data": "^0.5.3-u18.1",
|
|
32
|
+
"@agoric/zoe": "^0.26.3-u18.1",
|
|
33
|
+
"@agoric/zone": "^0.3.0-u18.1",
|
|
34
|
+
"@endo/errors": "^1.2.8",
|
|
35
|
+
"@endo/eventual-send": "^1.2.8",
|
|
36
|
+
"@endo/marshal": "^1.6.2",
|
|
37
|
+
"@endo/nat": "^5.0.13",
|
|
38
|
+
"@endo/promise-kit": "^1.1.8",
|
|
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": "
|
|
68
|
+
"gitHead": "f8c45b8a2e29a51522a81a6692af25b2d7f6b50f"
|
|
69
69
|
}
|
package/api/src/lib-dehydrate.js
CHANGED
|
@@ -54,7 +54,6 @@ export const makeDehydrator = (initialUnnamedCount = 0) => {
|
|
|
54
54
|
if (!isPath(strongname)) {
|
|
55
55
|
return strongname;
|
|
56
56
|
}
|
|
57
|
-
// eslint-disable-next-line no-use-before-define
|
|
58
57
|
const { valToPetname: rootToPetname } = edgeMapping;
|
|
59
58
|
const petname = rootToPetname.get(strongname[0]);
|
|
60
59
|
assert(!isPath(petname));
|
|
@@ -73,7 +72,6 @@ export const makeDehydrator = (initialUnnamedCount = 0) => {
|
|
|
73
72
|
|
|
74
73
|
// A strong path must have a root name we have mapped.
|
|
75
74
|
const path = [...strongname];
|
|
76
|
-
// eslint-disable-next-line no-use-before-define
|
|
77
75
|
const { petnameToVal: petnameToRoot } = edgeMapping;
|
|
78
76
|
if (!petnameToRoot.has(path[0])) {
|
|
79
77
|
// Avoid asserting, which fills up the logs.
|
|
@@ -163,11 +161,7 @@ export const makeDehydrator = (initialUnnamedCount = 0) => {
|
|
|
163
161
|
const addPath = (path, val) => {
|
|
164
162
|
isPath(path) || Fail`path ${q(path)} must be an array of strings`;
|
|
165
163
|
|
|
166
|
-
if (
|
|
167
|
-
!valToPetname.has(val) &&
|
|
168
|
-
// eslint-disable-next-line no-use-before-define
|
|
169
|
-
edgeMapping.valToPetname.has(path[0])
|
|
170
|
-
) {
|
|
164
|
+
if (!valToPetname.has(val) && edgeMapping.valToPetname.has(path[0])) {
|
|
171
165
|
// We have a petname for the root of the path, so use it as our
|
|
172
166
|
// strongname.
|
|
173
167
|
valToPetname.init(val, path);
|
package/api/src/lib-wallet.js
CHANGED
|
@@ -409,7 +409,6 @@ export function makeWalletRoot({
|
|
|
409
409
|
Object.entries(pursePetnameValueKeywordRecord).map(
|
|
410
410
|
([keyword, { pursePetname, value, amount, purse }]) => {
|
|
411
411
|
if (!amount) {
|
|
412
|
-
// eslint-disable-next-line no-use-before-define
|
|
413
412
|
purse = getPurse(pursePetname);
|
|
414
413
|
amount = { value };
|
|
415
414
|
} else {
|
|
@@ -642,7 +641,6 @@ export function makeWalletRoot({
|
|
|
642
641
|
|
|
643
642
|
// Now send it back to the purse.
|
|
644
643
|
try {
|
|
645
|
-
// eslint-disable-next-line no-use-before-define
|
|
646
644
|
return addPayment(payment, purse);
|
|
647
645
|
} finally {
|
|
648
646
|
// Once we've called addPayment, mark this one as done.
|
|
@@ -688,7 +686,6 @@ export function makeWalletRoot({
|
|
|
688
686
|
// we still make it a normal incoming payment.
|
|
689
687
|
const purseOrUndefined = purseKeywordRecord[keyword];
|
|
690
688
|
|
|
691
|
-
// eslint-disable-next-line no-use-before-define
|
|
692
689
|
return addPayment(payoutP, purseOrUndefined);
|
|
693
690
|
}),
|
|
694
691
|
);
|
|
@@ -718,7 +715,6 @@ export function makeWalletRoot({
|
|
|
718
715
|
const already = brandMapping.valToPetname.has(brand);
|
|
719
716
|
petnameForBrand = brandMapping.suggestPetname(petnameForBrand, brand);
|
|
720
717
|
if (!already && makePurse) {
|
|
721
|
-
// eslint-disable-next-line no-use-before-define
|
|
722
718
|
p = makeEmptyPurse(petnameForBrand, petnameForBrand, true);
|
|
723
719
|
} else {
|
|
724
720
|
p = Promise.resolve(undefined);
|
|
@@ -821,7 +817,6 @@ export function makeWalletRoot({
|
|
|
821
817
|
if (defaultAutoDeposit && !brandToAutoDepositPurse.has(brand)) {
|
|
822
818
|
// Try to initialize the autodeposit purse for this brand.
|
|
823
819
|
// Don't do state updates, since we'll do that next.
|
|
824
|
-
// eslint-disable-next-line no-use-before-define
|
|
825
820
|
await doEnableAutoDeposit(petnameForPurse, false);
|
|
826
821
|
}
|
|
827
822
|
|
|
@@ -943,7 +938,6 @@ export function makeWalletRoot({
|
|
|
943
938
|
arguments: args,
|
|
944
939
|
} = compileProposal(offer.proposalTemplate);
|
|
945
940
|
|
|
946
|
-
// eslint-disable-next-line no-use-before-define
|
|
947
941
|
const zoeIssuer = issuerManager.get(ZOE_INVITE_BRAND_PETNAME);
|
|
948
942
|
const { brand: invitationBrand } = brandTable.getByIssuer(zoeIssuer);
|
|
949
943
|
const invitationP = findOrMakeInvitation(
|
|
@@ -1158,7 +1152,6 @@ export function makeWalletRoot({
|
|
|
1158
1152
|
return;
|
|
1159
1153
|
}
|
|
1160
1154
|
|
|
1161
|
-
// eslint-disable-next-line no-use-before-define
|
|
1162
1155
|
await addPayment(E.get(compiledOfferP).inviteP).catch(console.error);
|
|
1163
1156
|
}
|
|
1164
1157
|
|
|
@@ -1481,7 +1474,6 @@ export function makeWalletRoot({
|
|
|
1481
1474
|
// suggestion can be rejected and the suggested petname can be
|
|
1482
1475
|
// changed
|
|
1483
1476
|
return acceptPetname(
|
|
1484
|
-
// eslint-disable-next-line no-use-before-define
|
|
1485
1477
|
installationManager.add,
|
|
1486
1478
|
suggestedPetname,
|
|
1487
1479
|
installationHandleBoardId,
|
package/api/src/wallet.js
CHANGED
|
@@ -9,8 +9,9 @@
|
|
|
9
9
|
* types.js file.
|
|
10
10
|
*/
|
|
11
11
|
import { E } from '@endo/eventual-send';
|
|
12
|
-
import { makeNotifierKit, observeIteration } from '@agoric/notifier';
|
|
13
12
|
import { Far } from '@endo/marshal';
|
|
13
|
+
import { deepCopyJsonable } from '@agoric/internal/src/js-utils.js';
|
|
14
|
+
import { makeNotifierKit, observeIteration } from '@agoric/notifier';
|
|
14
15
|
|
|
15
16
|
import { makeWalletRoot } from './lib-wallet.js';
|
|
16
17
|
import pubsub from './pubsub.js';
|
|
@@ -54,7 +55,7 @@ export function buildRootObject(vatPowers) {
|
|
|
54
55
|
const offerSubscriptions = new Map();
|
|
55
56
|
|
|
56
57
|
const httpSend = (obj, channelHandles) =>
|
|
57
|
-
E(http).send(
|
|
58
|
+
E(http).send(deepCopyJsonable(obj), channelHandles);
|
|
58
59
|
|
|
59
60
|
const pushOfferSubscriptions = (channelHandle, offers) => {
|
|
60
61
|
const subs = offerSubscriptions.get(channelHandle);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/wallet",
|
|
3
|
-
"version": "0.19.0-u18.
|
|
3
|
+
"version": "0.19.0-u18.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
"build": "exit 0"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
+
"@agoric/internal": "^0.4.0-u18.1",
|
|
22
23
|
"@agoric/wallet-ui": "0.1.3-solo.0",
|
|
23
24
|
"babel-eslint": "^10.0.3",
|
|
24
25
|
"eslint-plugin-eslint-comments": "^3.1.2",
|
|
@@ -27,5 +28,5 @@
|
|
|
27
28
|
"publishConfig": {
|
|
28
29
|
"access": "public"
|
|
29
30
|
},
|
|
30
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "f8c45b8a2e29a51522a81a6692af25b2d7f6b50f"
|
|
31
32
|
}
|