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

refactor: chain detailed #3679

Merged
merged 7 commits into from
Jul 14, 2021
Merged

refactor: chain detailed #3679

merged 7 commits into from
Jul 14, 2021

Conversation

guanbinrui
Copy link
Member

closes #

@@ -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
Copy link
Member Author

@guanbinrui guanbinrui Jul 14, 2021

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.

@guanbinrui guanbinrui requested review from Jack-Works, Lanttcat, zhouhanseng and septs and removed request for Jack-Works July 14, 2021 11:12
@@ -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 ?? '')
Copy link
Member Author

@guanbinrui guanbinrui Jul 14, 2021

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.

Copy link
Contributor

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)

@guanbinrui guanbinrui merged commit 4176711 into develop Jul 14, 2021
@guanbinrui guanbinrui deleted the refactor/chains branch July 14, 2021 12:41
Jack-Works pushed a commit that referenced this pull request Jul 15, 2021
* 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>
guanbinrui added a commit that referenced this pull request Jul 15, 2021
* 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>
yanzhihong23 added a commit that referenced this pull request Jul 16, 2021
* 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
  ...
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.

3 participants