From efa38cdbe9d1b52abcb37122ca1db8a096932940 Mon Sep 17 00:00:00 2001 From: Noah Saso Date: Wed, 8 Nov 2023 23:29:44 -0800 Subject: [PATCH] Added missing version for Neutron's latest v0.2.1 contracts. --- .../actions/core/dao_appearance/ManageWidgets/index.tsx | 3 ++- .../actions/core/dao_governance/ManageStorageItems/index.tsx | 3 ++- packages/stateful/actions/core/nfts/ManageCw721/index.tsx | 3 ++- packages/types/chain.ts | 4 ++++ 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/packages/stateful/actions/core/dao_appearance/ManageWidgets/index.tsx b/packages/stateful/actions/core/dao_appearance/ManageWidgets/index.tsx index 2ec0888d0c..2b62f34f9f 100644 --- a/packages/stateful/actions/core/dao_appearance/ManageWidgets/index.tsx +++ b/packages/stateful/actions/core/dao_appearance/ManageWidgets/index.tsx @@ -71,7 +71,8 @@ export const makeManageWidgetsAction: ActionMaker = ({ // V1 DAOs and V2-alpha DAOs use a value key of `addr`, the rest use `value`. const valueKey = context.info.coreVersion === ContractVersion.V1 || - context.info.coreVersion === ContractVersion.V2Alpha + context.info.coreVersion === ContractVersion.V2Alpha || + context.info.coreVersion === ContractVersion.NeutronV021 ? 'addr' : 'value' diff --git a/packages/stateful/actions/core/dao_governance/ManageStorageItems/index.tsx b/packages/stateful/actions/core/dao_governance/ManageStorageItems/index.tsx index 3f03582990..fa423be79d 100644 --- a/packages/stateful/actions/core/dao_governance/ManageStorageItems/index.tsx +++ b/packages/stateful/actions/core/dao_governance/ManageStorageItems/index.tsx @@ -63,7 +63,8 @@ export const makeManageStorageItemsAction: ActionMaker< // V1 DAOs and V2-alpha DAOs use a value key of `addr`, V2-beta uses `value`. const valueKey = context.info.coreVersion === ContractVersion.V1 || - context.info.coreVersion === ContractVersion.V2Alpha + context.info.coreVersion === ContractVersion.V2Alpha || + context.info.coreVersion === ContractVersion.NeutronV021 ? 'addr' : 'value' diff --git a/packages/stateful/actions/core/nfts/ManageCw721/index.tsx b/packages/stateful/actions/core/nfts/ManageCw721/index.tsx index 82b43b53b5..844e2daa20 100644 --- a/packages/stateful/actions/core/nfts/ManageCw721/index.tsx +++ b/packages/stateful/actions/core/nfts/ManageCw721/index.tsx @@ -191,7 +191,8 @@ export const makeManageCw721Action: ActionMaker = ({ // V1 DAOs and V2-alpha DAOs use a value key of `addr`, V2-beta uses `value`. const storageItemValueKey = context.info.coreVersion === ContractVersion.V1 || - context.info.coreVersion === ContractVersion.V2Alpha + context.info.coreVersion === ContractVersion.V2Alpha || + context.info.coreVersion === ContractVersion.NeutronV021 ? 'addr' : 'value' diff --git a/packages/types/chain.ts b/packages/types/chain.ts index 9ff74d44b0..8b03512e29 100644 --- a/packages/types/chain.ts +++ b/packages/types/chain.ts @@ -65,6 +65,10 @@ export enum ContractVersion { V210 = '2.1.0', // https://github.com/DA0-DA0/dao-contracts/releases/tag/v2.3.0 V230 = '2.3.0', + + // Neutron-specific versions. + // https://github.com/neutron-org/neutron-dao/releases/tag/v0.5.0 + NeutronV021 = '0.2.1', } export enum ChainId {