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

feat: add disabled flag to pools and hide if disabled #177

Merged
merged 1 commit into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"check:format:fix": "prettier --write . --plugin-search-dir=./node_modules --plugin=@trivago/prettier-plugin-sort-imports",
"check:lint": "eslint .",
"check:lint:fix": "eslint . --fix",
"check:all": "pnpm check:types && pnpm check:format && pnpm check:lint",
"dev": "vite",
"preview": "vite preview"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export function ChoosePoolingPool({ onPoolChange }: ChoosePoolingPoolProps) {
<Stack spacing="base" mt="extra-loose">
{(Object.keys(pools) as PoolName[]).map((poolName: PoolName, index: number) => {
const p = pools[poolName];
if (p.disabled) return null;
return (
<PoolSelectItem
name={p.name}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export const pools = {
minimumDelegationAmount: 40_000_000,
icon: <PoolIcon src="/32x32_FastPool.png" />,
allowCustomRewardAddress: false,
disabled: true,
},

PlanBetter: {
Expand All @@ -52,6 +53,7 @@ export const pools = {
minimumDelegationAmount: 200_000_000,
icon: <PoolIcon src="/32x32_PlanBetter.png" />,
allowCustomRewardAddress: false, // only for ledger users
disabled: true,
},

Xverse: {
Expand All @@ -70,6 +72,7 @@ export const pools = {
minimumDelegationAmount: 100_000_000,
icon: <PoolIcon src="/32x32_Xverse.png" />,
allowCustomRewardAddress: true,
disabled: true,
},
'Custom Pool': {
name: PoolName.CustomPool,
Expand All @@ -83,5 +86,6 @@ export const pools = {
minimumDelegationAmount: MIN_DELEGATED_STACKING_AMOUNT_USTX,
icon: <IconEdit />,
allowCustomRewardAddress: false,
disabled: false,
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,29 @@ export const enum PoxContractName {
Pox3,
WrapperOneCycle,
WrapperFastPool,
Pox4,
}

export const NetworkInstanceToPoxContractMap = {
[NetworkInstance.devnet]: {
[PoxContractName.Pox3]: 'ST000000000000000000002AMW42H.pox-3',
[PoxContractName.Pox4]: 'ST000000000000000000002AMW42H.pox-4',
[PoxContractName.WrapperOneCycle]:
'ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.pox-pools-1-cycle',
[PoxContractName.WrapperFastPool]:
'ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.pox-pool-self-service',
},
[NetworkInstance.testnet]: {
[PoxContractName.Pox3]: 'ST000000000000000000002AMW42H.pox-3',
[PoxContractName.Pox4]: 'ST000000000000000000002AMW42H.pox-4',
[PoxContractName.WrapperOneCycle]:
'ST2PABAF9FTAJYNFZH93XENAJ8FVY99RRM4DF2YCW.pox-pools-1-cycle-v2',
[PoxContractName.WrapperFastPool]:
'ST2PABAF9FTAJYNFZH93XENAJ8FVY99RRM4DF2YCW.pox-pool-self-service-v2',
},
[NetworkInstance.mainnet]: {
[PoxContractName.Pox3]: 'SP000000000000000000002Q6VF78.pox-3',
[PoxContractName.Pox4]: 'SP000000000000000000002Q6VF78.pox-4',
[PoxContractName.WrapperOneCycle]:
'SP001SFSMC2ZY76PD4M68P3WGX154XCH7NE3TYMX.pox-pools-1-cycle-v2',
[PoxContractName.WrapperFastPool]: 'SP21YTSM60CAY6D011EZVEVNKXVW8FVZE198XEFFP.pox-fast-pool-v2',
Expand Down
Loading