From 418aa5a14b04937d960fb671531f18488b525691 Mon Sep 17 00:00:00 2001 From: Adam Moser <63419657+toteki@users.noreply.github.com> Date: Fri, 22 Apr 2022 07:43:26 -0700 Subject: [PATCH] fix: liquidate command from-address (#829) (cherry picked from commit 183987d704f9b3951921aac9dc62b5fdf59bd9d8) --- CHANGELOG.md | 3 +++ x/leverage/simulation/operations.go | 2 +- x/leverage/types/tx.go | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dd5c33659d..897be82dc6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,6 +46,9 @@ Ref: https://keepachangelog.com/en/1.0.0/ ## [Unreleased] +### Bug Fixes +- [829](https://github.com/umee-network/umee/pull/829) Fix `umeed tx leverage liquidate` command args + ### Improvements - [781](https://github.com/umee-network/umee/pull/781) Oracle module unit test cleanup. diff --git a/x/leverage/simulation/operations.go b/x/leverage/simulation/operations.go index 6134b186ee..611e0c99f7 100644 --- a/x/leverage/simulation/operations.go +++ b/x/leverage/simulation/operations.go @@ -291,7 +291,7 @@ func SimulateMsgLiquidate(ak simulation.AccountKeeper, bk types.BankKeeper, lk k Msg: msg, MsgType: types.EventTypeLiquidate, Context: ctx, - SimAccount: borrower, + SimAccount: liquidator, AccountKeeper: ak, Bankkeeper: bk, ModuleName: types.ModuleName, diff --git a/x/leverage/types/tx.go b/x/leverage/types/tx.go index c169e41eac..b00e010db9 100644 --- a/x/leverage/types/tx.go +++ b/x/leverage/types/tx.go @@ -173,7 +173,7 @@ func (msg *MsgRepayAsset) GetSignBytes() []byte { func NewMsgLiquidate(liquidator, borrower sdk.AccAddress, repayment, reward sdk.Coin) *MsgLiquidate { return &MsgLiquidate{ - Liquidator: borrower.String(), + Liquidator: liquidator.String(), Borrower: borrower.String(), Repayment: repayment, Reward: reward,