From 54169f738e93a0b8b5b98071d38b38140c7db78d Mon Sep 17 00:00:00 2001 From: Matt Romano <42412983+mattromano@users.noreply.github.com> Date: Fri, 30 Aug 2024 12:17:36 -0700 Subject: [PATCH] fix (#303) --- 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 977be269..5dff8383 100644 --- a/models/silver/defi/lending/aave/silver__aave_repayments.sql +++ b/models/silver/defi/lending/aave/silver__aave_repayments.sql @@ -28,7 +28,10 @@ WITH repay AS( WHEN contract_address = LOWER('0x794a61358D6845594F94dc1DB02A252b5b4814aD') THEN 'Aave V3' ELSE 'ERROR' END 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