mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-12-23 23:25:22 +00:00
Merge pull request #2549 from nspcc-dev/wallet-save-pretty
wallet: export `SavePretty` method
This commit is contained in:
commit
2c9fb20442
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 {
|
||||
w.AddAccount(acc)
|
||||
}
|
||||
require.NoError(t, w.savePretty())
|
||||
require.NoError(t, w.SavePretty())
|
||||
w.Close()
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue