[#521] *: use stdlib errors package

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
Evgenii Stratonikov 2021-05-18 11:12:51 +03:00 committed by Alex Vanin
parent 43e575cec2
commit 71b87155ef
171 changed files with 825 additions and 674 deletions

View file

@ -1,8 +1,9 @@
package wrapper
import (
"fmt"
"github.com/nspcc-dev/neofs-node/pkg/morph/client/balance"
"github.com/pkg/errors"
)
// Decimals decimal precision of currency transactions
@ -14,7 +15,7 @@ func (w *Wrapper) Decimals() (uint32, error) {
// invoke smart contract call
values, err := w.client.Decimals(args)
if err != nil {
return 0, errors.Wrap(err, "could not invoke smart contract")
return 0, fmt.Errorf("could not invoke smart contract: %w", err)
}
return uint32(values.Decimals()), nil