From 707b49d0fbaf7f51c1f6f924d4bcb8abaa885540 Mon Sep 17 00:00:00 2001 From: mmsqe Date: Mon, 6 Jun 2022 15:26:09 +0800 Subject: [PATCH] fix(types): avoid invalid account error on create vesting account (#1112) * avoid invalid account error on create vesting account * this change is related to https://github.com/cosmos/cosmos-sdk/pull/12154/files * for more info see https://github.com/crypto-org-chain/cronos/issues/471 * add change doc * add comment * change under unreleased --- CHANGELOG.md | 1 + types/account.go | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d5df862..2f354042 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -62,6 +62,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (evm) [tharsis#1088](https://github.com/tharsis/ethermint/pull/1088) Fix ability to append log in tx post processing. * (rpc) [tharsis#1081](https://github.com/tharsis/ethermint/pull/1081) fix `debug_getBlockRlp`/`debug_printBlock` don't filter failed transactions. * (ante) [tharsis#1111](https://github.com/tharsis/ethermint/pull/1111) Move CanTransfer decorator before GasConsume decorator +* (types) [tharsis#1112](https://github.com/cosmos/ethermint/pull/1112) Add `GetBaseAccount` to avoid invalid account error when create vesting account. ## [v0.15.0] - 2022-05-09 diff --git a/types/account.go b/types/account.go index abdec11b..4f7f8e0d 100644 --- a/types/account.go +++ b/types/account.go @@ -52,6 +52,11 @@ func ProtoAccount() authtypes.AccountI { } } +// GetBaseAccount returns base account. +func (acc EthAccount) GetBaseAccount() *authtypes.BaseAccount { + return acc.BaseAccount +} + // EthAddress returns the account address ethereum format. func (acc EthAccount) EthAddress() common.Address { return common.BytesToAddress(acc.GetAddress().Bytes())