Skip to content

Commit

Permalink
fix poolextra
Browse files Browse the repository at this point in the history
  • Loading branch information
minhnhathoang committed Oct 10, 2024
1 parent 00e0176 commit 61f8aa1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
10 changes: 6 additions & 4 deletions pkg/liquidity-source/generic-simple-rate/pool_list_updater.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,12 @@ func (d *PoolsListUpdater) getNewPool(pool *PoolItem) (entity.Pool, error) {
}

poolExtraBytes, err := json.Marshal(PoolExtra{
Rate: uint256.MustFromBig(rate),
RateUnit: uint256.MustFromBig(d.config.RateUnit),
Paused: paused,
DefaultGas: defaultGas,
Paused: paused,
Rate: uint256.MustFromBig(rate),
RateUnit: uint256.MustFromBig(d.config.RateUnit),
IsRateInversed: d.config.IsRateInversed,
IsBidirectional: d.config.IsBidirectional,
DefaultGas: defaultGas,
})
if err != nil {
return entity.Pool{}, err
Expand Down
4 changes: 2 additions & 2 deletions pkg/liquidity-source/generic-simple-rate/type.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ type PoolItem struct {
}

type PoolExtra struct {
Paused bool `json:"paused"`
Rate *uint256.Int `json:"rate"`
RateUnit *uint256.Int `json:"rateUnit"`
Paused bool `json:"paused"`
IsBidirectional bool `json:"isBidirectional"`
IsRateInversed bool `json:"isRateInversed"`
IsBidirectional bool `json:"isBidirectional"`
DefaultGas int64 `json:"defaultGas"`
}

0 comments on commit 61f8aa1

Please sign in to comment.