File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,9 +23,9 @@ import (
2323)
2424
2525var (
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
3131type 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
Original file line number Diff line number Diff 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 )
Original file line number Diff line number Diff line change 1+ //nolint:gosec
12package mock
23
34const LighterMockResponse = `
You can’t perform that action at this time.
0 commit comments