Skip to content

Commit

Permalink
[API-3093] Support new field 'pretty_name' in /chains response (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattac21 authored Jul 12, 2024
1 parent 57e1693 commit f286e6f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/ninety-taxis-teach.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@skip-go/core': minor
---

support new pretty_name field on /v2/info/chains response
4 changes: 4 additions & 0 deletions packages/core/src/types/__test__/converters.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,7 @@ test("chainFromJSON", () => {
pfm_enabled: true,
is_testnet: false,
cosmos_sdk_version: "v0.47.3",
pretty_name: "Osmosis",
modules: {
"github.com/cosmos/ibc-go": {
path: "github.com/cosmos/ibc-go/v4",
Expand Down Expand Up @@ -461,6 +462,7 @@ test("chainFromJSON", () => {
cosmosSDKVersion: "v0.47.3",
chainType: "cosmos",
isTestnet: false,
prettyName: "Osmosis",
modules: {
"github.com/cosmos/ibc-go": {
path: "github.com/cosmos/ibc-go/v4",
Expand Down Expand Up @@ -513,6 +515,7 @@ test("chainToJSON", () => {
isTestnet: false,
cosmosSDKVersion: "v0.47.3",
chainType: "cosmos",
prettyName: "Osmosis",
modules: {
"github.com/cosmos/ibc-go": {
path: "github.com/cosmos/ibc-go/v4",
Expand Down Expand Up @@ -563,6 +566,7 @@ test("chainToJSON", () => {
is_testnet: false,
cosmos_sdk_version: "v0.47.3",
chain_type: "cosmos",
pretty_name: "Osmosis",
modules: {
"github.com/cosmos/ibc-go": {
path: "github.com/cosmos/ibc-go/v4",
Expand Down
2 changes: 2 additions & 0 deletions packages/core/src/types/converters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ export function chainFromJSON(chainJSON: ChainJSON): Chain {
chainType: chainJSON.chain_type,
ibcCapabilities: ibcCapabilitiesFromJSON(chainJSON.ibc_capabilities),
isTestnet: chainJSON.is_testnet,
prettyName: chainJSON.pretty_name,
};
}

Expand All @@ -323,6 +324,7 @@ export function chainToJSON(chain: Chain): ChainJSON {
chain_type: chain.chainType,
ibc_capabilities: ibcCapabilitiesToJSON(chain.ibcCapabilities),
is_testnet: chain.isTestnet,
pretty_name: chain.prettyName,
};
}

Expand Down
2 changes: 2 additions & 0 deletions packages/core/src/types/routing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export type Chain = {
chainType: string;
ibcCapabilities: IbcCapabilities;
isTestnet: boolean;
prettyName: string;
};

export type Venue = {
Expand All @@ -69,6 +70,7 @@ export type ChainJSON = {
chain_type: string;
ibc_capabilities: IbcCapabilitiesJSON;
is_testnet: boolean;
pretty_name: string;
};

export type ModuleVersionInfo = {
Expand Down

0 comments on commit f286e6f

Please sign in to comment.