1
This commit is contained in:
parent
edbf314dd0
commit
6a8d26c69c
@ -14,6 +14,7 @@ type vip struct {
|
||||
}
|
||||
|
||||
type vesterDepositWithdrawPo struct {
|
||||
idx int64
|
||||
eventName string
|
||||
chainTimestamp int32
|
||||
accountAddress string
|
||||
@ -106,11 +107,12 @@ func (this *vip) RecalcEsCecConvert(accountAddress string) error {
|
||||
return err
|
||||
}
|
||||
matchDeposits := []*vesterDepositWithdrawPo{}
|
||||
var lastWithdraw *vesterDepositWithdrawPo
|
||||
{
|
||||
var lastWithdraw *vesterDepositWithdrawPo
|
||||
allDeposits := []*vesterDepositWithdrawPo{}
|
||||
for ds.Next() {
|
||||
p := new(vesterDepositWithdrawPo)
|
||||
p.idx = q5.ToInt64(ds.GetByName("event_name"))
|
||||
p.eventName = ds.GetByName("event_name")
|
||||
p.chainTimestamp = q5.ToInt32(ds.GetByName("chain_timestamp"))
|
||||
p.accountAddress = ds.GetByName("account_address")
|
||||
@ -151,5 +153,14 @@ func (this *vip) RecalcEsCecConvert(accountAddress string) error {
|
||||
bnTotal = bnAmount.Add(bnAmount, bnTotal)
|
||||
lastDeposit = val
|
||||
}
|
||||
var maxIdx int64
|
||||
if lastDeposit != nil &&
|
||||
lastDeposit.idx > maxIdx {
|
||||
maxIdx = lastDeposit.idx
|
||||
}
|
||||
if lastWithdraw != nil &&
|
||||
lastWithdraw.idx > maxIdx {
|
||||
maxIdx = lastWithdraw.idx
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user