mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-07-18 01:44:38 +08:00
fix: auto-convert wallet address to EIP-55 checksum format for Lighter API
This commit is contained in:
@@ -99,6 +99,10 @@ func NewLighterTraderV2(walletAddr, apiKeyPrivateKeyHex string, apiKeyIndex int,
|
||||
return nil, fmt.Errorf("wallet address is required")
|
||||
}
|
||||
|
||||
// Convert to checksum address (Lighter API is case-sensitive)
|
||||
walletAddr = ToChecksumAddress(walletAddr)
|
||||
logger.Infof("Using checksum address: %s", walletAddr)
|
||||
|
||||
// 2. Validate API Key
|
||||
if apiKeyPrivateKeyHex == "" {
|
||||
return nil, fmt.Errorf("API Key private key is required")
|
||||
|
||||
Reference in New Issue
Block a user