From 6022aa03f8758e22422a77ad8330c438426129ad Mon Sep 17 00:00:00 2001 From: Cristian Lungu Date: Fri, 20 Sep 2024 17:17:51 +0300 Subject: [PATCH] fix: add amount-in for bridge multitransaction param --- src/status_im/contexts/wallet/common/utils.cljs | 5 +++-- src/status_im/contexts/wallet/send/events.cljs | 1 + src/status_im/contexts/wallet/swap/events.cljs | 3 +++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/status_im/contexts/wallet/common/utils.cljs b/src/status_im/contexts/wallet/common/utils.cljs index 5256730567..5f1c8b59fd 100644 --- a/src/status_im/contexts/wallet/common/utils.cljs +++ b/src/status_im/contexts/wallet/common/utils.cljs @@ -470,11 +470,12 @@ :Amount amount-in))))) (defn multi-transaction-command - [{:keys [from-address to-address from-asset to-asset amount-out multi-transaction-type] + [{:keys [from-address to-address from-asset to-asset amount-in amount-out multi-transaction-type] :or {multi-transaction-type constants/multi-transaction-type-unknown}}] {:fromAddress from-address :toAddress to-address :fromAsset from-asset :toAsset to-asset - :fromAmount amount-out + :fromAmount amount-in + :toAmount amount-out :type multi-transaction-type}) diff --git a/src/status_im/contexts/wallet/send/events.cljs b/src/status_im/contexts/wallet/send/events.cljs index 76ef4d028c..2761d7334d 100644 --- a/src/status_im/contexts/wallet/send/events.cljs +++ b/src/status_im/contexts/wallet/send/events.cljs @@ -641,6 +641,7 @@ :to-address to-address :from-asset token-id :to-asset token-id + :amount-in (if eth-transfer? (:amount-in first-route) "0x0") :amount-out (if eth-transfer? (:amount-out first-route) "0x0") :multi-transaction-type multi-transaction-type}) transaction-paths diff --git a/src/status_im/contexts/wallet/swap/events.cljs b/src/status_im/contexts/wallet/swap/events.cljs index 4ecd1593d3..3aa50c0edb 100644 --- a/src/status_im/contexts/wallet/swap/events.cljs +++ b/src/status_im/contexts/wallet/swap/events.cljs @@ -247,6 +247,9 @@ :amount-out (if eth-transfer? (:amount-out swap-proposal) "0x0") + :amount-in (if eth-transfer? + (:amount-in swap-proposal) + "0x0") :multi-transaction-type multi-transaction-type}) transaction-paths