Fix API call uses wrong API key configured (#751)

This commit is contained in:
Lawrence Liu
2025-11-09 09:46:03 +08:00
committed by GitHub
parent 2bb4f9ec99
commit f656a9c0fe

View File

@@ -1019,6 +1019,12 @@ func (d *Database) GetTraderConfig(userID, traderID string) (*TraderRecord, *AIM
return nil, nil, nil, err
}
// 解密敏感数据
aiModel.APIKey = d.decryptSensitiveData(aiModel.APIKey)
exchange.APIKey = d.decryptSensitiveData(exchange.APIKey)
exchange.SecretKey = d.decryptSensitiveData(exchange.SecretKey)
exchange.AsterPrivateKey = d.decryptSensitiveData(exchange.AsterPrivateKey)
return &trader, &aiModel, &exchange, nil
}