Update kaigen credit private key
This commit is contained in:
@@ -36,7 +36,6 @@
|
|||||||
"Kaigen": {
|
"Kaigen": {
|
||||||
"BaseUrl": "https://api.kaigen.managing.live",
|
"BaseUrl": "https://api.kaigen.managing.live",
|
||||||
"DebitEndpoint": "/api/credits/debit",
|
"DebitEndpoint": "/api/credits/debit",
|
||||||
"RefundEndpoint": "/api/credits/refund",
|
"RefundEndpoint": "/api/credits/refund"
|
||||||
"PrivateKey": "${KAIGEN_PRIVATE_KEY}"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -27,8 +27,7 @@
|
|||||||
"Kaigen": {
|
"Kaigen": {
|
||||||
"BaseUrl": "https://api.kaigen.managing.live",
|
"BaseUrl": "https://api.kaigen.managing.live",
|
||||||
"DebitEndpoint": "/api/credits/debit",
|
"DebitEndpoint": "/api/credits/debit",
|
||||||
"RefundEndpoint": "/api/credits/refund",
|
"RefundEndpoint": "/api/credits/refund"
|
||||||
"PrivateKey": "0x0fb7fbebde2b9a14b039fa974ad330dd693f91e783cd4ea13ed38be8706835a7"
|
|
||||||
},
|
},
|
||||||
"N8n": {
|
"N8n": {
|
||||||
"WebhookUrl": "https://n8n.kai.managing.live/webhook/fa9308b6-983b-42ec-b085-71599d655951"
|
"WebhookUrl": "https://n8n.kai.managing.live/webhook/fa9308b6-983b-42ec-b085-71599d655951"
|
||||||
|
|||||||
@@ -36,6 +36,14 @@ public class KaigenService : IKaigenService
|
|||||||
PropertyNamingPolicy = JsonNamingPolicy.CamelCase
|
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
|
// Validate required settings
|
||||||
if (string.IsNullOrEmpty(_settings.PrivateKey))
|
if (string.IsNullOrEmpty(_settings.PrivateKey))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user