@agoric/wallet-backend 0.14.3 → 0.14.4-dev-8c14632.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/bundles/bundle-wallet-js-meta.json +241 -241
- package/bundles/bundle-wallet.js +1 -1
- package/package.json +14 -14
- package/src/lib-wallet.js +28 -22
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/wallet-backend",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.4-dev-8c14632.0+8c14632",
|
|
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": "
|
|
17
|
+
"@agoric/vats": "0.15.2-dev-8c14632.0+8c14632",
|
|
18
18
|
"@endo/bundle-source": "^2.5.1",
|
|
19
19
|
"@endo/init": "^0.5.56",
|
|
20
|
-
"ava": "^5.
|
|
20
|
+
"ava": "^5.3.0"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@agoric/assert": "
|
|
24
|
-
"@agoric/cache": "
|
|
25
|
-
"@agoric/ertp": "
|
|
26
|
-
"@agoric/internal": "
|
|
27
|
-
"@agoric/notifier": "
|
|
28
|
-
"@agoric/smart-wallet": "
|
|
29
|
-
"@agoric/store": "
|
|
30
|
-
"@agoric/time": "
|
|
31
|
-
"@agoric/vat-data": "
|
|
32
|
-
"@agoric/zoe": "
|
|
23
|
+
"@agoric/assert": "0.6.1-dev-8c14632.0+8c14632",
|
|
24
|
+
"@agoric/cache": "0.3.3-dev-8c14632.0+8c14632",
|
|
25
|
+
"@agoric/ertp": "0.16.3-dev-8c14632.0+8c14632",
|
|
26
|
+
"@agoric/internal": "0.3.3-dev-8c14632.0+8c14632",
|
|
27
|
+
"@agoric/notifier": "0.6.3-dev-8c14632.0+8c14632",
|
|
28
|
+
"@agoric/smart-wallet": "0.5.4-dev-8c14632.0+8c14632",
|
|
29
|
+
"@agoric/store": "0.9.3-dev-8c14632.0+8c14632",
|
|
30
|
+
"@agoric/time": "0.3.3-dev-8c14632.0+8c14632",
|
|
31
|
+
"@agoric/vat-data": "0.5.3-dev-8c14632.0+8c14632",
|
|
32
|
+
"@agoric/zoe": "0.26.3-dev-8c14632.0+8c14632",
|
|
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": "
|
|
60
|
+
"gitHead": "8c14632298cfb982f91dc0ef271681703237a93f"
|
|
61
61
|
}
|
package/src/lib-wallet.js
CHANGED
|
@@ -1209,6 +1209,7 @@ export function makeWalletRoot({
|
|
|
1209
1209
|
updateInboxState(id, rejectOffer);
|
|
1210
1210
|
};
|
|
1211
1211
|
|
|
1212
|
+
await null;
|
|
1212
1213
|
try {
|
|
1213
1214
|
const pendingOffer = addMeta({
|
|
1214
1215
|
...offer,
|
|
@@ -1372,6 +1373,7 @@ export function makeWalletRoot({
|
|
|
1372
1373
|
brandToAutoDepositPurse.init(brand, purse);
|
|
1373
1374
|
}
|
|
1374
1375
|
|
|
1376
|
+
await null;
|
|
1375
1377
|
if (updateState) {
|
|
1376
1378
|
await updateAllPurseState();
|
|
1377
1379
|
}
|
|
@@ -1893,28 +1895,32 @@ export function makeWalletRoot({
|
|
|
1893
1895
|
// don't really trust.
|
|
1894
1896
|
// The param is{import('@agoric/vats/src/vat-bank.js').Bank} but that here triggers https://github.com/Agoric/agoric-sdk/issues/4620
|
|
1895
1897
|
const importBankAssets = async bank => {
|
|
1896
|
-
observeIteration(
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1898
|
+
observeIteration(
|
|
1899
|
+
subscribeEach(E(bank).getAssetSubscription()),
|
|
1900
|
+
harden({
|
|
1901
|
+
async updateState({ proposedName, issuerName, issuer, brand }) {
|
|
1902
|
+
await null;
|
|
1903
|
+
try {
|
|
1904
|
+
issuerName = await addIssuer(issuerName, issuer);
|
|
1905
|
+
const purse = await E(bank).getPurse(brand);
|
|
1906
|
+
// We can import this purse, because we trust the bank.
|
|
1907
|
+
await internalUnsafeImportPurse(
|
|
1908
|
+
issuerName,
|
|
1909
|
+
proposedName,
|
|
1910
|
+
true,
|
|
1911
|
+
purse,
|
|
1912
|
+
);
|
|
1913
|
+
} catch (e) {
|
|
1914
|
+
console.error('/// could not add bank asset purse', e, {
|
|
1915
|
+
issuerName,
|
|
1916
|
+
proposedName,
|
|
1917
|
+
issuer,
|
|
1918
|
+
brand,
|
|
1919
|
+
});
|
|
1920
|
+
}
|
|
1921
|
+
},
|
|
1922
|
+
}),
|
|
1923
|
+
).finally(() => console.error('/// This is the end of the bank assets'));
|
|
1918
1924
|
};
|
|
1919
1925
|
return {
|
|
1920
1926
|
admin: wallet,
|