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]: some refactors in Remove Liquidity #238

Merged
merged 3 commits into from Dec 12, 2022

Conversation

0x009922
Copy link

Closes klaytn#174

- use `PairAddressResult` as a source of
  truth in more places (less duplication)
- rename the store's `isPairLoaded` to
  `doesPairExist` for better semantics
- clear selected addrs at `.clear()`
- when "supply" is closed, navigate to
  liquidity only when the supply was
  fulfilled
- on refresh, update the pair address too
@@ -25,7 +25,7 @@ const { loading: isLoading, result, refetch } = useLiquidityPairsQuery(pollInter
// Refetch if cached
if (result.value && !isLoading.value) refetch()

const isLoaded = computed(() => !!result.value)
// const isLoaded = computed(() => !!result.value)
Copy link

Choose a reason for hiding this comment

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

Do we need it anymore? I think we can use isLoading to display loader instead of "Empty"

Copy link
Author

Choose a reason for hiding this comment

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

Yeah, I think we can. But I intentionally avoid to do it, because I think it could be solved in the whole app in general in a single run. There are many places where loaders should be nice.

@0x009922 0x009922 merged commit 6627709 into develop Dec 12, 2022
@0x009922 0x009922 deleted the rm-liquidity-refactor branch December 20, 2022 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants