diff --git a/core/src/main/java/google/registry/flows/domain/DomainCreateFlow.java b/core/src/main/java/google/registry/flows/domain/DomainCreateFlow.java index 94d7166be..ea18605da 100644 --- a/core/src/main/java/google/registry/flows/domain/DomainCreateFlow.java +++ b/core/src/main/java/google/registry/flows/domain/DomainCreateFlow.java @@ -365,7 +365,7 @@ public final class DomainCreateFlow implements MutatingFlow { createAutorenewBillingEvent( domainHistoryId, registrationExpirationTime, - getRenewalPriceInfo(isAnchorTenant, allocationToken, feesAndCredits)); + getRenewalPriceInfo(isAnchorTenant, allocationToken)); PollMessage.Autorenew autorenewPollMessage = createAutorenewPollMessage(domainHistoryId, registrationExpirationTime); ImmutableSet.Builder entitiesToSave = new ImmutableSet.Builder<>(); @@ -688,9 +688,7 @@ public final class DomainCreateFlow implements MutatingFlow { * AllocationToken} is 'SPECIFIED'. */ static RenewalPriceInfo getRenewalPriceInfo( - boolean isAnchorTenant, - Optional allocationToken, - FeesAndCredits feesAndCredits) { + boolean isAnchorTenant, Optional allocationToken) { if (isAnchorTenant) { allocationToken.ifPresent( token -> @@ -701,7 +699,7 @@ public final class DomainCreateFlow implements MutatingFlow { } else if (allocationToken.isPresent() && allocationToken.get().getRenewalPriceBehavior() == RenewalPriceBehavior.SPECIFIED) { return RenewalPriceInfo.create( - RenewalPriceBehavior.SPECIFIED, feesAndCredits.getCreateCost()); + RenewalPriceBehavior.SPECIFIED, allocationToken.get().getRenewalPrice().get()); } else { return RenewalPriceInfo.create(RenewalPriceBehavior.DEFAULT, null); } diff --git a/core/src/test/java/google/registry/flows/domain/DomainCreateFlowTest.java b/core/src/test/java/google/registry/flows/domain/DomainCreateFlowTest.java index a7b2f87e5..9928d2809 100644 --- a/core/src/test/java/google/registry/flows/domain/DomainCreateFlowTest.java +++ b/core/src/test/java/google/registry/flows/domain/DomainCreateFlowTest.java @@ -344,8 +344,7 @@ class DomainCreateFlowTest extends ResourceFlowTestCase