Skip to content

Commit

Permalink
Merge pull request #47 from sidan-lab/main
Browse files Browse the repository at this point in the history
feat: include 202 status for submit tx
  • Loading branch information
Vardominator authored Apr 23, 2024
2 parents fa0911f + e08715a commit 2d3e4c9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/txmanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func (c *Client) TxManagerSubmit(txHex string) (string, error) {
if err != nil {
return "", err
}
if resp.StatusCode != http.StatusOK {
if resp.StatusCode != http.StatusOK && resp.StatusCode != http.StatusAccepted {
return "", fmt.Errorf("unexpected error: %d", resp.Body)
}
defer resp.Body.Close()
Expand All @@ -60,7 +60,7 @@ func (c *Client) TxManagerSubmitTurbo(txHex string) (string, error) {
if err != nil {
return "", err
}
if resp.StatusCode != http.StatusOK {
if resp.StatusCode != http.StatusOK && resp.StatusCode != http.StatusAccepted {
return "", fmt.Errorf("unexpected error: %d", resp.Body)
}
defer resp.Body.Close()
Expand Down

0 comments on commit 2d3e4c9

Please sign in to comment.