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

Remove "Staking" page #10

Merged
merged 44 commits into from
Jan 11, 2024
Merged

Remove "Staking" page #10

merged 44 commits into from
Jan 11, 2024

Conversation

kpyszkowski
Copy link
Contributor

@kpyszkowski kpyszkowski commented Nov 28, 2023

Ref: #1
This pull request removes "Staking" page and related components.

Removed pages and Sidebar component entry
Removed DeauthorizeApplication modal
Added temporary solution for StakingOverview widget
Removed staking related components, unused hooks and modals. Removed
staking related store entries, provided temporary soliutions to prevent
compilation errors.
@kpyszkowski kpyszkowski marked this pull request as draft November 29, 2023 10:04
@kpyszkowski kpyszkowski mentioned this pull request Nov 29, 2023
7 tasks
@kpyszkowski kpyszkowski linked an issue Nov 29, 2023 that may be closed by this pull request
7 tasks
@kpyszkowski kpyszkowski removed a link to an issue Nov 29, 2023
7 tasks
@kpyszkowski kpyszkowski self-assigned this Nov 29, 2023
@kpyszkowski kpyszkowski marked this pull request as ready for review December 11, 2023 15:20
Copy link
Contributor

@michalsmiarowski michalsmiarowski left a comment

Choose a reason for hiding this comment

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

Took a quick look and left few comments. I will continue the review tomorrow so there might be more 😉

src/pages/Staking/StakingTvlCard.tsx Show resolved Hide resolved
src/hooks/useStakingState.ts Show resolved Hide resolved
src/hooks/useFetchOwnerStakes.ts Show resolved Hide resolved
src/store/staking/stakingSlice.ts Show resolved Hide resolved
Comment on lines -10 to -13
StakingProviderAppInfo,
AuthorizationParameters,
} from "../../threshold-ts/applications"
import { AddressZero, MAX_UINT64 } from "../../threshold-ts/utils"
Copy link
Contributor

@michalsmiarowski michalsmiarowski Dec 26, 2023

Choose a reason for hiding this comment

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

Non-blocking:

I think that we should also remove everything related to staking from threshold-ts lib. In the perfect world it would be best to have threshold-ts as a separate lib (in separate repo) and use it in both project.

The threshold-ts lib in this project is outdated already due to some changes that were made in Taco PR in the token-dashboard, so we won't be able to keep those two the same. I would say that we should remove all unnecessary things from it in this PR, and just leave the things that are relatd to TBTC.

Copy link
Contributor

Choose a reason for hiding this comment

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

Actually, I will address this in a separate PR

Copy link
Contributor

@michalsmiarowski michalsmiarowski left a comment

Choose a reason for hiding this comment

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

Left some comments to look at before the merge.

Also, let's not forget to resolve conflicts with the main branch 😉

src/App.tsx Outdated Show resolved Hide resolved
src/static/icons/IoHomeOutlineSharp.tsx Outdated Show resolved Hide resolved
src/store/index.ts Outdated Show resolved Hide resolved
src/store/index.ts Outdated Show resolved Hide resolved
src/store/modal/modalSlice.ts Show resolved Hide resolved
src/utils/getStakingAppLabel.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@michalsmiarowski michalsmiarowski left a comment

Choose a reason for hiding this comment

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

Left few more comments to look at

src/pages/tBTC/Bridge/Unmint.tsx Outdated Show resolved Hide resolved
src/components/TokenBalance.tsx Show resolved Hide resolved
src/components/TokenBalanceCard/index.tsx Outdated Show resolved Hide resolved
src/components/TokenBalanceCard/index.tsx Outdated Show resolved Hide resolved
src/enums/externalHref.ts Outdated Show resolved Hide resolved
src/enums/externalHref.ts Outdated Show resolved Hide resolved
src/pages/Staking/HowItWorks/index.tsx Show resolved Hide resolved
Copy link
Contributor

@michalsmiarowski michalsmiarowski left a comment

Choose a reason for hiding this comment

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

LGTM 🔥

import { useToken } from "../../hooks/useToken"
import { tBTCFillBlack } from "../../static/icons/tBTCFillBlack"
import { TokenBalanceProps } from "../TokenBalance"

export type TokenBalanceCardProps = {
token: Exclude<Token, Token.TBTC>
token: Extract<Token, Token.TBTCV2>
Copy link
Contributor

Choose a reason for hiding this comment

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

Non-blocking:

Ideally we would not want to use Extract here in case we add other tokens to the Token anum. I will address that in a separate PR where I remove useFetchTvl hook and get rid of other tokens. For now, let's keep it this way.

@michalsmiarowski michalsmiarowski merged commit 94b3f2a into main Jan 11, 2024
michalsmiarowski added a commit that referenced this pull request Jan 15, 2024
"Main" branch clean-up

Ref: #1 
Depends on: #7 #8 #10 #11 

This pull request aggregates each partial clean-up PR (mentioned above). It's
introduced to reduce complexity of merge conflicts and allow continuous work
without blocking while waiting for partial PRs to be merged.
Moreover it's a place for general cleanup commits that couldn't be addressed to
any of the PRs.
@michalsmiarowski michalsmiarowski mentioned this pull request Jan 15, 2024
7 tasks
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