From c8e10f3848053eac77a4f02f8685b13e752cc460 Mon Sep 17 00:00:00 2001 From: gagliardetto Date: Thu, 14 Sep 2023 14:55:44 +0200 Subject: [PATCH] Fix `uiTokenAmount` fields --- adapters.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/adapters.go b/adapters.go index b712e314..9378e802 100644 --- a/adapters.go +++ b/adapters.go @@ -117,6 +117,18 @@ func adaptTransactionMetaToExpectedOutput(m map[string]any) map[string]any { if !ok { uiTokenAmount["decimals"] = 0 } + _, ok = uiTokenAmount["uiAmount"] + if !ok { + uiTokenAmount["uiAmount"] = nil + } + _, ok = uiTokenAmount["amount"] + if !ok { + uiTokenAmount["amount"] = "0" + } + _, ok = uiTokenAmount["uiAmountString"] + if !ok { + uiTokenAmount["uiAmountString"] = "0" + } } } }