From a34ceebcb6aac134d3372ab8193a99328e892625 Mon Sep 17 00:00:00 2001 From: Troy Kessler <43882936+troykessler@users.noreply.github.com> Date: Wed, 27 Mar 2024 16:05:23 +0100 Subject: [PATCH] fix: ignore ibc error which is non-deterministic (#125) --- integrations/tendermint/src/runtime.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/integrations/tendermint/src/runtime.ts b/integrations/tendermint/src/runtime.ts index 0ccdf18d..da60d30e 100644 --- a/integrations/tendermint/src/runtime.ts +++ b/integrations/tendermint/src/runtime.ts @@ -184,6 +184,19 @@ export default class Tendermint implements IRuntime { ); } + // set attribute "ibccallbackerror-error" in ibc event "ibccallbackerror-fungible_token_packet" to empty string + if (event.type === 'ibccallbackerror-fungible_token_packet') { + event.attributes = event.attributes.map( + (attribute: IAttribute) => { + if (attribute.key === 'ibccallbackerror-error') { + attribute.value = ''; + } + + return attribute; + } + ); + } + return event; }); }