Skip to content

Commit

Permalink
feat(api): use deprecated generated code from akash-api
Browse files Browse the repository at this point in the history
Also remove relevant local files.

refs akash-network/support#184
  • Loading branch information
ygrishajev committed May 7, 2024
1 parent b487a49 commit b95352f
Show file tree
Hide file tree
Showing 139 changed files with 193 additions and 44,732 deletions.
194 changes: 187 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"path": false
},
"dependencies": {
"@akashnetwork/akash-api": "^1.0.2",
"@akashnetwork/akash-api": "^1.3.0",
"@cosmjs/launchpad": "^0.27.0",
"@cosmjs/proto-signing": "^0.28.11",
"@cosmjs/stargate": "^0.28.0",
Expand Down
2 changes: 1 addition & 1 deletion src/keplr/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { defaultRegistryTypes, SigningStargateClient } from "@cosmjs/stargate";
import { OfflineDirectSigner, OfflineSigner, Registry } from "@cosmjs/proto-signing";
import { AminoTypes } from "@cosmjs/stargate";
import { Certificate } from "@akashnetwork/akash-api/akash/cert/v1beta2";
import { MsgCreateCertificate } from "../protobuf/akash/cert/v1beta1/cert";
import { MsgCreateCertificate } from "@akashnetwork/akash-api/deprecated/akash/cert/v1beta1";

interface Chain {
id: string;
Expand Down
6 changes: 4 additions & 2 deletions src/pbclient/pbclient.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Message } from "../stargate";
import { AminoMsg } from "cosmwasm";
import { MsgCreateCertificate, MsgRevokeCertificate } from "../protobuf/akash/cert/v1beta3/cert";
import { MsgCreateCertificate, MsgRevokeCertificate } from "@akashnetwork/akash-api/akash/cert/v1beta3";

const FEE = {
amount: [
Expand All @@ -22,7 +22,9 @@ export function createAminoMessage(message: Message, messageBody: AminoMsg) {
type WithoutType<T> = Omit<T, "$type">;
type MessageTypes = {
[Message.MsgCreateCertificate]: WithoutType<MsgCreateCertificate>;
[Message.MsgRevokeCertificate]: Omit<WithoutType<MsgRevokeCertificate>, "id"> & { id: WithoutType<MsgRevokeCertificate["id"]> };
[Message.MsgRevokeCertificate]: Omit<WithoutType<MsgRevokeCertificate>, "id"> & {
id: WithoutType<MsgRevokeCertificate["id"]>;
};
};

export function createStarGateMessage<T extends keyof MessageTypes>(message: T, messageBody: MessageTypes[T]) {
Expand Down
Loading

0 comments on commit b95352f

Please sign in to comment.