Skip to content

Commit

Permalink
Merge pull request #323 from comdex-official/feature/esm
Browse files Browse the repository at this point in the history
fixed err handling
  • Loading branch information
dheerajkd30 authored Jul 5, 2022
2 parents 8267e1d + 6e3886f commit 59bee96
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
5 changes: 4 additions & 1 deletion x/auction/keeper/dutch.go
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,10 @@ func (k Keeper) RestartDutchAuctions(ctx sdk.Context, appID uint64) error {
}
} else {
// create new vault done
k.CreateNewVault(ctx, dutchAuction.VaultOwner.String(), lockedVault.AppId, lockedVault.ExtendedPairId, dutchAuction.OutflowTokenCurrentAmount.Amount, dutchAuction.InflowTokenCurrentAmount.Amount)
err := k.CreateNewVault(ctx, dutchAuction.VaultOwner.String(), lockedVault.AppId, lockedVault.ExtendedPairId, dutchAuction.OutflowTokenCurrentAmount.Amount, dutchAuction.InflowTokenCurrentAmount.Amount)
if err != nil {
return err
}
}

dutchAuction.AuctionStatus = auctiontypes.AuctionEnded
Expand Down
4 changes: 3 additions & 1 deletion x/esm/keeper/msg_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ func (k msgServer) MsgKillSwitch(c context.Context, msg *types.MsgKillRequest) (
return nil, types.ErrorUnauthorized
}

k.keeper.SetKillSwitchData(ctx, *msg.KillSwitchParams)
if err := k.keeper.SetKillSwitchData(ctx, *msg.KillSwitchParams); err != nil {
return nil, err
}

return &types.MsgKillResponse{}, nil
}
5 changes: 4 additions & 1 deletion x/vault/keeper/vault.go
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,10 @@ func (k *Keeper) CreateNewVault(ctx sdk.Context, From string, AppId uint64, Exte
}
}

k.SetAppExtendedPairVaultMapping(ctx, app_extended_pair_vault_data)
err := k.SetAppExtendedPairVaultMapping(ctx, app_extended_pair_vault_data)
if err != nil {
return err
}

//////////////////
// k.UpdateAppExtendedPairVaultMappingDataOnMsgCreate(ctx, updated_counter, new_vault)
Expand Down

0 comments on commit 59bee96

Please sign in to comment.