diff --git a/schema.graphql b/schema.graphql index f265128..0fc88d3 100644 --- a/schema.graphql +++ b/schema.graphql @@ -123,8 +123,8 @@ type Bucket @entity { bucketPrice: BigDecimal! # current exchange rate of the bucket exchangeRate: BigDecimal! - # pool address - poolAddress: String! + # pool in which the bucket belongs + pool: Pool! # total collateral available in the bucket collateral: BigDecimal! # total quote tokens deposited in the bucket, inclusive of interest diff --git a/src/utils/pool/bucket.ts b/src/utils/pool/bucket.ts index 590db22..d3a8722 100644 --- a/src/utils/pool/bucket.ts +++ b/src/utils/pool/bucket.ts @@ -55,7 +55,7 @@ export function loadOrCreateBucket(poolId: Bytes, bucketId: Bytes, index: u32): bucket.bucketIndex = index bucket.bucketPrice = indexToPrice(index) - bucket.poolAddress = poolId.toHexString() + bucket.pool = poolId bucket.collateral = ZERO_BD bucket.deposit = ZERO_BD bucket.exchangeRate = ONE_BD