From cac9789c30fa7c32b5bbbda3f42acbcfccb7b556 Mon Sep 17 00:00:00 2001 From: Mateusz Jasiuk Date: Thu, 13 Nov 2025 14:05:39 +0100 Subject: [PATCH] fix: incorrect inactive channel label --- apps/namadillo/src/atoms/integrations/functions.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/namadillo/src/atoms/integrations/functions.ts b/apps/namadillo/src/atoms/integrations/functions.ts index 36c9e06492..218652e348 100644 --- a/apps/namadillo/src/atoms/integrations/functions.ts +++ b/apps/namadillo/src/atoms/integrations/functions.ts @@ -173,8 +173,11 @@ export const getRestApiAddressByIndex = (chain: Chain, index = 0): string => { return randomRestApi.address; }; +// This only removes the "transfer/channel-X/" prefix from IBC denom traces +// ex1: "transfer/channel-0/uatom" => "uatom" +// ex2: "transfer/channel-1/transfer/channel-750/uusdc" => "transfer/channel-750/uusdc" - NOT SUPPORTED export const getDenomFromIbcTrace = (ibcAddress: string): string => { - return ibcAddress.replaceAll(/(transfer\/|channel-\d+\/)*/gi, ""); + return ibcAddress.replace(/transfer\/channel-\d+\//i, ""); }; export const getChannelFromIbcInfo = (