mirror of
https://github.com/aljazceru/ark.git
synced 2025-12-18 04:34:19 +01:00
[SDK] Add Transaction History (#288)
* tx history * fix * fix * pr review refactor * pr review refactor * fix * pr review refactor * exclude gosec G115 Integer Overflow Conversion * ignore some gosec errs * ignore some gosec errs * ignore createdat in test assertion * Fixes (#7) * Fixes * Fixes * Update golang (#8) * update gha golangci-lint version * update gha golangci-lint version * fix linting issues * fix linting issues * fix linting issues * add linter timeout --------- Co-authored-by: Pietralberto Mazza <18440657+altafan@users.noreply.github.com>
This commit is contained in:
@@ -237,7 +237,7 @@ func post[T any](url, body, key, macaroon, tlsCert string) (result T, err error)
|
||||
return
|
||||
}
|
||||
if resp.StatusCode != http.StatusOK {
|
||||
err = fmt.Errorf(string(buf))
|
||||
err = fmt.Errorf("failed to post: %s", string(buf))
|
||||
return
|
||||
}
|
||||
if key == "" {
|
||||
@@ -283,7 +283,7 @@ func get[T any](url, key, macaroon, tlsCert string) (result T, err error) {
|
||||
return
|
||||
}
|
||||
if resp.StatusCode != http.StatusOK {
|
||||
err = fmt.Errorf(string(buf))
|
||||
err = fmt.Errorf("failed to get: %s", string(buf))
|
||||
return
|
||||
}
|
||||
|
||||
@@ -347,7 +347,7 @@ func getBalance(url, macaroon, tlsCert string) (*balance, error) {
|
||||
return nil, err
|
||||
}
|
||||
if resp.StatusCode != http.StatusOK {
|
||||
err = fmt.Errorf(string(buf))
|
||||
err = fmt.Errorf("%s", buf)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@@ -401,7 +401,7 @@ func getStatus(url, tlsCert string) (*status, error) {
|
||||
}
|
||||
|
||||
if resp.StatusCode != http.StatusOK {
|
||||
err = fmt.Errorf(string(buf))
|
||||
err = fmt.Errorf("failed to get status: %s", string(buf))
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user