Skip to content

Commit

Permalink
feat: add disabled flag to pools and hide if disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
hstove authored and friedger committed Apr 22, 2024
1 parent 5cb593a commit cf7f2bd
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 0 deletions.
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

0 comments on commit cf7f2bd

Please sign in to comment.