diff --git a/CHANGELOG.md b/CHANGELOG.md index 63cfd9399..cbeebe81b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -64,6 +64,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Improvements +- [#540](https://github.com/alleslabs/celatone-frontend/pull/540) Add open proposal configuration - [#532](https://github.com/alleslabs/celatone-frontend/pull/532) Implement new Amplitude structure - [#538](https://github.com/alleslabs/celatone-frontend/pull/538) Add empty state in query and execute with json schema - [#537](https://github.com/alleslabs/celatone-frontend/pull/537) Change json schema select widget null option wording for readability diff --git a/src/config/chain/neutron.ts b/src/config/chain/neutron.ts index 455cd693c..779b38d58 100644 --- a/src/config/chain/neutron.ts +++ b/src/config/chain/neutron.ts @@ -28,7 +28,7 @@ export const NEUTRON_CHAIN_CONFIGS: ChainConfigs = { enabled: true, }, gov: { - enabled: true, + enabled: false, }, }, gas: { @@ -70,7 +70,7 @@ export const NEUTRON_CHAIN_CONFIGS: ChainConfigs = { enabled: false, }, gov: { - enabled: true, + enabled: false, }, }, gas: { diff --git a/src/config/chain/osmosis.ts b/src/config/chain/osmosis.ts index 01559971b..619240a35 100644 --- a/src/config/chain/osmosis.ts +++ b/src/config/chain/osmosis.ts @@ -30,6 +30,8 @@ export const OSMOSIS_CHAIN_CONFIGS: ChainConfigs = { }, gov: { enabled: true, + disableStoreCodeProposal: true, + disableWhitelistProposal: true, }, }, gas: { @@ -74,6 +76,8 @@ export const OSMOSIS_CHAIN_CONFIGS: ChainConfigs = { }, gov: { enabled: true, + disableWhitelistProposal: true, + disableStoreCodeProposal: true, }, }, gas: { @@ -117,6 +121,8 @@ export const OSMOSIS_CHAIN_CONFIGS: ChainConfigs = { }, gov: { enabled: true, + disableWhitelistProposal: true, + disableStoreCodeProposal: true, }, }, gas: { diff --git a/src/config/chain/sei.ts b/src/config/chain/sei.ts index 800985ca7..62bcf088a 100644 --- a/src/config/chain/sei.ts +++ b/src/config/chain/sei.ts @@ -46,7 +46,7 @@ export const SEI_CHAIN_CONFIGS: ChainConfigs = { maxGasLimit: 25_000_000, }, explorerLink: { - validator: "", + validator: "https://mintscan.io/sei/validators", proposal: "", }, extra: { diff --git a/src/config/chain/terra.ts b/src/config/chain/terra.ts index 35babdf3f..bce44d92a 100644 --- a/src/config/chain/terra.ts +++ b/src/config/chain/terra.ts @@ -30,7 +30,7 @@ export const TERRA_CHAIN_CONFIGS: ChainConfigs = { }, gov: { enabled: true, - disableOpenProposal: true, + hideOpenProposal: true, }, }, gas: { @@ -73,7 +73,7 @@ export const TERRA_CHAIN_CONFIGS: ChainConfigs = { }, gov: { enabled: true, - disableOpenProposal: true, + hideOpenProposal: true, }, }, gas: { diff --git a/src/config/chain/types.ts b/src/config/chain/types.ts index a2df8bade..c2d9f44ab 100644 --- a/src/config/chain/types.ts +++ b/src/config/chain/types.ts @@ -29,7 +29,8 @@ type PublicProjectConfig = { enabled: boolean }; type GovConfig = | { enabled: true; - disableOpenProposal?: boolean; + hideOpenProposal?: boolean; + disableWhitelistProposal?: boolean; disableStoreCodeProposal?: boolean; } | { diff --git a/src/lib/components/button/NewProposalButton.tsx b/src/lib/components/button/NewProposalButton.tsx index 15efc66fa..1ba8eb436 100644 --- a/src/lib/components/button/NewProposalButton.tsx +++ b/src/lib/components/button/NewProposalButton.tsx @@ -15,7 +15,12 @@ export const NewProposalButton = () => { // const isPermissionless = // govParams?.uploadAccess.permission === AccessConfigPermission.EVERYBODY; - if (govConfig.enabled && govConfig.disableOpenProposal) return null; + if (govConfig.enabled && govConfig.hideOpenProposal) return null; + + const disableWhitelist = + (govConfig.enabled && govConfig.disableWhitelistProposal) ?? false; + const disableStoreCode = + (govConfig.enabled && govConfig.disableStoreCodeProposal) ?? false; return ( @@ -28,8 +33,9 @@ export const NewProposalButton = () => { Create New Proposal - {govConfig.enabled && !govConfig.disableStoreCodeProposal && ( + {/* } onClick={() => { @@ -57,9 +63,9 @@ export const NewProposalButton = () => { : undefined } > */} - +