-
Notifications
You must be signed in to change notification settings - Fork 0
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
base: main
Are you sure you want to change the base?
[pending]Bera #144
Conversation
import { MenuItem, Select, SelectChangeEvent } from '@mui/material'; | ||
interface TSelectProps { | ||
defaultValue: string; | ||
options: 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.
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) { |
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.
我记得mpc那边是精准判断字符串的,这里补个类型把
@@ -52,7 +52,7 @@ const useGlobalStore = create<GlobalStoreProps>()( | |||
}); | |||
}, | |||
userVote: null, | |||
chain: Chain.Arb, | |||
chain: Chain.Bera, |
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.
感觉把 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()} |
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.
这里为什么要new 以下来着,之前是 total 现在改成 priceAfterFee 是预期的吗
<TSelect | ||
defaultValue={Token.WETH} | ||
options={[Token.WETH, Token.Bera]} | ||
onChange={(x) => {}} |
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.
既然 onChange 没用上是不是它的类型改成可选的好点
No description provided.