Skip to content

Commit c43a734

Browse files
committed
Lint
1 parent 532510f commit c43a734

3 files changed

Lines changed: 6 additions & 5 deletions

File tree

chains/lighter/message/lighter.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ import (
2323
)
2424

2525
var (
26-
ARBITRUM_CHAIN_ID = big.NewInt(42161)
27-
FILL_DEADLINE = time.Minute * 5
28-
WITHDRAWAL_ACCOUNT_INDEX = 3
26+
ARBITRUM_CHAIN_ID = big.NewInt(42161)
27+
FILL_DEADLINE = time.Minute * 5
28+
WITHDRAWAL_ACCOUNT_INDEX uint64 = 3
2929
)
3030

3131
type Coordinator interface {
@@ -105,6 +105,7 @@ func (h *LighterMessageHandler) HandleMessage(m *message.Message) (*proposal.Pro
105105
h.usdcAddress,
106106
ARBITRUM_CHAIN_ID,
107107
h.lighterAddress,
108+
//nolint:gosec
108109
uint64(time.Now().Add(FILL_DEADLINE).Unix()),
109110
data.Caller,
110111
data.LiquidityPool,
@@ -138,7 +139,7 @@ func (h *LighterMessageHandler) verifyWithdrawal(tx *lighter.LighterTx) error {
138139
return errors.New("invalid transaction type")
139140
}
140141

141-
if tx.Transfer.ToAccountIndex != uint64(WITHDRAWAL_ACCOUNT_INDEX) {
142+
if tx.Transfer.ToAccountIndex != WITHDRAWAL_ACCOUNT_INDEX {
142143
return errors.New("transfer account index invalid")
143144
}
144145

protocol/lighter/api_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ func Test_LighterAPI_GetTx(t *testing.T) {
6262

6363
for _, tc := range tests {
6464
t.Run(tc.name, func(t *testing.T) {
65-
6665
client := lighter.NewLighterAPI()
6766
client.HTTPClient.Transport = roundTripperFunc(func(req *http.Request) (*http.Response, error) {
6867
expectedURL := fmt.Sprintf("%s/v1/tx?by=hash&value=%s", lighter.LIGHTER_URL, tc.id)

protocol/lighter/mock/mockData.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//nolint:gosec
12
package mock
23

34
const LighterMockResponse = `

0 commit comments

Comments
 (0)