Skip to content

Commit

Permalink
fix: @agoric/web-components version is not compatible with @agoric/rpc
Browse files Browse the repository at this point in the history
- there was a regression in #57 that broke `makeAgoricChainStorageWatcher` - it needs to take an apiUrl instead of rpc
- `makeAgoricWalletConnection` needs an rpc to work, and an api endpoint, so this change brings it up to date with the new @agoric/rpc changes
  • Loading branch information
0xpatrickdev committed Feb 3, 2024
1 parent f24a4d6 commit 2e808bb
Show file tree
Hide file tree
Showing 3 changed files with 141 additions and 12 deletions.
2 changes: 1 addition & 1 deletion ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"@agoric/rpc": "0.9.1-dev-f471a83.0",
"@agoric/store": "^0.9.2",
"@agoric/ui-components": "^0.9.0",
"@agoric/web-components": "0.12.0",
"@agoric/web-components": "^0.15.0",
"@testing-library/react": "^14.1.2",
"@types/react": "^18.2.15",
"@types/react-dom": "^18.2.7",
Expand Down
12 changes: 7 additions & 5 deletions ui/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,12 @@ const terms = {

type Wallet = Awaited<ReturnType<typeof makeAgoricWalletConnection>>;

const watcher = makeAgoricChainStorageWatcher(
'http://localhost:26657',
'agoriclocal',
);
const ENDPOINTS = {
RPC: 'http://localhost:26657',
API: 'http://localhost:1317',
};

const watcher = makeAgoricChainStorageWatcher(ENDPOINTS.API, 'agoriclocal');

interface CopyBag<T = string> {
payload: Array<[T, bigint]>;
Expand Down Expand Up @@ -84,7 +86,7 @@ const setup = async () => {

const connectWallet = async () => {
await suggestChain('https://local.agoric.net/network-config');
const wallet = await makeAgoricWalletConnection(watcher);
const wallet = await makeAgoricWalletConnection(watcher, ENDPOINTS.RPC);
useAppStore.setState({ wallet });
const { pursesNotifier } = wallet;
for await (const purses of subscribeLatest(pursesNotifier)) {
Expand Down
139 changes: 133 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,26 @@
"@endo/promise-kit" "0.2.56"
node-fetch "^2.6.0"

"@agoric/casting@^0.4.3-u13.0":
version "0.4.3-u13.0"
resolved "https://registry.yarnpkg.com/@agoric/casting/-/casting-0.4.3-u13.0.tgz#34c3df62e2455e139f548915190616771e57c9e1"
integrity sha512-c9Y9jaJ3w6oEl/6FUCA8TZnrLZEV6Lv9tn1g4of6H09EN0CBgSTqLqON+WV8Tobs3pxglYLGNJnT8DefOu0lBA==
dependencies:
"@agoric/internal" "^0.4.0-u13.0"
"@agoric/notifier" "^0.6.3-u13.0"
"@agoric/spawner" "^0.6.9-u13.0"
"@agoric/store" "^0.9.3-u13.0"
"@cosmjs/encoding" "^0.30.1"
"@cosmjs/proto-signing" "^0.30.1"
"@cosmjs/stargate" "^0.30.1"
"@cosmjs/tendermint-rpc" "^0.30.1"
"@endo/far" "0.2.18"
"@endo/init" "0.5.56"
"@endo/lockdown" "0.1.28"
"@endo/marshal" "0.8.5"
"@endo/promise-kit" "0.2.56"
node-fetch "^2.6.0"

"@agoric/cosmic-proto@^0.3.0":
version "0.3.0"
resolved "https://registry.yarnpkg.com/@agoric/cosmic-proto/-/cosmic-proto-0.3.0.tgz#c9d31d3946c91fbb1630f89d8ba63a662bcdacc5"
Expand Down Expand Up @@ -344,6 +364,21 @@
"@endo/marshal" "0.8.5"
"@endo/promise-kit" "0.2.56"

"@agoric/notifier@^0.6.3-u13.0":
version "0.6.3-u13.0"
resolved "https://registry.yarnpkg.com/@agoric/notifier/-/notifier-0.6.3-u13.0.tgz#fe9bfd05dd3bb2af459ef44e231ddacc995c4cf8"
integrity sha512-H/DOZ6KY/c+k+aWAT0vOnlO+vtSJlO7XKK8TMDImxExzRNZ0AXyTHVfLgPBmoUaqCxx6d9tupN7Do25PBvvPHg==
dependencies:
"@agoric/assert" "^0.6.1-u11wf.0"
"@agoric/internal" "^0.4.0-u13.0"
"@agoric/store" "^0.9.3-u13.0"
"@agoric/swing-store" "^0.9.2-u13.0"
"@agoric/swingset-vat" "^0.32.3-u13.0"
"@agoric/vat-data" "^0.5.3-u13.0"
"@endo/far" "0.2.18"
"@endo/marshal" "0.8.5"
"@endo/promise-kit" "0.2.56"

"@agoric/[email protected]":
version "0.9.1-dev-f471a83.0"
resolved "https://registry.yarnpkg.com/@agoric/rpc/-/rpc-0.9.1-dev-f471a83.0.tgz#dc7340d1d9fa19c0cfb02f413339165a2bcd7697"
Expand Down Expand Up @@ -433,6 +468,16 @@
"@endo/import-bundle" "0.3.4"
"@endo/marshal" "0.8.5"

"@agoric/spawner@^0.6.9-u13.0":
version "0.6.9-u13.0"
resolved "https://registry.yarnpkg.com/@agoric/spawner/-/spawner-0.6.9-u13.0.tgz#d1754c9abe392458b5050bd178c1a6d8163d08b5"
integrity sha512-gVlb5S3tEfHe9KByrrbhDipUjYaeGq7W1VQQWMSf6pNHTbnXLGHX3My9QyYvetcHreMA8AJpXqqi29eq9YoiWw==
dependencies:
"@agoric/assert" "^0.6.1-u11wf.0"
"@endo/eventual-send" "0.17.2"
"@endo/import-bundle" "0.3.4"
"@endo/marshal" "0.8.5"

"@agoric/store@^0.9.2":
version "0.9.2"
resolved "https://registry.yarnpkg.com/@agoric/store/-/store-0.9.2.tgz#0973e57b8811a70923c141fccfb002bbad8fed4b"
Expand Down Expand Up @@ -497,6 +542,19 @@
"@endo/nat" "4.1.27"
better-sqlite3 "^8.2.0"

"@agoric/swing-store@^0.9.2-u13.0":
version "0.9.2-u13.0"
resolved "https://registry.yarnpkg.com/@agoric/swing-store/-/swing-store-0.9.2-u13.0.tgz#f3150afc7de49488a98ccd23456a804ddbdb6e09"
integrity sha512-sJJlQ3HdGwZOFjIQBXW+LWDnFURzo5EYh0F9td7AYmQEZ1ZmlooH2pj0/ypGuC0r4O8eupmAQLqKQsXPSiDdeA==
dependencies:
"@agoric/assert" "^0.6.1-u11wf.0"
"@agoric/internal" "^0.4.0-u13.0"
"@endo/base64" "0.2.31"
"@endo/bundle-source" "2.5.2-upstream-rollup"
"@endo/check-bundle" "0.2.18"
"@endo/nat" "4.1.27"
better-sqlite3 "^8.2.0"

"@agoric/swingset-liveslots@^0.10.2":
version "0.10.2"
resolved "https://registry.yarnpkg.com/@agoric/swingset-liveslots/-/swingset-liveslots-0.10.2.tgz#a8d18f32ff7a611b9945f4ff920b00b9e2801e08"
Expand Down Expand Up @@ -534,6 +592,25 @@
"@endo/patterns" "0.2.2"
"@endo/promise-kit" "0.2.56"

"@agoric/swingset-liveslots@^0.10.3-u13.0":
version "0.10.3-u13.0"
resolved "https://registry.yarnpkg.com/@agoric/swingset-liveslots/-/swingset-liveslots-0.10.3-u13.0.tgz#55f0e02e1cdc214068bd948fb421c980b38804bd"
integrity sha512-csSD/nPwfOC5tgqN+e4TKFidFI3pHRQjo3WRMgeduU5+NIHEMcIyXHFLyQvuLTRhfb/5b81T8imubr5hN6itzw==
dependencies:
"@agoric/assert" "^0.6.1-u11wf.0"
"@agoric/internal" "^0.4.0-u13.0"
"@agoric/store" "^0.9.3-u13.0"
"@agoric/vat-data" "^0.5.3-u13.0"
"@endo/eventual-send" "0.17.2"
"@endo/exo" "0.2.2"
"@endo/far" "0.2.18"
"@endo/init" "0.5.56"
"@endo/marshal" "0.8.5"
"@endo/nat" "4.1.27"
"@endo/pass-style" "0.1.3"
"@endo/patterns" "0.2.2"
"@endo/promise-kit" "0.2.56"

"@agoric/swingset-vat@^0.32.2":
version "0.32.2"
resolved "https://registry.yarnpkg.com/@agoric/swingset-vat/-/swingset-vat-0.32.2.tgz#5228855132ab2701223316d86eeaef410ec6b4b6"
Expand Down Expand Up @@ -605,6 +682,42 @@
semver "^6.3.0"
tmp "^0.2.1"

"@agoric/swingset-vat@^0.32.3-u13.0":
version "0.32.3-u13.0"
resolved "https://registry.yarnpkg.com/@agoric/swingset-vat/-/swingset-vat-0.32.3-u13.0.tgz#224c02d744009a550e6162307b8adc11a4b23a9c"
integrity sha512-UY/N9QcJO3VRNC3xKoWxl81TQKbtcuXLmY+A1DgoHqdCBWxzmgSZXAVfRhAloWZUzkTIrYHV4sFpx2ewijdj9A==
dependencies:
"@agoric/assert" "^0.6.1-u11wf.0"
"@agoric/internal" "^0.4.0-u13.0"
"@agoric/store" "^0.9.3-u13.0"
"@agoric/swing-store" "^0.9.2-u13.0"
"@agoric/swingset-liveslots" "^0.10.3-u13.0"
"@agoric/swingset-xsnap-supervisor" "^0.10.3-u13.0"
"@agoric/time" "^0.3.3-u13.0"
"@agoric/vat-data" "^0.5.3-u13.0"
"@agoric/xsnap" "^0.14.3-u13.0"
"@agoric/xsnap-lockdown" "^0.14.1-u13.0"
"@endo/base64" "0.2.31"
"@endo/bundle-source" "2.5.2-upstream-rollup"
"@endo/captp" "3.1.1"
"@endo/check-bundle" "0.2.18"
"@endo/compartment-mapper" "0.8.4"
"@endo/eventual-send" "0.17.2"
"@endo/far" "0.2.18"
"@endo/import-bundle" "0.3.4"
"@endo/init" "0.5.56"
"@endo/marshal" "0.8.5"
"@endo/nat" "4.1.27"
"@endo/promise-kit" "0.2.56"
"@endo/ses-ava" "0.2.40"
"@endo/zip" "0.2.31"
ansi-styles "^6.2.1"
anylogger "^0.21.0"
import-meta-resolve "^2.2.1"
microtime "^3.1.0"
semver "^6.3.0"
tmp "^0.2.1"

"@agoric/swingset-xsnap-supervisor@^0.10.2":
version "0.10.2"
resolved "https://registry.yarnpkg.com/@agoric/swingset-xsnap-supervisor/-/swingset-xsnap-supervisor-0.10.2.tgz#09f067695b0ea6ebfeb6ea200cc7f1675f0f8939"
Expand All @@ -615,6 +728,11 @@
resolved "https://registry.yarnpkg.com/@agoric/swingset-xsnap-supervisor/-/swingset-xsnap-supervisor-0.10.3-u12.0.tgz#f5c0100ab077174803f78c7cbaeb03d885cbcb8c"
integrity sha512-nhY8EFtueGzKccs5VWESYcKn9Eh6KPUdpHsF+RWI0cm2ixUQ49AReLv6g2h4yiBwk7tZx0f5y/amUHYYJJ2DwQ==

"@agoric/swingset-xsnap-supervisor@^0.10.3-u13.0":
version "0.10.3-u13.0"
resolved "https://registry.yarnpkg.com/@agoric/swingset-xsnap-supervisor/-/swingset-xsnap-supervisor-0.10.3-u13.0.tgz#83c7744c28b0093a93ef1dbdf3e3c7244dbf5265"
integrity sha512-gEIOlyLd34JZkVRPWq9982Eu7G4ggE6H3I3RueO9JbbhOXwU+irYL922t0Ztdjc9aJW2H5f78ukcn9j1SZmtHQ==

"@agoric/time@^0.3.2":
version "0.3.2"
resolved "https://registry.yarnpkg.com/@agoric/time/-/time-0.3.2.tgz#9231eec197e10b52a9f416ec2afe929b67f7165c"
Expand All @@ -633,6 +751,15 @@
"@agoric/store" "^0.9.3-u12.0"
"@endo/nat" "4.1.27"

"@agoric/time@^0.3.3-u13.0":
version "0.3.3-u13.0"
resolved "https://registry.yarnpkg.com/@agoric/time/-/time-0.3.3-u13.0.tgz#41a412c69c5cbc64cb7b47908266fbbad42c600f"
integrity sha512-quMGP2E/hiO9GYSBcr5jeKccbg4K8Ya6320B/pennPTC7/UT8YoHZkdVd5OwZNXR+MEL7Z56KajcjCSacPbT6A==
dependencies:
"@agoric/assert" "^0.6.1-u11wf.0"
"@agoric/store" "^0.9.3-u13.0"
"@endo/nat" "4.1.27"

"@agoric/ui-components@^0.9.0":
version "0.9.0"
resolved "https://registry.yarnpkg.com/@agoric/ui-components/-/ui-components-0.9.0.tgz#0177f71d6752836f326d5309f302052861b5e23a"
Expand Down Expand Up @@ -740,14 +867,14 @@
eslint-plugin-eslint-comments "^3.1.2"
import-meta-resolve "^2.2.1"

"@agoric/web-components@0.12.0":
version "0.12.0"
resolved "https://registry.yarnpkg.com/@agoric/web-components/-/web-components-0.12.0.tgz#9695bab6b3fc9fb06c54d25fd55185b86ef8a6ee"
integrity sha512-jC9VujZvp0gCSnSKw8ae8zGntd6KYBMxV1K5SOAcQMsSG5jx1kHpSQkQCtsw+obkCzM8CS2lFwD1uFSfX/qiSw==
"@agoric/web-components@^0.15.0":
version "0.15.0"
resolved "https://registry.yarnpkg.com/@agoric/web-components/-/web-components-0.15.0.tgz#477317ccf9e0c967ff394add7efaca63546026ce"
integrity sha512-G1hl0NSgOuXE+9+SsyUpCHubhFJsrmFO7zo832EeJDUcO5d/V4M0YyrtIwFHKR2bH+IUl7JouasDO4fYEE8WYA==
dependencies:
"@agoric/assert" "^0.6.0"
"@agoric/cache" "^0.3.2"
"@agoric/casting" "^0.4.2"
"@agoric/casting" "^0.4.3-u13.0"
"@agoric/ertp" "^0.16.2"
"@agoric/notifier" "^0.6.3-dev-8c14632.0"
"@agoric/smart-wallet" "^0.5.3"
Expand Down Expand Up @@ -792,7 +919,7 @@
glob "^7.1.6"
tmp "^0.2.1"

"@agoric/xsnap@^0.14.3-u12.0":
"@agoric/xsnap@^0.14.3-u12.0", "@agoric/xsnap@^0.14.3-u13.0":
version "0.14.3-u13.0"
resolved "https://registry.yarnpkg.com/@agoric/xsnap/-/xsnap-0.14.3-u13.0.tgz#fbff403c3df5d4f349d67bed62edb9cc39b20304"
integrity sha512-E9NP2Q4cPHesIeZNPnMmA+eWFZcDqNBue0VP0GiI4qUbHjz8uJS7YV/thZjDxJvnfXgT4wmIx8v11pkMp/+EKw==
Expand Down

0 comments on commit 2e808bb

Please sign in to comment.