diff --git a/features/aave/services/read-position-created-events.ts b/features/aave/services/read-position-created-events.ts index 920da7866e..93dd7ae8d0 100644 --- a/features/aave/services/read-position-created-events.ts +++ b/features/aave/services/read-position-created-events.ts @@ -105,11 +105,12 @@ export function extractLendingProtocolFromPositionCreatedEvent( case 'MorphoBlue': return LendingProtocol.MorphoBlue default: - throw new Error( + console.warn( `Unrecognised protocol received from positionCreatedChainEvent ${JSON.stringify( positionCreatedChainEvent, )}`, ) + return LendingProtocol.Unknown } } diff --git a/lendingProtocols/LendingProtocol.ts b/lendingProtocols/LendingProtocol.ts index 14b3ded22e..312287263f 100644 --- a/lendingProtocols/LendingProtocol.ts +++ b/lendingProtocols/LendingProtocol.ts @@ -5,6 +5,7 @@ export enum LendingProtocol { Maker = 'maker', MorphoBlue = 'morphoblue', SparkV3 = 'sparkv3', + Unknown = 'unknown', } export enum LendingProtocolLabel {