Skip to content
This repository has been archived by the owner on Oct 24, 2024. It is now read-only.

Commit

Permalink
revert defaultsubdomainconfig return type
Browse files Browse the repository at this point in the history
  • Loading branch information
taryune committed Dec 4, 2023
1 parent bcd5976 commit c7be9d2
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion x/registry/keeper/query_domain_registration_fee.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func (k Keeper) DomainRegistrationFee(goCtx context.Context, req *types.QueryDom
config := types.GetDefaultSubdomainConfig(1)
domain := types.TopLevelDomain{
Name: req.Name,
SubdomainConfig: config,
SubdomainConfig: &config,
}
err := k.ValidateTopLevelDomainIsRegistrable(ctx, domain)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion x/registry/keeper/top_level_domain.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ func (k Keeper) RegisterTopLevelDomain(ctx sdk.Context, creator string, domainNa
Name: domainName,
ExpirationDate: expirationDate,
Metadata: nil,
SubdomainConfig: defaultRegistrationConfig,
SubdomainConfig: &defaultRegistrationConfig,
AccessControl: accessControl,
TotalWithdrawalAmount: sdk.NewCoins(),
}
Expand Down
2 changes: 1 addition & 1 deletion x/registry/types/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func GetDefaultTLDs() (defaultTLDs []TopLevelDomain) {
for _, v := range GetDefaultTLDNames() {
defaultTLDs = append(defaultTLDs, TopLevelDomain{
Name: v,
SubdomainConfig: defaultRegistrationConfig,
SubdomainConfig: &defaultRegistrationConfig,
})
}
return defaultTLDs
Expand Down
5 changes: 2 additions & 3 deletions x/registry/types/subdomain_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@ import (
"github.com/mycel-domain/mycel/app/params"
)

func GetDefaultSubdomainConfig(baseFee int64) *SubdomainConfig {
func GetDefaultSubdomainConfig(baseFee int64) SubdomainConfig {
defaultFee := sdk.NewCoin(params.DefaultBondDenom, sdk.NewInt(baseFee))

return &SubdomainConfig{
return SubdomainConfig{
MaxSubdomainRegistrations: 100_000,
SubdomainRegistrationFees: &SubdomainRegistrationFees{
DefaultFee: &defaultFee,
Expand Down

0 comments on commit c7be9d2

Please sign in to comment.