Skip to content

Commit

Permalink
add: cudos network
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandermake committed May 29, 2024
1 parent 5eba5ac commit 2c90c22
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 28 deletions.
27 changes: 1 addition & 26 deletions src/networks/BaseWallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ export class BaseWallet extends SigningCosmWasmClient {
setupStakingExtension,
setupTxExtension
);
this.registry.register("cosmos-sdk/MsgTransfer", TransferMessage);
}

getSigner() {
Expand Down Expand Up @@ -247,7 +246,7 @@ export class BaseWallet extends SigningCosmWasmClient {
);
}

return await this.simulateTx(msg, "cosmos-sdk/MsgTransfer", gasMupltiplier, gasPrice, "");
return await this.simulateTx(msg, "/ibc.applications.transfer.v1.MsgTransfer", gasMupltiplier, gasPrice, "");
}

private async sequence() {
Expand Down Expand Up @@ -373,27 +372,3 @@ export class BaseWallet extends SigningCosmWasmClient {
});
}
}

export const TransferMessage = {
process(chainId: string, msg) {
const d = (() => {
if ("type" in msg && msg.type === "cosmos-sdk/MsgTransfer") {
return {
token: msg.value.token,
receiver: msg.value.receiver,
channelId: msg.value.source_channel,
ibcMemo: msg.value.memo
};
}

if ("unpacked" in msg && msg.typeUrl === "/ibc.applications.transfer.v1.MsgTransfer") {
return {
token: (msg.unpacked as MsgTransfer).token,
receiver: (msg.unpacked as MsgTransfer).receiver,
channelId: (msg.unpacked as MsgTransfer).sourceChannel,
ibcMemo: (msg.unpacked as MsgTransfer).memo
};
}
})();
}
};
4 changes: 2 additions & 2 deletions src/networks/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -353,8 +353,8 @@ export const NETWORKS_DATA: {
SUPPORTED_NETWORKS_DATA.JACKAL,
SUPPORTED_NETWORKS_DATA.INJECTIVE,
SUPPORTED_NETWORKS_DATA.COMPOSABLE,
SUPPORTED_NETWORKS_DATA.NOBLE,
SUPPORTED_NETWORKS_DATA.CUDOS
SUPPORTED_NETWORKS_DATA.NOBLE
// SUPPORTED_NETWORKS_DATA.CUDOS
],
supportedNetworks: {
OSMOSIS: {
Expand Down

0 comments on commit 2c90c22

Please sign in to comment.