-
Notifications
You must be signed in to change notification settings - Fork 308
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
refactor: chain detailed #3679
refactor: chain detailed #3679
Conversation
28bd3e9
to
08f025a
Compare
08f025a
to
71aa8db
Compare
@@ -30,7 +30,7 @@ export function useAvailabilityComputed(account: string, payload: RedPacketJSONP | |||
const isClaimed = availability.claimed_amount ? availability.claimed_amount !== '0' : availability.ifclaimed | |||
const isRefunded = isEmpty && Number.parseInt(availability.claimed, 10) < Number.parseInt(availability.total, 10) | |||
const isCreator = isSameAddress(payload?.sender.address ?? '', account) | |||
const parsedChainId = payload.network ? getChainIdFromName(payload.network) : ChainId.Mainnet | |||
const parsedChainId = getChainIdFromName(payload.network ?? '') ?? ChainId.Mainnet |
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.
Cc @zhouhanseng The parsedChainid
will not be undefined
.
e281b18
to
71cd560
Compare
@@ -51,7 +51,7 @@ export function PostInspector(props: PostInspectorProps) { | |||
(t) => | |||
({ | |||
address: t.address, | |||
type: isSameAddress(t.address, NATIVE_TOKEN_ADDRESS) | |||
type: isSameAddress(t.address, NATIVE_TOKEN_ADDRESS ?? '') |
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.
Why will NATIVE_TOKEN_ADDRESS
be yield to undefined
? If it could beundefined
, then the typing is wrong.
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.
why not use isNative
export const isNative = currySameAddress(getTokenConstants().NATIVE_TOKEN_ADDRESS) |
* refactor: chain detailed * refactor: code style * refactor: rename isChainIdMainnet * fix: failed to erc20 tokens * refactor: remove useless locates * refactor: prettier * fix: constant undefined crash Co-authored-by: Hancheng Zhou <z308114274@gmail.com>
* refactor: chain detailed * refactor: code style * refactor: rename isChainIdMainnet * fix: failed to erc20 tokens * refactor: remove useless locates * refactor: prettier * fix: constant undefined crash Co-authored-by: Hancheng Zhou <z308114274@gmail.com>
* develop: (41 commits) fix: peopleList performance problem (#3642) fix: claim status (#3694) fix(Wallet): do not open the WalletStatusDialog after switching network (#3681) chore: remove bsc swapper (#3680) fix: show token icon in transaction list and show balance in token list (#3684) chore: clean docs (#3685) docs: rewrite plugin dev doc (#3673) fix(build): watcher of webpack watches too many files including output files and files in node_modules (#3682) fix: the link for viewing pair analytics in swap dialog link to a broken page (#3683) feat: add i18n support in plugin infra (#3661) refactor: chain detailed (#3679) fix: token address (#3678) chore: remove notistack patch (#3666) fix: enable plugins on app (#3660) feat: red packet confirm dialog (#3633) feat: ito use tokens detail (#3665) fix: rp image pre text (#3668) feat: introduce react-hook-form (#3632) fix: add token into DB (#3662) fix: lint error ...
closes #