-
Notifications
You must be signed in to change notification settings - Fork 19
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
chore(tangle-dapp): Separate mainnet and testnet in bridge chain selection #2850
base: develop
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for tangle-dapp ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for tangle-cloud ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
const srcChains = useMemo(() => { | ||
if (network.name === 'Tangle Mainnet') { | ||
const mainnetChains = sourceChains.filter( | ||
(chain) => chain.tag === 'live', | ||
); | ||
setSelectedSourceChain(mainnetChains[0]); | ||
return mainnetChains; | ||
} | ||
|
||
const testnetChains = sourceChains.filter((chain) => chain.tag === 'test'); | ||
setSelectedSourceChain(testnetChains[0]); | ||
return testnetChains; | ||
}, [network.name, setSelectedSourceChain, sourceChains]); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Filter this during initialization or configuration, not within the component logic. Use useBridgeStore
for filtering.
Summary of changes
Proposed area of change
apps/tangle-dapp
apps/tangle-cloud
libs/tangle-shared-ui
libs/ui-components
Associated issue(s)
Screen Recording
CleanShot.2025-02-28.at.05.59.20.mp4