From 8b49682266b9ed9c0d57907d51c2a4015453a63f Mon Sep 17 00:00:00 2001 From: Matt Romano <42412983+mattromano@users.noreply.github.com> Date: Fri, 30 Aug 2024 12:16:47 -0700 Subject: [PATCH] aave-repay-bug (#166) fix bug --- models/silver/defi/lending/aave/silver__aave_repayments.sql | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/models/silver/defi/lending/aave/silver__aave_repayments.sql b/models/silver/defi/lending/aave/silver__aave_repayments.sql index 3fe1bd49..7afc332b 100644 --- a/models/silver/defi/lending/aave/silver__aave_repayments.sql +++ b/models/silver/defi/lending/aave/silver__aave_repayments.sql @@ -44,7 +44,10 @@ atoken_meta AS ( segmented_data [0] :: STRING ) :: INTEGER AS repayed_amount, 'Aave V3' AS aave_version, - origin_to_address AS lending_pool_contract, + COALESCE( + origin_to_address, + contract_address + ) AS lending_pool_contract, origin_from_address AS repayer_address, _log_id, _inserted_timestamp