-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Read canister ID from canister #528
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nmattia
force-pushed
the
nm-inject-canister-id
branch
from
February 3, 2022 16:59
3ad5921
to
6c3c62d
Compare
How has this code been tested? |
bitdivine
reviewed
Feb 4, 2022
nmattia
requested review from
bitdivine,
peterpeterparker and
frederikrothenberger
February 4, 2022 09:25
This has been tested manually locally and automatically by selenium and the backend-tests on CI. This will also allow us to test the wasm on mainnet with a different canister ID than the official II. |
frederikrothenberger
approved these changes
Feb 4, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This includes a few changes that together make the frontend read the canister ID from the canister. This means:
npm run build
without having to first start the replica + call dfx canister create (or after having wiped.dfx/
).This includes the following changed:
<script>
tag inindex.html
is now a dummy; the real content is injected in the backend. The real content includes the canister ID. Notes:npm run start
) we make sure that only theindex.html
is fetched from the backend; that way, the index.js is still local. The webpack config doesn't assume that the canister has been deployed anymore; now it only tried reading canister IDs when the server is started; before, it would do so at build time as well, meaning you couldn't build the FE if your canister hadn't been deployed (ok, created). I think this is much, much saner.