*: always close the wallet after use

Fix #2631.
This commit is contained in:
Roman Khimov 2022-09-01 21:44:49 +03:00
parent ee5f8b6c21
commit 58dc8d0c9b
11 changed files with 29 additions and 1 deletions

View file

@ -33,6 +33,7 @@ func ExampleBuilder() {
b.Reset() // Copy the old script above if you need it!
w, _ := wallet.NewWalletFromFile("somewhere")
defer w.Close()
// Assuming there is one Account inside
a, _ := actor.NewSimple(c, w.Accounts[0])
from := w.Accounts[0].Contract.ScriptHash() // Assuming Contract is present.