Skip to content

Commit

Permalink
associate bucket with Pool entity
Browse files Browse the repository at this point in the history
  • Loading branch information
EdNoepel committed Jul 28, 2023
1 parent 93cdff2 commit 0d583fc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/utils/pool/bucket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0d583fc

Please sign in to comment.