Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Eslam-Nawara committed Sep 16, 2024
1 parent 3661491 commit b00a6af
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions clients/tfchain-client-go/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
}
Expand All @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion clients/tfchain-client-go/service_contract_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions clients/tfchain-client-go/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
}
Expand Down

0 comments on commit b00a6af

Please sign in to comment.