Skip to content

Commit

Permalink
Merge pull request #909 from alleslabs/fix/remove-module-arbitrary-po…
Browse files Browse the repository at this point in the history
…licy

fix: Remove module Arbitrary Policy
  • Loading branch information
songwongtp authored May 2, 2024
2 parents 3343421 + 0dbc95b commit ab7cc17
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 12 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Bug fixes

- [#909](https://github.com/alleslabs/celatone-frontend/pull/909) Remove module arbitrary policy as it is no longer supported
- [#904](https://github.com/alleslabs/celatone-frontend/pull/904) Fix wasm page container text alignment
- [#893](https://github.com/alleslabs/celatone-frontend/pull/893) Fix validator list percent

Expand Down
5 changes: 2 additions & 3 deletions src/lib/pages/publish-module/components/accordions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,8 @@ export const PolicyAccordion = ({ chainName }: { chainName: string }) => (
with similar configurations.
<br />
<br />
Each policy will provide different flexibility for further upgrades
whether you can add new functions without maintaining old functions
(Arbitrary), or required to maintain old functions (Compatible).
“Compatible” will allow for further upgrades while requiring to
maintain old functions.
<br />
<br />
Choosing “Immutable” will not allow you to make any changes with this
Expand Down
7 changes: 1 addition & 6 deletions src/lib/pages/publish-module/formConstants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,6 @@ export const emptyModule: Module = {
};

export const POLICIES = [
{
value: UpgradePolicy.ARBITRARY,
description: "You can publish these modules again without any restrictions",
condition: false,
},
{
value: UpgradePolicy.COMPATIBLE,
description:
Expand All @@ -54,5 +49,5 @@ export const POLICIES = [

export const defaultValues: PublishModuleState = {
modules: [emptyModule],
upgradePolicy: UpgradePolicy.ARBITRARY,
upgradePolicy: UpgradePolicy.COMPATIBLE,
};
2 changes: 1 addition & 1 deletion src/lib/pages/publish-module/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { PublishModule } from "./publish";
const DEFAULT_STATE: PublishCompleteState = {
txHash: "",
txFee: undefined,
upgradePolicy: UpgradePolicy.ARBITRARY,
upgradePolicy: UpgradePolicy.UNSPECIFIED,
modules: [],
};
export interface PublishCompleteState extends PublishTxInternalResult {
Expand Down
1 change: 0 additions & 1 deletion src/lib/pages/publish-module/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ export const statusResolver = ({
// Policy check
// IMMUTABLE -> cannot be republished
// COMPATIBLE -> can be republished as COMPATIBLE and IMMUTABLE only
// ARBITRARY -> can be freely republished
case UpgradePolicy.IMMUTABLE:
return {
status: "error",
Expand Down
2 changes: 1 addition & 1 deletion src/lib/types/move/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type { Proposal } from "../proposal";
import type { ExposedFunction, ModuleAbi } from "./abi";

export enum UpgradePolicy {
ARBITRARY = "ARBITRARY",
UNSPECIFIED = "UNSPECIFIED",
COMPATIBLE = "COMPATIBLE",
IMMUTABLE = "IMMUTABLE",
}
Expand Down

0 comments on commit ab7cc17

Please sign in to comment.