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:
Evgeniy Stratonikov 2022-06-09 09:47:09 +03:00
parent 8bc99aa229
commit 0431e26659
2 changed files with 3 additions and 3 deletions

View file

@ -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()
} }

View file

@ -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