Skip to content

Commit

Permalink
fixed simapp and rewards tests
Browse files Browse the repository at this point in the history
  • Loading branch information
stefan.balea committed Aug 19, 2024
1 parent 2a3db56 commit a621649
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion testutil/simapp/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,7 @@ func New(
return app
}

func (app *App) setupUpgradeHandlers(cfg module.Configurator) {
func (app *SimApp) setupUpgradeHandlers(cfg module.Configurator) {
app.UpgradeKeeper.SetUpgradeHandler(
v710.UpgradeName,
v710.CreateUpgradeHandler(cfg, app.mm),
Expand Down
6 changes: 3 additions & 3 deletions x/rewards/keeper/msg_server_staking_reward_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ func (suite *IntegrationTestSuite) TestCreateStakingReward_Success() {
initialUserBalances := suite.app.BankKeeper.GetAllBalances(suite.ctx, addr1)
suite.Require().True(initialUserBalances.IsZero())

balances := sdk.NewCoins(sdk.NewInt64Coin("ubze", 20000000000))
balances := sdk.NewCoins(sdk.NewInt64Coin("ubze", 40_000_000_000))
suite.Require().NoError(simapp.FundAccount(suite.app.BankKeeper, suite.ctx, addr1, balances))

msg := types.MsgCreateStakingReward{
Expand All @@ -330,9 +330,9 @@ func (suite *IntegrationTestSuite) TestCreateStakingReward_Success() {
suite.Require().EqualValues(1, storeStakingReward.Lock)
suite.Require().EqualValues(0, storeStakingReward.Payouts)

expectedRemainingBalance := sdk.NewCoins(sdk.NewInt64Coin("ubze", 9999999000))
expectedRemainingBalance := sdk.NewCoins(sdk.NewInt64Coin("ubze", 14999999000))
actualRemainingBalance := suite.app.BankKeeper.GetAllBalances(suite.ctx, addr1)
suite.Require().True(actualRemainingBalance.IsEqual(expectedRemainingBalance))
suite.Require().EqualValues(expectedRemainingBalance, actualRemainingBalance)
}

func (suite *IntegrationTestSuite) TestUpdateStakingReward_Success() {
Expand Down
2 changes: 1 addition & 1 deletion x/rewards/keeper/msg_server_trading_reward_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ func (suite *IntegrationTestSuite) TestCreateTradingReward_Success() {
initialUserBalances := suite.app.BankKeeper.GetAllBalances(suite.ctx, addr1)
suite.Require().True(initialUserBalances.IsZero())

balances := sdk.NewCoins(sdk.NewInt64Coin("ubze", 10000002000))
balances := sdk.NewCoins(sdk.NewInt64Coin("ubze", 50000002000))
suite.Require().NoError(simapp.FundAccount(suite.app.BankKeeper, suite.ctx, addr1, balances))
suite.app.TradebinKeeper.SetMarket(suite.ctx, types2.Market{
Base: "stake",
Expand Down

0 comments on commit a621649

Please sign in to comment.