From 24b2b20135ee83478ef0e1d206072b5da97aa8dd Mon Sep 17 00:00:00 2001 From: abefernan <44572727+abefernan@users.noreply.github.com> Date: Mon, 8 Jan 2024 13:04:23 +0100 Subject: [PATCH] Allow unregistered IBC tokens --- lib/coinHelpers.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/coinHelpers.ts b/lib/coinHelpers.ts index c20eac6..8ae529e 100644 --- a/lib/coinHelpers.ts +++ b/lib/coinHelpers.ts @@ -17,6 +17,11 @@ const macroCoinToMicroCoin = (macroCoin: Coin, assets: readonly RegistryAsset[]) ), ); + // Leave IBC coins as is if not found on registry assets + if (!asset && macroCoin.denom.toLowerCase().startsWith("ibc/")) { + return macroCoin; + } + assert(asset, `An asset with the given symbol ${macroCoin.denom} was not found`); const macroUnit = asset.denom_units.find(