Skip to content

Commit

Permalink
Merge pull request #14 from Agoric/tl-liquidated-flag
Browse files Browse the repository at this point in the history
Add liquidated bool in the vault state
  • Loading branch information
toliaqat authored May 3, 2024
2 parents 1b45aa1 + 159b431 commit 98f02f4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@ type Vault @entity {
state: String
wallet: Wallet!
liquidatingAt: Date
liquidatedAt: Date
liquidatedAt: Date
liquidated: Boolean
}

type VaultManagerMetrics @entity {
Expand Down
1 change: 1 addition & 0 deletions src/mappings/events/vaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export const vaultsEventKit = (block: any, data: any, module: string, path: stri

if (vault.state === VAULT_STATES.LIQUIDATED && !vault.liquidatedAt) {
vault.liquidatedAt = block.block.header.time;
vault.liquidated = true;
}
return [vault.save()];
}
Expand Down

0 comments on commit 98f02f4

Please sign in to comment.