Skip to content
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

feat: backend version based feature toggles #647

Merged

Conversation

theborakompanioni
Copy link
Collaborator

@theborakompanioni theborakompanioni commented Aug 23, 2023

Resolves #637.

Using the new /getinfo endpoint to provide the ability to use backend version based feature toggles.
e.g. as "import wallet" feature will be available with JM v0.9.10, this enables hiding/disabling the button.

How to test

Change the port from the dev JM backend (port 28183) to the secondary JM backend (port 29183), which runs an older version. Restart the ui (npm run dev:start) and verify that the "Import Wallet" button is not displayed anymore.

diff --git a/src/setupProxy.js b/src/setupProxy.js
index 360592a..6cdcfa3 100644
--- a/src/setupProxy.js
+++ b/src/setupProxy.js
@@ -7,7 +7,7 @@ const SUPPORTED_BACKENDS = [BACKEND_NATIVE, BACKEND_STANDALONE]
 const {
   PUBLIC_URL = '',
   JAM_BACKEND = BACKEND_NATIVE,
-  JMWALLETD_API_PORT = '28183',
+  JMWALLETD_API_PORT = '29183',
   JMWALLETD_WEBSOCKET_PORT = '28283',
   JMOBWATCH_PORT = '62601',
   JAM_API_PORT = undefined,

@theborakompanioni theborakompanioni added the enhancement New feature or request label Aug 23, 2023
@theborakompanioni theborakompanioni self-assigned this Aug 23, 2023
@theborakompanioni theborakompanioni force-pushed the feat/637-backend-version-based-feature-toggle branch 2 times, most recently from 50c296a to 2baab6c Compare August 29, 2023 08:34
@theborakompanioni theborakompanioni force-pushed the feat/637-backend-version-based-feature-toggle branch from 2baab6c to bcd33d0 Compare September 8, 2023 14:42
@theborakompanioni theborakompanioni marked this pull request as ready for review September 8, 2023 14:55
@theborakompanioni theborakompanioni force-pushed the feat/637-backend-version-based-feature-toggle branch from bcd33d0 to 722fb95 Compare September 9, 2023 12:02
@theborakompanioni theborakompanioni merged commit 6b45718 into master Sep 10, 2023
@theborakompanioni theborakompanioni deleted the feat/637-backend-version-based-feature-toggle branch September 10, 2023 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: ability to enable/disable features based on backend version
1 participant