-
Notifications
You must be signed in to change notification settings - Fork 7
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
Split metaport config #464
base: develop
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
…etwork/portal into split-config
config/testnet/index.ts
Outdated
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.
Should testnet hubs also be split into multiple config files?
@@ -73,7 +68,7 @@ export abstract class StepMetadata { | |||
public type: ActionType, | |||
public from: string, | |||
public to: string | |||
) {} | |||
) { } |
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.
Necessary space?
export interface TxOpts { | ||
value?: BigNumberish | ||
address: string | ||
privateKey?: string |
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.
Where is this being used?
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.
not used anymore, removed
|
||
import WidgetUI from '../WidgetUI' | ||
import Debug from '../Debug' | ||
import MetaportProvider from '../MetaportProvider' | ||
|
||
export default function Metaport(props: { config: MetaportConfig }) { | ||
export default function Metaport(props: { config: types.mp.Config }) { |
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.
Note -> not a huge fan of the broad imports like import { types } -> why? adds a ton of chained complexity even though it feels more declarative. Have found its often more clear to do
import { type Config } from '@/core/config` for exmaple
import { useWalletClient, useSwitchChain } from 'wagmi' | ||
import { MainnetChain, SChain } from '@skalenetwork/ima-js' | ||
import { dc, constants } from '@/core' |
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.
what is dc? Would prefer to see that be a bit more declarative
src/components/SwitchCopySurface.tsx
Outdated
@@ -32,13 +33,13 @@ import ContentCopyIcon from '@mui/icons-material/ContentCopy' | |||
import { styled } from '@mui/material/styles' | |||
import Switch from '@mui/material/Switch' | |||
|
|||
import { cmn, cls, styles, type interfaces } from '@skalenetwork/metaport' | |||
import { cmn, cls, styles } from '@skalenetwork/metaport' | |||
|
|||
export default function CopySurface(props: { | |||
title: string | |||
value: string | null | undefined |
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.
value should not be null ever, only string | undefined
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.
fixed
src/components/Tile.tsx
Outdated
color?: DueDateStatus | ||
progressColor?: DueDateStatus | ||
color?: types.pm.DueDateStatus | ||
progressColor?: types.pm.DueDateStatus | ||
progress?: number | ||
children?: ReactElement | ReactElement[] | false | ||
childrenRi?: ReactElement | ReactElement[] | null | '' |
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.
replace null with undefined
src/components/TokenBalanceTile.tsx
Outdated
import { dc, constants, units } from '@/core' | ||
import { |
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.
Prefer declarative naming for dc
src/components/TokenSurface.tsx
Outdated
|
||
import { CopyToClipboard } from 'react-copy-to-clipboard' | ||
import Tooltip from '@mui/material/Tooltip' | ||
import ButtonBase from '@mui/material/ButtonBase' | ||
import CheckCircleRoundedIcon from '@mui/icons-material/CheckCircleRounded' | ||
import UnfoldMoreRoundedIcon from '@mui/icons-material/UnfoldMoreRounded' | ||
|
||
import { DEFAULT_ERC20_DECIMALS } from '../core/constants' | ||
|
||
export default function TokenSurface(props: { | ||
title: string | ||
value: string | null | undefined |
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.
Remove type null from value if possible
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.
fixed
src/core/delegation/staking.ts
Outdated
@@ -33,29 +32,29 @@ import { | |||
} from '.' | |||
|
|||
export async function getStakingInfoMap( |
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.
Switch uses of null -> undefined
8a9cb55
In this PR: