diff --git a/packages/wallet/README.md b/packages/wallet/README.md new file mode 100644 index 00000000000..2717c27895d --- /dev/null +++ b/packages/wallet/README.md @@ -0,0 +1,31 @@ +# Agoric Wallet + +This directory contains two Agoric Wallet pieces: + +- `api` - the legacy "off-chain" wallet used by `@agoric/solo` +- `ui` - the `@agoric/smart-wallet` user interface + +The smart wallet has not yet subsumed all the features of the off-chain wallet. Until it does, we require the `api` directory. + +The `ui` directory no longer supports the off-chain wallet. In order to work around this, we point the solo web server at a wallet UI package that does. + +## Upgrading the solo wallet UI + +Change the legacy wallet UI: + +1. Check out the Agoric SDK branch containing a working ag-solo wallet (such as `community-dev`). +2. `yarn && yarn build` +3. `cd packages/wallet/ui` +4. Develop any changes to the wallet, then `yarn build` +5. `yarn publish`, setting the version number to end in `-solo.N` where N is greater than the previous. +6. Commit, create a PR and target it at the same branch in step 1. + +Next, you can update the master branch: + +1. Check out the Agoric SDK master branch. +2. Set the version of `@agoric/wallet-ui` in the `packages/wallet/package.json` to be the one you published (the exact version, no caret or tilde). +3. `yarn` +4. Test your wallet updates by running an ag-solo (sim chain is fine). +5. Commit, create a PR and target it at master. + +After merging the first PR, you can merge the second. diff --git a/packages/wallet/package.json b/packages/wallet/package.json index e3595c9f281..d0456fc94e1 100644 --- a/packages/wallet/package.json +++ b/packages/wallet/package.json @@ -6,7 +6,7 @@ "license": "Apache-2.0", "author": "Agoric", "agoric-wallet": { - "htmlBasedir": "./ui/build", + "htmlBasedir": "./node_modules/@agoric/wallet-ui/build", "deploy": [ "./api/deploy.js" ] @@ -19,6 +19,7 @@ "build": "exit 0" }, "dependencies": { + "@agoric/wallet-ui": "0.1.3-solo.0", "agoric": "^0.18.2", "babel-eslint": "^10.0.3", "eslint-plugin-eslint-comments": "^3.1.2", diff --git a/yarn.lock b/yarn.lock index 0bc8460deb0..08d677ba30f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -16,6 +16,11 @@ resolved "https://registry.yarnpkg.com/@agoric/nat/-/nat-4.1.0.tgz#102794e033ffc183a20b0f86031a2e76d204b9f6" integrity sha512-2oMoh3DMn0Fx8HChPPiH8irBNdT/33ttxAZJohhd3nU3gyBRQ1u+eEoOQWfSkrE6M02iMkQM7GE9MzGmjQ6bHg== +"@agoric/wallet-ui@0.1.3-solo.0": + version "0.1.3-solo.0" + resolved "https://registry.yarnpkg.com/@agoric/wallet-ui/-/wallet-ui-0.1.3-solo.0.tgz#5f05c3dd2820d4f1efcbccbd2dc1292847ecbd2b" + integrity sha512-NbhCrTH9u2af+6ituM99M8Mo10VOP1nQRTZoYEXW+esBwJId/7cRniMmAC7qmkbXs8POA31S8EQ5gAhkWq08WA== + "@ampproject/remapping@^2.1.0": version "2.2.0" resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.2.0.tgz#56c133824780de3174aed5ab6834f3026790154d"