Skip to content

Commit

Permalink
fix token balance by token symbol
Browse files Browse the repository at this point in the history
  • Loading branch information
thanhson1085 committed May 1, 2020
1 parent 7858757 commit 3d4e338
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion daos/order.go
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,7 @@ func (dao *OrderDao) GetUserLockedBalance(account common.Address, token common.A
totalLockedBalance := big.NewInt(0)
for _, o := range orders {
for _, p := range pairs {
if p.BaseTokenSymbol == o.BaseTokenSymbol() && p.QuoteTokenSymbol == o.QuoteTokenSymbol() {
if p.BaseTokenAddress == o.BaseToken && p.QuoteTokenAddress == o.QuoteToken {
if o.Side == types.BUY {
remainingAmount := math.Sub(o.Amount, o.FilledAmount)
amount := math.Mul(remainingAmount, o.PricePoint)
Expand Down

0 comments on commit 3d4e338

Please sign in to comment.