From 260bcc0f499cf8372b7a209349b731d52d446b7d Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Sun, 7 Aug 2022 22:36:05 +0300 Subject: [PATCH] wallet: fix wallet version to conform to NEP-6 See neo-project/neo#2390. Can't see it there? No wonder, that's why we have this bug for a year and a half. Not critical, we don't care about versions, but _very_ annoying. --- .docker/wallets/wallet1.json | 2 +- .docker/wallets/wallet1_solo.json | 2 +- .docker/wallets/wallet2.json | 2 +- .docker/wallets/wallet3.json | 2 +- .docker/wallets/wallet4.json | 2 +- cli/testdata/testwallet.json | 2 +- cli/testdata/wallet1_solo.json | 2 +- cli/testdata/wallets/testwallet_NEO3.json | 2 +- docs/cli.md | 6 +++--- examples/my_wallet.json | 2 +- pkg/consensus/testdata/wallet1.json | 2 +- pkg/consensus/testdata/wallet2.json | 2 +- pkg/consensus/testdata/wallet3.json | 2 +- pkg/consensus/testdata/wallet4.json | 2 +- pkg/services/notary/testdata/notary1.json | 2 +- pkg/services/notary/testdata/notary2.json | 2 +- pkg/services/oracle/testdata/oracle1.json | 2 +- pkg/services/oracle/testdata/oracle2.json | 2 +- pkg/wallet/testdata/wallet1.json | 2 +- pkg/wallet/testdata/wallet2.json | 2 +- pkg/wallet/wallet.go | 2 +- 21 files changed, 23 insertions(+), 23 deletions(-) diff --git a/.docker/wallets/wallet1.json b/.docker/wallets/wallet1.json index d8d226625..acb84d220 100644 --- a/.docker/wallets/wallet1.json +++ b/.docker/wallets/wallet1.json @@ -1,5 +1,5 @@ { - "version": "3.0", + "version": "1.0", "accounts": [ { "address": "Nhfg3TbpwogLvDGVvAvqyThbsHgoSUKwtn", diff --git a/.docker/wallets/wallet1_solo.json b/.docker/wallets/wallet1_solo.json index 181bfaf0e..160153fc8 100644 --- a/.docker/wallets/wallet1_solo.json +++ b/.docker/wallets/wallet1_solo.json @@ -1,5 +1,5 @@ { - "version": "3.0", + "version": "1.0", "accounts": [ { "address": "Nhfg3TbpwogLvDGVvAvqyThbsHgoSUKwtn", diff --git a/.docker/wallets/wallet2.json b/.docker/wallets/wallet2.json index cd5514848..aea2f90cf 100644 --- a/.docker/wallets/wallet2.json +++ b/.docker/wallets/wallet2.json @@ -1,5 +1,5 @@ { - "version": "3.0", + "version": "1.0", "accounts": [ { "address": "NMUedC8TSV2rE17wGguSvPk9XcmHSaT275", diff --git a/.docker/wallets/wallet3.json b/.docker/wallets/wallet3.json index 855805c25..6695f393e 100644 --- a/.docker/wallets/wallet3.json +++ b/.docker/wallets/wallet3.json @@ -1,5 +1,5 @@ { - "version": "3.0", + "version": "1.0", "accounts": [ { "address": "NdypBhqkz2CMMnwxBgvoC9X2XjKF5axgKo", diff --git a/.docker/wallets/wallet4.json b/.docker/wallets/wallet4.json index 050c1ec69..6603258fd 100644 --- a/.docker/wallets/wallet4.json +++ b/.docker/wallets/wallet4.json @@ -1,5 +1,5 @@ { - "version": "3.0", + "version": "1.0", "accounts": [ { "address": "NPrB7BmTMYxf9UVroJp4RQExM9tqKmsHTz", diff --git a/cli/testdata/testwallet.json b/cli/testdata/testwallet.json index d68c14062..13fcd48ad 100644 --- a/cli/testdata/testwallet.json +++ b/cli/testdata/testwallet.json @@ -1,5 +1,5 @@ { - "version": "3.0", + "version": "1.0", "accounts": [ { "address": "Nfyz4KcsgYepRJw1W5C2uKCi6QWKf7v6gG", diff --git a/cli/testdata/wallet1_solo.json b/cli/testdata/wallet1_solo.json index cbd28e3b9..d71a06198 100644 --- a/cli/testdata/wallet1_solo.json +++ b/cli/testdata/wallet1_solo.json @@ -1,5 +1,5 @@ { - "version": "3.0", + "version": "1.0", "accounts": [ { "address": "Nhfg3TbpwogLvDGVvAvqyThbsHgoSUKwtn", diff --git a/cli/testdata/wallets/testwallet_NEO3.json b/cli/testdata/wallets/testwallet_NEO3.json index c21372479..320a794ea 100644 --- a/cli/testdata/wallets/testwallet_NEO3.json +++ b/cli/testdata/wallets/testwallet_NEO3.json @@ -1,5 +1,5 @@ { - "version": "3.0", + "version": "1.0", "accounts": [ { "address": "Nhfg3TbpwogLvDGVvAvqyThbsHgoSUKwtn", diff --git a/docs/cli.md b/docs/cli.md index f2f8ab15d..769597d76 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -120,7 +120,7 @@ Use `wallet init` command to create a new wallet: ./bin/neo-go wallet init -w wallet.nep6 { - "version": "3.0", + "version": "1.0", "accounts": [], "scrypt": { "n": 16384, @@ -144,7 +144,7 @@ Enter passphrase > Confirm passphrase > { - "version": "3.0", + "version": "1.0", "accounts": [ { "address": "NMe64G6j6nkPZby26JAgpaCNrn1Ee4wW6E", @@ -204,7 +204,7 @@ keys at the same time with `-d` option (you'll be prompted for password): Enter wallet password > { - "version": "3.0", + "version": "1.0", "accounts": [ { "address": "NMe64G6j6nkPZby26JAgpaCNrn1Ee4wW6E", diff --git a/examples/my_wallet.json b/examples/my_wallet.json index 1fc1f3979..982fa3abe 100644 --- a/examples/my_wallet.json +++ b/examples/my_wallet.json @@ -1,5 +1,5 @@ { - "version": "3.0", + "version": "1.0", "accounts": [ { "address": "NbrUYaZgyhSkNoRo9ugRyEMdUZxrhkNaWB", diff --git a/pkg/consensus/testdata/wallet1.json b/pkg/consensus/testdata/wallet1.json index c21372479..320a794ea 100644 --- a/pkg/consensus/testdata/wallet1.json +++ b/pkg/consensus/testdata/wallet1.json @@ -1,5 +1,5 @@ { - "version": "3.0", + "version": "1.0", "accounts": [ { "address": "Nhfg3TbpwogLvDGVvAvqyThbsHgoSUKwtn", diff --git a/pkg/consensus/testdata/wallet2.json b/pkg/consensus/testdata/wallet2.json index 3f213866c..bff5db221 100644 --- a/pkg/consensus/testdata/wallet2.json +++ b/pkg/consensus/testdata/wallet2.json @@ -1,5 +1,5 @@ { - "version": "3.0", + "version": "1.0", "accounts": [ { "address": "NMUedC8TSV2rE17wGguSvPk9XcmHSaT275", diff --git a/pkg/consensus/testdata/wallet3.json b/pkg/consensus/testdata/wallet3.json index c08ca54a5..c0f6aba87 100644 --- a/pkg/consensus/testdata/wallet3.json +++ b/pkg/consensus/testdata/wallet3.json @@ -1,5 +1,5 @@ { - "version": "3.0", + "version": "1.0", "accounts": [ { "address": "NdypBhqkz2CMMnwxBgvoC9X2XjKF5axgKo", diff --git a/pkg/consensus/testdata/wallet4.json b/pkg/consensus/testdata/wallet4.json index 83433cdf7..b4a9a319b 100644 --- a/pkg/consensus/testdata/wallet4.json +++ b/pkg/consensus/testdata/wallet4.json @@ -1,5 +1,5 @@ { - "version": "3.0", + "version": "1.0", "accounts": [ { "address": "NPrB7BmTMYxf9UVroJp4RQExM9tqKmsHTz", diff --git a/pkg/services/notary/testdata/notary1.json b/pkg/services/notary/testdata/notary1.json index 74f2bc13b..578f77e62 100644 --- a/pkg/services/notary/testdata/notary1.json +++ b/pkg/services/notary/testdata/notary1.json @@ -1,5 +1,5 @@ { - "version": "3.0", + "version": "1.0", "accounts": [ { "address": "Nbruchf1SGfar3sN4cPr1UG1bWqADrN5sh", diff --git a/pkg/services/notary/testdata/notary2.json b/pkg/services/notary/testdata/notary2.json index dcdd214d4..2536b459c 100644 --- a/pkg/services/notary/testdata/notary2.json +++ b/pkg/services/notary/testdata/notary2.json @@ -1,5 +1,5 @@ { - "version": "3.0", + "version": "1.0", "accounts": [ { "address": "NaVp3ZxwZWA84DRewRjnBLFstaeBuVMKwR", diff --git a/pkg/services/oracle/testdata/oracle1.json b/pkg/services/oracle/testdata/oracle1.json index 7f26a1ba4..14f813f73 100644 --- a/pkg/services/oracle/testdata/oracle1.json +++ b/pkg/services/oracle/testdata/oracle1.json @@ -1,5 +1,5 @@ { - "version": "3.0", + "version": "1.0", "accounts": [ { "address": "NLUCkBS5dtk1h5cedgFoVXqeoCW2UiYNrZ", diff --git a/pkg/services/oracle/testdata/oracle2.json b/pkg/services/oracle/testdata/oracle2.json index 87f196786..452e28d79 100644 --- a/pkg/services/oracle/testdata/oracle2.json +++ b/pkg/services/oracle/testdata/oracle2.json @@ -1,5 +1,5 @@ { - "version": "3.0", + "version": "1.0", "accounts": [ { "address": "NUkatH1cgvBeQyDwfyEjTqZRgjmXC1d23A", diff --git a/pkg/wallet/testdata/wallet1.json b/pkg/wallet/testdata/wallet1.json index c21372479..320a794ea 100644 --- a/pkg/wallet/testdata/wallet1.json +++ b/pkg/wallet/testdata/wallet1.json @@ -1,5 +1,5 @@ { - "version": "3.0", + "version": "1.0", "accounts": [ { "address": "Nhfg3TbpwogLvDGVvAvqyThbsHgoSUKwtn", diff --git a/pkg/wallet/testdata/wallet2.json b/pkg/wallet/testdata/wallet2.json index fb11873ce..ba3f2253d 100644 --- a/pkg/wallet/testdata/wallet2.json +++ b/pkg/wallet/testdata/wallet2.json @@ -1,5 +1,5 @@ { - "version": "3.0", + "version": "1.0", "accounts": [ { "address": "Nhfg3TbpwogLvDGVvAvqyThbsHgoSUKwtn", diff --git a/pkg/wallet/wallet.go b/pkg/wallet/wallet.go index f0801ffd0..024a5679b 100644 --- a/pkg/wallet/wallet.go +++ b/pkg/wallet/wallet.go @@ -14,7 +14,7 @@ import ( const ( // The current version of neo-go wallet implementations. - walletVersion = "3.0" + walletVersion = "1.0" ) // Wallet represents a NEO (NEP-2, NEP-6) compliant wallet.