@heyamiko/amiko-cli 0.5.8 → 0.5.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +13 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -75483,9 +75483,20 @@ function registerCreditsCommand(program2) {
|
|
|
75483
75483
|
process.exit(1);
|
|
75484
75484
|
}
|
|
75485
75485
|
console.log(label("Tx Hash", dim(txHash.slice(0, 16) + "...")));
|
|
75486
|
-
|
|
75486
|
+
let keyId = auth.connectedKeyId;
|
|
75487
|
+
if (!keyId && authToken) {
|
|
75488
|
+
try {
|
|
75489
|
+
const keysRes = await fetch(`${auth.billingBase || "https://billing.heyamiko.com"}/api/user/keys`, { headers: { Authorization: `Bearer ${authToken}` } });
|
|
75490
|
+
if (keysRes.ok) {
|
|
75491
|
+
const keysData = await keysRes.json();
|
|
75492
|
+
const active = keysData.keys?.find((k6) => k6.isActive !== false);
|
|
75493
|
+
if (active)
|
|
75494
|
+
keyId = active.id;
|
|
75495
|
+
}
|
|
75496
|
+
} catch {}
|
|
75497
|
+
}
|
|
75487
75498
|
if (!keyId) {
|
|
75488
|
-
console.log(warn("No
|
|
75499
|
+
console.log(warn("No API key found — transfer sent but credits not verified."));
|
|
75489
75500
|
console.log(dim(`Tx: ${txHash}`));
|
|
75490
75501
|
process.exit(0);
|
|
75491
75502
|
}
|