From 14dcaa64581579fcf85f4314ed47b04e28954ad7 Mon Sep 17 00:00:00 2001 From: Alessio Treglia Date: Tue, 29 Jan 2019 13:45:30 -0800 Subject: [PATCH] Merge PR #3421: Upgrade ledger-cosmos-go dep to 0.9.3 * Upgrading to ledger-cosmos-go * Add cli test and update PENDING.md --- Gopkg.lock | 6 +++--- Gopkg.toml | 2 +- PENDING.md | 3 +++ cmd/gaia/cli_test/cli_test.go | 8 ++++++++ cmd/gaia/cli_test/test_helpers.go | 6 ++++++ 5 files changed, 21 insertions(+), 4 deletions(-) diff --git a/Gopkg.lock b/Gopkg.lock index fa9eec6a67..97fcf67347 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -522,12 +522,12 @@ revision = "v0.29.0" [[projects]] - digest = "1:a7485b2a69f996923f9d3406a9a853fd8eb31818515e985a830d71f88f6a925b" + digest = "1:29b886f00694ae7c18c4559a2901f2a057d5a62308ed5eb6cd52b9a31016fb14" name = "github.com/zondax/ledger-cosmos-go" packages = ["."] pruneopts = "UT" - revision = "d4aed6d929a703bb555a2d79fe9c470afe61f648" - version = "v0.9.2" + revision = "71aa0ab6e03d2d320c82bbe13678a36584a5b813" + version = "v0.9.3" [[projects]] digest = "1:6f6dc6060c4e9ba73cf28aa88f12a69a030d3d19d518ef8e931879eaa099628d" diff --git a/Gopkg.toml b/Gopkg.toml index 54a64d419a..1bf115d619 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -44,7 +44,7 @@ [[constraint]] name = "github.com/zondax/ledger-cosmos-go" - version = "=v0.9.2" + version = "=v0.9.3" ## deps without releases: diff --git a/PENDING.md b/PENDING.md index 7814facca7..09daf76586 100644 --- a/PENDING.md +++ b/PENDING.md @@ -58,6 +58,9 @@ BUG FIXES * Gaia CLI (`gaiacli`) - [\#3417](https://github.com/cosmos/cosmos-sdk/pull/3417) Fix `q slashing signing-info` panic by ensuring safety of user input and properly returning not found error + - [\#3345](https://github.com/cosmos/cosmos-sdk/issues/3345) Upgrade ledger-cosmos-go dependency to v0.9.3 to pull + https://github.com/ZondaX/ledger-cosmos-go/commit/ed9aa39ce8df31bad1448c72d3d226bf2cb1a8d1 in order to fix a derivation path issue that causes `gaiacli keys add --recover` + to malfunction. - [\#3419](https://github.com/cosmos/cosmos-sdk/pull/3419) Fix `q distr slashes` panic * Gaia diff --git a/cmd/gaia/cli_test/cli_test.go b/cmd/gaia/cli_test/cli_test.go index 845f4c95df..6e2e60536c 100644 --- a/cmd/gaia/cli_test/cli_test.go +++ b/cmd/gaia/cli_test/cli_test.go @@ -45,6 +45,14 @@ func TestGaiaCLIKeysAddMultisig(t *testing.T) { require.NotEqual(t, f.KeysShow("msig3").Address, f.KeysShow("msig4").Address) } +func TestGaiaCLIKeysAddRecover(t *testing.T) { + t.Parallel() + f := InitFixtures(t) + + f.KeysAddRecover("test-recover", "dentist task convince chimney quality leave banana trade firm crawl eternal easily") + require.Equal(t, f.KeyAddress("test-recover").String(), "cosmos1qcfdf69js922qrdr4yaww3ax7gjml6pdds46f4") +} + func TestGaiaCLIMinimumFees(t *testing.T) { t.Parallel() f := InitFixtures(t) diff --git a/cmd/gaia/cli_test/test_helpers.go b/cmd/gaia/cli_test/test_helpers.go index 9b42e592b8..b2288382f0 100644 --- a/cmd/gaia/cli_test/test_helpers.go +++ b/cmd/gaia/cli_test/test_helpers.go @@ -226,6 +226,12 @@ func (f *Fixtures) KeysAdd(name string, flags ...string) { executeWriteCheckErr(f.T, addFlags(cmd, flags), app.DefaultKeyPass) } +// KeysAdd is gaiacli keys add --recover +func (f *Fixtures) KeysAddRecover(name, mnemonic string, flags ...string) { + cmd := fmt.Sprintf("gaiacli keys add --home=%s --recover %s", f.GCLIHome, name) + executeWriteCheckErr(f.T, addFlags(cmd, flags), app.DefaultKeyPass, mnemonic) +} + // KeysShow is gaiacli keys show func (f *Fixtures) KeysShow(name string, flags ...string) keys.KeyOutput { cmd := fmt.Sprintf("gaiacli keys show --home=%s %s", f.GCLIHome, name)