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

Centralized configuration - part 1 #1362

Merged
merged 7 commits into from
Aug 1, 2024
Merged

Centralized configuration - part 1 #1362

merged 7 commits into from
Aug 1, 2024

Conversation

bobo-k2
Copy link
Contributor

@bobo-k2 bobo-k2 commented Jul 25, 2024

Pull Request Summary

This is the first PR to centralize the portal configuration and simply enable/disable certain features, like bridges or XCM

Configuration is stored in fetures.ts and settings looks like

// Bridges
export const nativeBridgeEnabled = true;
export const layerZeroBridgeEnabled = true;
export const layerSwapBridgeEnabled = true;
export const celerBridgeEnabled = true;
export const omniBridgeEnabled = true;
export const stargateBridgeEnabled = true;
export const stakeStoneBridgeEnabled = true;
export const arthSwapBridgeEnabled = true;

The portal code is updated to take those settings into consideration.
I found that disabling router-link, so I created replacement component in CustomRouterLink.vue

Check list

  • contains breaking changes
  • adds new feature
  • modifies existing feature (bug fix or improvements)
  • relies on other tasks
  • documentation changes
  • tested on mobile devices

src/features.ts Fixed Show fixed Hide fixed
src/features.ts Fixed Show fixed Hide fixed
Copy link

github-actions bot commented Jul 25, 2024

Visit the preview URL for this PR (updated for commit 11a5204):

https://astar-apps--pr1362-feat-central-config-g09g365e.web.app

(expires Wed, 07 Aug 2024 08:39:12 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: dd76fe72958fe2910fef9d53f0b4539b82b849db

src/features.ts Fixed Show fixed Hide fixed
src/features.ts Fixed Show fixed Hide fixed
src/features.ts Fixed Show fixed Hide fixed
src/features.ts Fixed Show fixed Hide fixed
@bobo-k2 bobo-k2 marked this pull request as ready for review July 25, 2024 10:15
src/features.ts Outdated
export const layerSwapBridgeEnabled = true;
export const celerBridgeEnabled = true;
export const omniBridgeEnabled = true;
export const stargateBridgeEnabled = true;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this variable need to be exported? This variable has not been used in out side of this file.
The same as stakeStoneBridgeEnabled and arthSwapBridgeEnabled

image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, variables can be private since they are used only by isBridgeEnabled function
Fixed in 060d281

@impelcrypto
Copy link
Member

@bobo-k2
Copy link
Contributor Author

bobo-k2 commented Jul 31, 2024

@bobo-k2 I think we can remove this variable too. https://github.com/AstarNetwork/astar-apps/blob/feat/central-config/src/hooks/useNetworkInfo.ts#L115

You are right, I updated the variable to return to false, but forgot to remove it. Fixed in 7a974f8

Copy link
Member

@gtg7784 gtg7784 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@bobo-k2 bobo-k2 merged commit 6cb1e50 into main Aug 1, 2024
9 checks passed
@bobo-k2 bobo-k2 deleted the feat/central-config branch August 1, 2024 07:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants