Skip to content

Commit

Permalink
feat(api): use all the types in api and web
Browse files Browse the repository at this point in the history
refs #133
  • Loading branch information
ygrishajev committed May 7, 2024
1 parent 5d49780 commit dfd1947
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions api/src/utils/protobuf.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Registry, isTsProtoGeneratedType, GeneratedType } from "@cosmjs/proto-signing";
import { defaultRegistryTypes } from "@cosmjs/stargate";
import { MsgUnjail } from "cosmjs-types/cosmos/slashing/v1beta1/tx";
import omit from "lodash/omit";

import * as v1beta1 from "@akashnetwork/akash-api/v1beta1";
import * as v1beta2 from "@akashnetwork/akash-api/v1beta2";
Expand All @@ -10,8 +9,8 @@ import * as v1beta4 from "@akashnetwork/akash-api/v1beta4";

const akashTypes: ReadonlyArray<[string, GeneratedType]> = [
...Object.values(v1beta1),
...Object.values(omit(v1beta2, "Storage")),
...Object.values(omit(v1beta3, ["DepositDeploymentAuthorization", "GPU"])),
...Object.values(v1beta2),
...Object.values(v1beta3),
...Object.values(v1beta4)
].map((x) => ["/" + x.$type, x]);
const missingTypes: ReadonlyArray<[string, GeneratedType]> = [["/cosmos.slashing.v1beta1.MsgUnjail", MsgUnjail]];
Expand Down
4 changes: 2 additions & 2 deletions deploy-web/src/utils/proto/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import * as v1beta3 from "@akashnetwork/akash-api/v1beta3";
import * as v1beta4 from "@akashnetwork/akash-api/v1beta4";

import { mainnetId, testnetId, sandboxId } from "../constants";
import omit from "lodash/omit";

const commonTypes = { ...omit(v1beta3, "GPU"), ...v1beta4 };
const commonTypes = { ...v1beta3, ...v1beta4 };
const mainnetTypes = commonTypes;
const sandboxTypes = commonTypes;

Expand Down

0 comments on commit dfd1947

Please sign in to comment.