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: custom orbit pages #1732

Merged
merged 16 commits into from
Jul 26, 2024
Merged

feat: custom orbit pages #1732

merged 16 commits into from
Jul 26, 2024

Conversation

dewanshparashar
Copy link
Contributor

@dewanshparashar dewanshparashar commented Jun 27, 2024

Closes FS-608

Copy link

vercel bot commented Jun 27, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
arbitrum-token-bridge ✅ Ready (Inspect) Visit Preview Jul 26, 2024 1:39pm

@cla-bot cla-bot bot added the cla-signed label Jun 27, 2024
@dewanshparashar dewanshparashar changed the title feat: custom orbit pages version 2 feat: custom orbit pages Jun 27, 2024
import { getBridgeUiConfigForChain } from '../util/bridgeUiConfig'
import { useNetworks } from './useNetworks'

export const useDestinationOrbitChain = () => {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
export const useDestinationOrbitChain = () => {
export const useDestinationChainStyles = () => {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated.

Comment on lines 23 to 24
chain: orbitChain,
styles: orbitStyles
Copy link
Member

Choose a reason for hiding this comment

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

we don't really need the chain here, we can return only the styles object, and it can be empty when no chain detected

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated.

const [defaultSourceChainId] = getDestinationChainIds(destinationChainId)
return {
sourceChainId:
getTeleportChainIdForOrbitChain(destinationChainId) ?? // show the grand-parent-chain id if valid, else get the parent chain id
Copy link
Member

Choose a reason for hiding this comment

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

I'd rather we default to L2 being source here, that's the flow that gets more usage

Copy link
Contributor

Choose a reason for hiding this comment

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

yah sgtm to default to Arb One -> L3 instead of Ethereum -> L3

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated.

@dewanshparashar dewanshparashar marked this pull request as ready for review July 9, 2024 19:47
@dewanshparashar dewanshparashar requested review from spsjvc and yermakova and removed request for yermakova July 9, 2024 19:47
@dewanshparashar dewanshparashar requested review from a team and brtkx July 10, 2024 09:09
)

// early return if the orbit chain is not found
if (!orbitChain) return undefined
Copy link
Member

Choose a reason for hiding this comment

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

return empty object here, that way it can still work as a style prop

import { getBridgeUiConfigForChain } from '../util/bridgeUiConfig'
import { useNetworks } from './useNetworks'

export const useDestinationChainStyles = () => {
Copy link
Member

Choose a reason for hiding this comment

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

nit to rename to style as that's the dom prop it will be passed to

Suggested change
export const useDestinationChainStyles = () => {
export const useDestinationChainStyle = () => {

@spsjvc spsjvc enabled auto-merge (squash) July 26, 2024 13:53
@spsjvc spsjvc merged commit 444992f into master Jul 26, 2024
23 checks passed
@spsjvc spsjvc deleted the feat-custom-orbit-pages-v2 branch July 26, 2024 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants