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

[pending]Bera #144

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open

[pending]Bera #144

wants to merge 12 commits into from

Conversation

zhbyak
Copy link

@zhbyak zhbyak commented May 16, 2024

No description provided.

@zhbyak zhbyak changed the title Bera [pending]Bera May 16, 2024
import { MenuItem, Select, SelectChangeEvent } from '@mui/material';
interface TSelectProps {
defaultValue: string;
options: string[];

Choose a reason for hiding this comment

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

options 的类型最好是 { value, label },不然无法满足后面的需求

@@ -87,10 +87,11 @@ export async function unstake(address: string, amount: number) {
amount: BigNumber(amount).times(SHARE_UNIT_MODIFIER).toFixed(),
});
}
export async function transfer(address: string, amount: string) {
export async function transfer(address: string, amount: string, token?: string) {

Choose a reason for hiding this comment

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

我记得mpc那边是精准判断字符串的,这里补个类型把

@@ -52,7 +52,7 @@ const useGlobalStore = create<GlobalStoreProps>()(
});
},
userVote: null,
chain: Chain.Arb,
chain: Chain.Bera,

Choose a reason for hiding this comment

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

感觉把 chain 做成环境变量好点把,不然产品找你要 Arb 版本我们还得改源码。。

@@ -310,7 +314,17 @@ const BuyModal = ({ onClose }: BuyModalProps) => {
<div className="flex items-center space-x-1">
<Icon1 />
<span className="text-2xl font-bold">
<NumberDisplayer text={total} loading={loadingPrice || loadingPirceAfterFee} />
<NumberDisplayer
text={new BigNumber(priceAfterFee).toFixed()}

Choose a reason for hiding this comment

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

这里为什么要new 以下来着,之前是 total 现在改成 priceAfterFee 是预期的吗

<TSelect
defaultValue={Token.WETH}
options={[Token.WETH, Token.Bera]}
onChange={(x) => {}}

Choose a reason for hiding this comment

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

既然 onChange 没用上是不是它的类型改成可选的好点

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.

2 participants