Update kaigen credit private key
This commit is contained in:
@@ -36,7 +36,6 @@
|
||||
"Kaigen": {
|
||||
"BaseUrl": "https://api.kaigen.managing.live",
|
||||
"DebitEndpoint": "/api/credits/debit",
|
||||
"RefundEndpoint": "/api/credits/refund",
|
||||
"PrivateKey": "${KAIGEN_PRIVATE_KEY}"
|
||||
"RefundEndpoint": "/api/credits/refund"
|
||||
}
|
||||
}
|
||||
@@ -27,8 +27,7 @@
|
||||
"Kaigen": {
|
||||
"BaseUrl": "https://api.kaigen.managing.live",
|
||||
"DebitEndpoint": "/api/credits/debit",
|
||||
"RefundEndpoint": "/api/credits/refund",
|
||||
"PrivateKey": "0x0fb7fbebde2b9a14b039fa974ad330dd693f91e783cd4ea13ed38be8706835a7"
|
||||
"RefundEndpoint": "/api/credits/refund"
|
||||
},
|
||||
"N8n": {
|
||||
"WebhookUrl": "https://n8n.kai.managing.live/webhook/fa9308b6-983b-42ec-b085-71599d655951"
|
||||
|
||||
@@ -36,6 +36,14 @@ public class KaigenService : IKaigenService
|
||||
PropertyNamingPolicy = JsonNamingPolicy.CamelCase
|
||||
};
|
||||
|
||||
// Always read from environment variable for security
|
||||
var envPrivateKey = Environment.GetEnvironmentVariable("KAIGEN_PRIVATE_KEY");
|
||||
if (!string.IsNullOrEmpty(envPrivateKey))
|
||||
{
|
||||
_settings.PrivateKey = envPrivateKey;
|
||||
_logger.LogInformation("Using KAIGEN_PRIVATE_KEY from environment variable");
|
||||
}
|
||||
|
||||
// Validate required settings
|
||||
if (string.IsNullOrEmpty(_settings.PrivateKey))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user