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

fix: Remove module Arbitrary Policy #909

Merged
merged 1 commit into from
May 2, 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 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
Loading