[#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 <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2021-01-28 20:17:25 +03:00 committed by Alex Vanin
parent a6785c1585
commit aaeb13f7df
2 changed files with 4 additions and 4 deletions

View file

@ -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
}

View file

@ -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")
}