Skip to content

Commit

Permalink
Add lockedValue field in vaults to match vstorage field name
Browse files Browse the repository at this point in the history
  • Loading branch information
toliaqat committed Apr 30, 2024
1 parent ae2e935 commit 1b45aa1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ type Vault @entity {
blockHeight: BigInt!
blockTime: Date!
balance: BigInt
lockedValue: BigInt
coin: String @index
token: String @index
debt: BigInt
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 @@ -55,6 +55,7 @@ export const vaultsEventKit = (block: any, data: any, module: string, path: stri
vault.token = payload?.locked?.__brand;
vault.debt = payload?.debtSnapshot?.debt?.__value;
vault.balance = payload?.locked?.__value;
vault.lockedValue = payload?.locked?.__value;
vault.state = payload?.vaultState;

if (vault.state === VAULT_STATES.LIQUIDATING && !vault.liquidatingAt) {
Expand Down

0 comments on commit 1b45aa1

Please sign in to comment.