Skip to content

Commit

Permalink
fix: mark trusted remote as active when indexing event if it was crea…
Browse files Browse the repository at this point in the history
…ted during parsing proposals
  • Loading branch information
coreyar committed Nov 25, 2024
1 parent 30ef60f commit 501e3f5
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,13 @@ import {
import { removeTrustedRemote } from '../operations/remove';

export function handleSetTrustedRemoteAddress(event: SetTrustedRemoteAddress): void {
getOrCreateTrustedRemote(
const result = getOrCreateTrustedRemote(
event.params.remoteChainId,
Address.fromString(event.params.newRemoteAddress.toHexString().slice(0, 42)),
);
// Ensure it is marked active, in case it was previously created in remote proposal creation
result.entity.active = true;
result.entity.save();
}

export function handleExecuteRemoteProposal(event: ExecuteRemoteProposal): void {
Expand Down

0 comments on commit 501e3f5

Please sign in to comment.