1
0
mirror of https://github.com/google/nomulus synced 2026-06-04 14:02:51 +00:00

Add premium name check for default token

This commit is contained in:
Sarah Botwinick
2023-04-24 15:23:19 -04:00
parent e1f29a8103
commit 3f3c426240

View File

@@ -131,6 +131,7 @@ import google.registry.model.tld.label.ReservationType;
import google.registry.model.tld.label.ReservedList;
import google.registry.model.tmch.ClaimsList;
import google.registry.persistence.VKey;
import google.registry.pricing.PricingEngineProxy;
import google.registry.tldconfig.idn.IdnLabelValidator;
import google.registry.tools.DigestType;
import google.registry.util.Idn;
@@ -1231,6 +1232,11 @@ public class DomainFlowUtils {
// the list
continue;
}
// Don't apply token to premium names if token not valid for premiums
if (PricingEngineProxy.isDomainPremium(domainName, now)
&& !token.get().shouldDiscountPremiums()) {
continue;
}
// Only use the first valid token in the list
return token;
}