mirror of
https://github.com/alexgo-io/gaze-indexer.git
synced 2026-04-28 11:45:34 +08:00
fix:
This commit is contained in:
@@ -16,8 +16,9 @@ type DelegateValidator struct {
|
||||
}
|
||||
|
||||
func New() *DelegateValidator {
|
||||
v := validator.New()
|
||||
return &DelegateValidator{
|
||||
Validator: validator.Validator{Valid: true},
|
||||
Validator: *v,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -28,8 +28,9 @@ type PurchaseValidator struct {
|
||||
}
|
||||
|
||||
func New() *PurchaseValidator {
|
||||
v := validator.New()
|
||||
return &PurchaseValidator{
|
||||
Validator: validator.Validator{Valid: true},
|
||||
Validator: *v,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,10 +50,9 @@ func (v *PurchaseValidator) NodeSaleExists(ctx context.Context, qtx datagateway.
|
||||
if len(deploys) < 1 {
|
||||
v.Valid = false
|
||||
return v.Valid, nil, nil
|
||||
} else {
|
||||
v.Valid = true
|
||||
return v.Valid, &deploys[0], nil
|
||||
}
|
||||
v.Valid = true
|
||||
return v.Valid, &deploys[0], nil
|
||||
}
|
||||
|
||||
func (v *PurchaseValidator) ValidTimestamp(deploy *entity.NodeSale, timestamp time.Time) bool {
|
||||
|
||||
Reference in New Issue
Block a user