Skip to content

Commit

Permalink
hotfix(metamorpho): revoking pending values does not guarantee they e…
Browse files Browse the repository at this point in the history
…xist
  • Loading branch information
julien-devatom committed Jan 14, 2025
1 parent 6dce056 commit 6c9ad74
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/meta-morpho.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,15 @@ export function handleOwnershipTransferred(
}

export function handleRevokePendingCap(event: RevokePendingCapEvent): void {
const mmMarket = loadMetaMorphoMarket(event.address, event.params.id);
const mmMarket = MetaMorphoMarket.load(event.address.concat(event.params.id));

if(!mmMarket) {
log.warning("MetaMorphoMarket {} not found", [
event.address.toHexString(),
event.params.id.toString(),
]);
return;
}

if (!mmMarket.currentPendingCap) {
log.warning("MetaMorphoMarket {} has no pending cap", [
Expand Down

0 comments on commit 6c9ad74

Please sign in to comment.