From 1b45aa16877ff252f62eaa8b359b021dd22d433a Mon Sep 17 00:00:00 2001 From: Touseef Liaqat Date: Mon, 29 Apr 2024 20:03:10 -0700 Subject: [PATCH] Add lockedValue field in vaults to match vstorage field name --- schema.graphql | 1 + src/mappings/events/vaults.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/schema.graphql b/schema.graphql index 069c413b..e0dd4bca 100644 --- a/schema.graphql +++ b/schema.graphql @@ -138,6 +138,7 @@ type Vault @entity { blockHeight: BigInt! blockTime: Date! balance: BigInt + lockedValue: BigInt coin: String @index token: String @index debt: BigInt diff --git a/src/mappings/events/vaults.ts b/src/mappings/events/vaults.ts index bc66d82d..ad4d5697 100644 --- a/src/mappings/events/vaults.ts +++ b/src/mappings/events/vaults.ts @@ -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) {