From 570b50e35714f7550c8c68197e7de8b605fbbec9 Mon Sep 17 00:00:00 2001 From: max-morrow Date: Tue, 21 Jan 2025 22:15:04 +0300 Subject: [PATCH] fix to lop partial fills (#7487) --- .../macros/models/_project/oneinch/LOP/oneinch_lop_macro.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbt_subprojects/dex/macros/models/_project/oneinch/LOP/oneinch_lop_macro.sql b/dbt_subprojects/dex/macros/models/_project/oneinch/LOP/oneinch_lop_macro.sql index 72ddc40547d..2c005b0641d 100644 --- a/dbt_subprojects/dex/macros/models/_project/oneinch/LOP/oneinch_lop_macro.sql +++ b/dbt_subprojects/dex/macros/models/_project/oneinch/LOP/oneinch_lop_macro.sql @@ -251,7 +251,7 @@ select , coalesce(dst_amount, taking_amount) as taking_amount , order_hash , map_concat(flags, map_from_entries(array[ - ('first', row_number() over(partition by coalesce(order_hash, tx_hash) order by block_number, tx_index, call_trace_address) = 1) + ('first', row_number() over(partition by coalesce(order_hash, tx_hash), tx_success and call_success order by block_number, tx_index, call_trace_address) = 1) , ('direct', call_from = tx_from and call_to = tx_to) -- == cardinality(call_trace_address) = 0, but because of zksync trace structure we switched to this ])) as flags , remains