Merge pull request #2549 from nspcc-dev/wallet-save-pretty

wallet: export `SavePretty` method
This commit is contained in:
Roman Khimov 2022-06-09 11:29:21 +03:00 committed by GitHub
commit 2c9fb20442
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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 {
w.AddAccount(acc)
}
require.NoError(t, w.savePretty())
require.NoError(t, w.SavePretty())
w.Close()
}

View file

@ -149,8 +149,8 @@ func (w *Wallet) Save() error {
return w.writeRaw(data)
}
// savePretty saves the wallet in a beautiful JSON.
func (w *Wallet) savePretty() error {
// SavePretty saves the wallet in a beautiful JSON.
func (w *Wallet) SavePretty() error {
data, err := json.MarshalIndent(w, "", " ")
if err != nil {
return err