diff --git a/platforms/cosmwasm/protocols/ibc/src/ibc.ts b/platforms/cosmwasm/protocols/ibc/src/ibc.ts index fa42d1b37..13f58ce12 100644 --- a/platforms/cosmwasm/protocols/ibc/src/ibc.ts +++ b/platforms/cosmwasm/protocols/ibc/src/ibc.ts @@ -340,7 +340,7 @@ export class CosmwasmIbcBridge // Fetches the local channel for the given chain async fetchTransferChannel(chain: CosmwasmChains): Promise { - if (this.chain !== Gateway.name) + if (this.chain !== Gateway.chain) throw new Error("Cannot query the transfer channels from a non-gateway chain"); const { channel } = await this.rpc.queryContractSmart(this.gatewayAddress, { diff --git a/platforms/cosmwasm/src/constants.ts b/platforms/cosmwasm/src/constants.ts index 6fc8438c8..f8f20e187 100644 --- a/platforms/cosmwasm/src/constants.ts +++ b/platforms/cosmwasm/src/constants.ts @@ -121,7 +121,13 @@ export type IbcChannels = Partial>; // For each chain, add the channel id for each other chain const gatewayConnections = [ - ["Mainnet", [["Wormchain", { Cosmoshub: "channel-5", Osmosis: "channel-4" }]]], + [ + "Mainnet", + [ + ["Wormchain", { Cosmoshub: "channel-5", Osmosis: "channel-3" }], + ["Osmosis", { Wormchain: "channel-6" }], + ], + ], [ "Testnet", [ diff --git a/platforms/cosmwasm/src/gateway.ts b/platforms/cosmwasm/src/gateway.ts index 694fdf2b2..744b3e415 100644 --- a/platforms/cosmwasm/src/gateway.ts +++ b/platforms/cosmwasm/src/gateway.ts @@ -51,7 +51,7 @@ export class Gateway extends ChainContext< ): string { const channels = CosmwasmPlatform.getIbcChannels(network, chain); if (!channels) throw new Error("No channels configured for chain " + chain); - if (!(Gateway.name in channels)) throw new Error("No channel configured for chain " + chain); + if (!(Gateway.chain in channels)) throw new Error("No channel configured for chain " + chain); return channels[Gateway.chain]!; }