Skip to content

Commit

Permalink
fix activityBonus transfer
Browse files Browse the repository at this point in the history
  • Loading branch information
bxy4543 committed Sep 27, 2024
1 parent 44b7864 commit 63af3df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion controllers/pkg/database/cockroach/accountv2.go
Original file line number Diff line number Diff line change
Expand Up @@ -1143,7 +1143,7 @@ func (c *Cockroach) transferAccount(from, to *types.UserQueryOpts, amount int64,
return fmt.Errorf("insufficient balance in sender account, sender is %v, transfer amount %d, the transferable amount is: %d", sender, amount, sender.Balance-sender.DeductionBalance-MinBalance-sender.ActivityBonus)
}
} else {
amount = sender.Balance - sender.DeductionBalance - c.ZeroAccount.Balance
amount = sender.Balance - sender.DeductionBalance - c.ZeroAccount.Balance - sender.ActivityBonus
if amount <= 0 {
return ErrInsufficientBalance
}
Expand Down

0 comments on commit 63af3df

Please sign in to comment.