@heyamiko/amiko-cli 0.6.9 → 0.7.0
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 +8 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -74924,7 +74924,14 @@ function registerSwapCommand(program2) {
|
|
|
74924
74924
|
console.error(error("No auth token available for swap"));
|
|
74925
74925
|
process.exit(1);
|
|
74926
74926
|
}
|
|
74927
|
-
const
|
|
74927
|
+
const platformUrl = auth.platformUrl || "https://app.heyamiko.com";
|
|
74928
|
+
const twinId = auth.twinId;
|
|
74929
|
+
if (!twinId) {
|
|
74930
|
+
swapSpinner.stop();
|
|
74931
|
+
console.error(error("No twin ID. Check .amiko.json credentials."));
|
|
74932
|
+
process.exit(1);
|
|
74933
|
+
}
|
|
74934
|
+
const swapRes = await fetch(`${platformUrl}/api/agents/${twinId}/wallets/${encodeURIComponent(wallet)}/swap`, {
|
|
74928
74935
|
method: "POST",
|
|
74929
74936
|
headers: {
|
|
74930
74937
|
"Content-Type": "application/json",
|