Skip to content

Commit 1b0010d

Browse files
committed
remove some comments
1 parent 0ab7e7a commit 1b0010d

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

protocol/lighter/api.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,16 +112,14 @@ func LighterCheckRetry(ctx context.Context, resp *http.Response, err error) (boo
112112
// First try to unmarshal as LighterError
113113
e := new(LighterError)
114114
if err := json.Unmarshal(body, e); err == nil && e.Code == TX_NOT_FOUND_ERROR_CODE {
115-
// Retry on TX_NOT_FOUND_ERROR_CODE
116115
return true, nil
117116
}
118117

119-
// Check if it's a LighterTx with code 200 but missing info (before custom UnmarshalJSON runs)
118+
// Check if it's a LighterTx with code 200 but missing info
120119
var raw map[string]interface{}
121120
if err := json.Unmarshal(body, &raw); err == nil {
122121
if code, ok := raw["code"].(float64); ok && code == TX_FOUND_STATUS_CODE {
123122
info, hasInfo := raw["info"].(string)
124-
// Retry if info is missing or empty
125123
if !hasInfo || info == "" {
126124
return true, nil
127125
}

0 commit comments

Comments
 (0)