fix(dashboard): change bridgeId to bridge name#1498
Open
0xVance wants to merge 2 commits into
Open
Conversation
✅ Deploy Preview for swapr ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
mix1o
approved these changes
Sep 20, 2022
Contributor
|
@0xVance Only way to bridge without assets is to use testnets (Rinkeby -> A.Rinkeby) |
berteotti
reviewed
Sep 20, 2022
Comment on lines
+22
to
+36
| export const mapBridgeIdToDisplayName = (bridgeId: BridgeList) => { | ||
| switch (bridgeId) { | ||
| case 'arbitrum:mainnet': | ||
| case 'arbitrum:testnet': | ||
| return 'Arbitrum' | ||
| case 'connext': | ||
| return 'Connext' | ||
| case 'omnibridge:eth-xdai': | ||
| return 'Omnibridge' | ||
| case 'socket': | ||
| return 'Socket' | ||
| case 'xdai': | ||
| return 'xDai' | ||
| } | ||
| } |
Collaborator
There was a problem hiding this comment.
In this case is better to create a dictionary and map key to value :)
Collaborator
There was a problem hiding this comment.
Also maybe we should have a different name for Arbitrum mainnet and Arbitrum testnet as it may confuse users.
berteotti
reviewed
Sep 21, 2022
| type: new RegExp('^(?<type>[A-Za-z]+)'), | ||
| } | ||
|
|
||
| export const bridgeIdToDisplayNameMap: { [k in BridgeList]: string } = { |
Collaborator
There was a problem hiding this comment.
Also, we usually type global constant names with UPPER_CASE convention
adamazad
approved these changes
Dec 7, 2022
adamazad
left a comment
Contributor
There was a problem hiding this comment.
What @berteotti mentioned, otherwise looks
| type: new RegExp('^(?<type>[A-Za-z]+)'), | ||
| } | ||
|
|
||
| export const bridgeIdToDisplayNameMap: { [k in BridgeList]: string } = { |
fb69230 to
0c5053c
Compare
ff47650 to
b3b3815
Compare
91e4f23 to
af06da1
Compare
This file contains hidden or 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
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.
Fixes #1453
@niemam29 @MilanVojnovic95 I'm ashamed to ask such question but I can't figure out how to make bridge transactions without spending money - would you be so kind and check if names are displayed properly? I coded them to be:
