From b00a6af10e0e7e0d8d8f5f51b1ab5cf2dfb78975 Mon Sep 17 00:00:00 2001 From: Eslam-Nawara Date: Mon, 16 Sep 2024 15:15:53 +0300 Subject: [PATCH] fix lint --- clients/tfchain-client-go/account.go | 4 ++-- clients/tfchain-client-go/service_contract_test.go | 2 +- clients/tfchain-client-go/utils.go | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/clients/tfchain-client-go/account.go b/clients/tfchain-client-go/account.go index 1f36901e2..7ceded2fc 100644 --- a/clients/tfchain-client-go/account.go +++ b/clients/tfchain-client-go/account.go @@ -39,7 +39,7 @@ type AccountID types.AccountID // Balance type Balance struct { Free types.U128 `json:"free"` - Reserved types.U128 `json:"reserverd"` + Reserved types.U128 `json:"reserved"` MiscFrozen types.U128 `json:"misc_frozen"` FreeFrozen types.U128 `json:"free_frozen"` } @@ -54,7 +54,7 @@ type AccountInfo struct { // TODO: Add service response status code if avialble type ActivationServiceError struct { - StatusCode int // 0 or a valid HTTP status code. 0 indicates that a response was not recived due to an error such host unreachable. + StatusCode int // 0 or a valid HTTP status code. 0 indicates that a response was not received due to an error such host unreachable. Err error } diff --git a/clients/tfchain-client-go/service_contract_test.go b/clients/tfchain-client-go/service_contract_test.go index b92af46d2..72661fae9 100644 --- a/clients/tfchain-client-go/service_contract_test.go +++ b/clients/tfchain-client-go/service_contract_test.go @@ -85,7 +85,7 @@ func TestServiceContract(t *testing.T) { }) // 4. Bill consumer for service contract - // should be able to go to future block to test varaible amount greater than 0 + // should be able to go to future block to test variable amount greater than 0 err = cl.ServiceContractBill(serviceIdentity, serviceContractID, variableAmount, billMetadata) require.NoError(t, err) diff --git a/clients/tfchain-client-go/utils.go b/clients/tfchain-client-go/utils.go index e1d214240..88d496a73 100644 --- a/clients/tfchain-client-go/utils.go +++ b/clients/tfchain-client-go/utils.go @@ -536,11 +536,11 @@ func (s *Substrate) checkForError(callResponse *CallResponse) error { if *accId == who { if int(e.DispatchError.ModuleError.Index) < len(moduleErrors) { if int(errIndex) >= len(moduleErrors[e.DispatchError.ModuleError.Index]) || moduleErrors[e.DispatchError.ModuleError.Index] == nil { - return fmt.Errorf("module error (%d) with unknown code %d occured, please update the module error list", e.DispatchError.ModuleError.Index, e.DispatchError.ModuleError.Error) + return fmt.Errorf("module error (%d) with unknown code %d occurred, please update the module error list", e.DispatchError.ModuleError.Index, e.DispatchError.ModuleError.Error) } return errors.New(moduleErrors[e.DispatchError.ModuleError.Index][errIndex]) } else { - return fmt.Errorf("unknown module error (%d) with code %d occured, please create the module error list", e.DispatchError.ModuleError.Index, e.DispatchError.ModuleError.Error) + return fmt.Errorf("unknown module error (%d) with code %d occurred, please create the module error list", e.DispatchError.ModuleError.Index, e.DispatchError.ModuleError.Error) } } }