Skip to content

Commit

Permalink
chore: nft module name
Browse files Browse the repository at this point in the history
  • Loading branch information
Senna46 committed Aug 1, 2023
1 parent 5c7fc58 commit c803d30
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 24 deletions.
18 changes: 9 additions & 9 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ import (
wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper"
wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types"

newNftkeeper "github.com/UnUniFi/chain/x/nft/keeper"
newNftModule "github.com/UnUniFi/chain/x/nft/module"
ununifinftkeeper "github.com/UnUniFi/chain/x/nft/keeper"
ununifinftmodule "github.com/UnUniFi/chain/x/nft/module"

epochs "github.com/UnUniFi/chain/x/epochs"
epochskeeper "github.com/UnUniFi/chain/x/epochs/keeper"
Expand Down Expand Up @@ -242,7 +242,7 @@ var (
authzmodule.AppModuleBasic{},
groupmodule.AppModuleBasic{},
vesting.AppModuleBasic{},
newNftModule.AppModuleBasic{},
ununifinftmodule.AppModuleBasic{},
consensus.AppModuleBasic{},
// non sdk modules
wasm.AppModuleBasic{},
Expand Down Expand Up @@ -354,7 +354,7 @@ type App struct {
FeeGrantKeeper feegrantkeeper.Keeper
GroupKeeper groupkeeper.Keeper
NFTKeeper nftkeeper.Keeper
NewNFTKeeper newNftkeeper.Keeper
UnUniFiNFTKeeper ununifinftkeeper.Keeper
ConsensusParamsKeeper consensusparamkeeper.Keeper

IBCKeeper *ibckeeper.Keeper // IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly
Expand Down Expand Up @@ -629,7 +629,7 @@ func NewApp(
app.BankKeeper,
)

app.NewNFTKeeper = newNftkeeper.NewKeeper(app.NFTKeeper, appCodec)
app.UnUniFiNFTKeeper = ununifinftkeeper.NewKeeper(app.NFTKeeper, appCodec)

// Create evidence Keeper for to register the IBC light client misbehaviour evidence route
evidenceKeeper := evidencekeeper.NewKeeper(
Expand Down Expand Up @@ -741,7 +741,7 @@ func NewApp(
keys[nftfactorytypes.MemStoreKey],
app.GetSubspace(nftfactorytypes.ModuleName),
app.AccountKeeper,
app.NewNFTKeeper,
app.UnUniFiNFTKeeper,
)

nftbackedloanKeeper := nftbackedloankeeper.NewKeeper(
Expand All @@ -752,7 +752,7 @@ func NewApp(
app.GetSubspace(nftbackedloantypes.ModuleName),
app.AccountKeeper,
app.BankKeeper,
app.NewNFTKeeper,
app.UnUniFiNFTKeeper,
)

app.EcosystemincentiveKeeper = ecosystemincentivekeeper.NewKeeper(
Expand Down Expand Up @@ -955,7 +955,7 @@ func NewApp(
params.NewAppModule(app.ParamsKeeper),
authzmodule.NewAppModule(appCodec, app.AuthzKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry),
groupmodule.NewAppModule(appCodec, app.GroupKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry),
newNftModule.NewAppModule(nftmodule.NewAppModule(appCodec, app.NFTKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry), app.NewNFTKeeper),
ununifinftmodule.NewAppModule(nftmodule.NewAppModule(appCodec, app.NFTKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry), app.UnUniFiNFTKeeper),
consensus.NewAppModule(appCodec, app.ConsensusParamsKeeper),

wasm.NewAppModule(appCodec, &app.WasmKeeper, app.StakingKeeper, app.AccountKeeper, app.BankKeeper, app.MsgServiceRouter(), app.GetSubspace(wasmtypes.ModuleName)),
Expand All @@ -969,7 +969,7 @@ func NewApp(
pricefeed.NewAppModule(appCodec, app.PricefeedKeeper, app.AccountKeeper),
derivatives.NewAppModule(appCodec, app.DerivativesKeeper, app.BankKeeper),

nftfactory.NewAppModule(appCodec, app.NftfactoryKeeper, app.NewNFTKeeper),
nftfactory.NewAppModule(appCodec, app.NftfactoryKeeper, app.UnUniFiNFTKeeper),
nftbackedloan.NewAppModule(appCodec, app.NftbackedloanKeeper, app.AccountKeeper, app.BankKeeper),
ecosystemincentive.NewAppModule(appCodec, app.EcosystemincentiveKeeper, app.BankKeeper),

Expand Down
12 changes: 6 additions & 6 deletions x/nftbackedloan/keeper/bid_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,14 @@ func (suite *KeeperTestSuite) TestPlaceBid() {
now := time.Now()
suite.ctx = suite.ctx.WithBlockTime(now)

_ = suite.app.NewNFTKeeper.SaveClass(suite.ctx, nfttypes.Class{
_ = suite.app.UnUniFiNFTKeeper.SaveClass(suite.ctx, nfttypes.Class{
Id: listing.NftId.ClassId,
Name: listing.NftId.ClassId,
Symbol: listing.NftId.ClassId,
Description: listing.NftId.ClassId,
Uri: listing.NftId.ClassId,
})
_ = suite.app.NewNFTKeeper.Mint(suite.ctx, nfttypes.NFT{
_ = suite.app.UnUniFiNFTKeeper.Mint(suite.ctx, nfttypes.NFT{
ClassId: listing.NftId.ClassId,
Id: listing.NftId.NftId,
Uri: listing.NftId.NftId,
Expand Down Expand Up @@ -160,14 +160,14 @@ func (suite *KeeperTestSuite) TestSafeCloseBid() {
now := time.Now()
suite.ctx = suite.ctx.WithBlockTime(now)

_ = suite.app.NewNFTKeeper.SaveClass(suite.ctx, nfttypes.Class{
_ = suite.app.UnUniFiNFTKeeper.SaveClass(suite.ctx, nfttypes.Class{
Id: listing.NftId.ClassId,
Name: listing.NftId.ClassId,
Symbol: listing.NftId.ClassId,
Description: listing.NftId.ClassId,
Uri: listing.NftId.ClassId,
})
_ = suite.app.NewNFTKeeper.Mint(suite.ctx, nfttypes.NFT{
_ = suite.app.UnUniFiNFTKeeper.Mint(suite.ctx, nfttypes.NFT{
ClassId: listing.NftId.ClassId,
Id: listing.NftId.NftId,
Uri: listing.NftId.NftId,
Expand Down Expand Up @@ -244,14 +244,14 @@ func (suite *KeeperTestSuite) TestPayRemainder() {
now := time.Now()
suite.ctx = suite.ctx.WithBlockTime(now)

_ = suite.app.NewNFTKeeper.SaveClass(suite.ctx, nfttypes.Class{
_ = suite.app.UnUniFiNFTKeeper.SaveClass(suite.ctx, nfttypes.Class{
Id: listing.NftId.ClassId,
Name: listing.NftId.ClassId,
Symbol: listing.NftId.ClassId,
Description: listing.NftId.ClassId,
Uri: listing.NftId.ClassId,
})
_ = suite.app.NewNFTKeeper.Mint(suite.ctx, nfttypes.NFT{
_ = suite.app.UnUniFiNFTKeeper.Mint(suite.ctx, nfttypes.NFT{
ClassId: listing.NftId.ClassId,
Id: listing.NftId.NftId,
Uri: listing.NftId.NftId,
Expand Down
8 changes: 4 additions & 4 deletions x/nftbackedloan/keeper/loan_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,14 +124,14 @@ func (suite *KeeperTestSuite) TestManualBorrow() {
now := time.Now()
suite.ctx = suite.ctx.WithBlockTime(now)

_ = suite.app.NewNFTKeeper.SaveClass(suite.ctx, nfttypes.Class{
_ = suite.app.UnUniFiNFTKeeper.SaveClass(suite.ctx, nfttypes.Class{
Id: listing.NftId.ClassId,
Name: listing.NftId.ClassId,
Symbol: listing.NftId.ClassId,
Description: listing.NftId.ClassId,
Uri: listing.NftId.ClassId,
})
_ = suite.app.NewNFTKeeper.Mint(suite.ctx, nfttypes.NFT{
_ = suite.app.UnUniFiNFTKeeper.Mint(suite.ctx, nfttypes.NFT{
ClassId: listing.NftId.ClassId,
Id: listing.NftId.NftId,
Uri: listing.NftId.NftId,
Expand Down Expand Up @@ -288,14 +288,14 @@ func (suite *KeeperTestSuite) TestManualRepay() {
now := time.Now()
suite.ctx = suite.ctx.WithBlockTime(now)

_ = suite.app.NewNFTKeeper.SaveClass(suite.ctx, nfttypes.Class{
_ = suite.app.UnUniFiNFTKeeper.SaveClass(suite.ctx, nfttypes.Class{
Id: listing.NftId.ClassId,
Name: listing.NftId.ClassId,
Symbol: listing.NftId.ClassId,
Description: listing.NftId.ClassId,
Uri: listing.NftId.ClassId,
})
_ = suite.app.NewNFTKeeper.Mint(suite.ctx, nfttypes.NFT{
_ = suite.app.UnUniFiNFTKeeper.Mint(suite.ctx, nfttypes.NFT{
ClassId: listing.NftId.ClassId,
Id: listing.NftId.NftId,
Uri: listing.NftId.NftId,
Expand Down
6 changes: 3 additions & 3 deletions x/nftbackedloan/keeper/nft_listing_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -358,14 +358,14 @@ func (suite *KeeperTestSuite) TestDeliverSuccessfulBids() {
err = suite.app.BankKeeper.SendCoinsFromModuleToAccount(suite.ctx, minttypes.ModuleName, nftOwner, sdk.Coins{price})
suite.NoError(err)

_ = suite.app.NewNFTKeeper.SaveClass(suite.ctx, nfttypes.Class{
_ = suite.app.UnUniFiNFTKeeper.SaveClass(suite.ctx, nfttypes.Class{
Id: classId,
Name: classId,
Symbol: classId,
Description: classId,
Uri: classId,
})
err = suite.app.NewNFTKeeper.Mint(suite.ctx, nfttypes.NFT{
err = suite.app.UnUniFiNFTKeeper.Mint(suite.ctx, nfttypes.NFT{
ClassId: classId,
Id: nftId,
Uri: nftId,
Expand Down Expand Up @@ -419,7 +419,7 @@ func (suite *KeeperTestSuite) TestDeliverSuccessfulBids() {
keeper.DeliverSuccessfulBids(suite.ctx)

// check nft transfer
newNftOwner := suite.app.NewNFTKeeper.GetOwner(suite.ctx, classId, nftId)
newNftOwner := suite.app.UnUniFiNFTKeeper.GetOwner(suite.ctx, classId, nftId)
suite.Require().NoError(err)
suite.Require().Equal(newNftOwner.String(), bidder.String())

Expand Down
4 changes: 2 additions & 2 deletions x/nftbackedloan/keeper/sell_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,14 @@ func (suite *KeeperTestSuite) TestSellingDecision() {
err = suite.app.BankKeeper.SendCoinsFromModuleToAccount(suite.ctx, minttypes.ModuleName, tc.executor, sdk.Coins{coin})
suite.NoError(err)

_ = suite.app.NewNFTKeeper.SaveClass(suite.ctx, nfttypes.Class{
_ = suite.app.UnUniFiNFTKeeper.SaveClass(suite.ctx, nfttypes.Class{
Id: tc.classId,
Name: tc.classId,
Symbol: tc.classId,
Description: tc.classId,
Uri: tc.classId,
})
err = suite.app.NewNFTKeeper.Mint(suite.ctx, nfttypes.NFT{
err = suite.app.UnUniFiNFTKeeper.Mint(suite.ctx, nfttypes.NFT{
ClassId: tc.classId,
Id: tc.nftId,
Uri: tc.nftId,
Expand Down

0 comments on commit c803d30

Please sign in to comment.