Skip to content

Commit

Permalink
Merge pull request #220 from DecentralCardGame/217-remove-giving-star…
Browse files Browse the repository at this point in the history
…ter-cards-to-new-accounts

feat(#217): Removed giving startercards to new users
  • Loading branch information
lxgr-linux authored May 3, 2024
2 parents 2de2378 + 8cade00 commit ec4d05b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
12 changes: 0 additions & 12 deletions x/cardchain/keeper/card.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,3 @@ func (k Keeper) SetCardToTrial(ctx sdk.Context, cardId uint64, votePool sdk.Coin
k.Cards.Set(ctx, cardId, card)
k.SetLastCardModifiedNow(ctx)
}

func (k Keeper) GetAllStarterCards(ctx sdk.Context) (cards []uint64) {
iter := k.Cards.GetItemIterator(ctx)

for ; iter.Valid(); iter.Next() {
idx, gottenCard := iter.Value()
if gottenCard.StarterCard {
cards = append(cards, idx)
}
}
return
}
1 change: 0 additions & 1 deletion x/cardchain/keeper/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ func (k Keeper) InitUser(ctx sdk.Context, address sdk.AccAddress, alias string)
return err
}
newUser.Alias = alias
newUser.Cards = k.GetAllStarterCards(ctx)
err = k.MintCoinsToAddr(ctx, address, sdk.Coins{sdk.NewInt64Coin("ucredits", 10000000000)})
if err != nil {
return err
Expand Down

0 comments on commit ec4d05b

Please sign in to comment.