From aaeb13f7df6df4d173f40d83a48be02ffa882cc6 Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Thu, 28 Jan 2021 20:17:25 +0300 Subject: [PATCH] [#326] ir: Change construction of Balance contact client Use client with extraFee instead of readOnlyFee. Rename NewNoFeeBalanceClient to NewBalanceClient since no-fee client is no longer used. Signed-off-by: Leonard Lyubich --- pkg/innerring/innerring.go | 2 +- pkg/innerring/invoke/enhanced.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/innerring/innerring.go b/pkg/innerring/innerring.go index 213bfd3c92..5b011e22c6 100644 --- a/pkg/innerring/innerring.go +++ b/pkg/innerring/innerring.go @@ -404,7 +404,7 @@ func New(ctx context.Context, log *zap.Logger, cfg *viper.Viper) (*Server, error return nil, err } - balClient, err := invoke.NewNoFeeBalanceClient(server.morphClient, server.contracts.balance) + balClient, err := invoke.NewBalanceClient(server.morphClient, server.contracts.balance) if err != nil { return nil, err } diff --git a/pkg/innerring/invoke/enhanced.go b/pkg/innerring/invoke/enhanced.go index b89d55bd36..c3a0ebdfd5 100644 --- a/pkg/innerring/invoke/enhanced.go +++ b/pkg/innerring/invoke/enhanced.go @@ -58,9 +58,9 @@ func NewNoFeeAuditClient(cli *client.Client, contract util.Uint160) (*auditWrapp return auditWrapper.WrapClient(audit.New(staticClient)), nil } -// NewNoFeeBalanceClient creates wrapper to work with Balance contract. -func NewNoFeeBalanceClient(cli *client.Client, contract util.Uint160) (*balanceWrapper.Wrapper, error) { - staticClient, err := client.NewStatic(cli, contract, readOnlyFee) +// NewBalanceClient creates wrapper to work with Balance contract. +func NewBalanceClient(cli *client.Client, contract util.Uint160) (*balanceWrapper.Wrapper, error) { + staticClient, err := client.NewStatic(cli, contract, extraFee) if err != nil { return nil, errors.Wrap(err, "could not create static client of Balance contract") }