mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-25 13:47:19 +00:00
wallet: export SavePretty
method
Client code can make use of it, see nspcc-dev/neofs-node#1498. Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
8bc99aa229
commit
0431e26659
2 changed files with 3 additions and 3 deletions
|
@ -201,7 +201,7 @@ func createWallet(t *testing.T, path string, accs ...*Account) {
|
||||||
for _, acc := range accs {
|
for _, acc := range accs {
|
||||||
w.AddAccount(acc)
|
w.AddAccount(acc)
|
||||||
}
|
}
|
||||||
require.NoError(t, w.savePretty())
|
require.NoError(t, w.SavePretty())
|
||||||
w.Close()
|
w.Close()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -149,8 +149,8 @@ func (w *Wallet) Save() error {
|
||||||
return w.writeRaw(data)
|
return w.writeRaw(data)
|
||||||
}
|
}
|
||||||
|
|
||||||
// savePretty saves the wallet in a beautiful JSON.
|
// SavePretty saves the wallet in a beautiful JSON.
|
||||||
func (w *Wallet) savePretty() error {
|
func (w *Wallet) SavePretty() error {
|
||||||
data, err := json.MarshalIndent(w, "", " ")
|
data, err := json.MarshalIndent(w, "", " ")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
Loading…
Reference in a new issue