@lawrenceliang-btc/atel-sdk 1.1.40 → 1.1.41

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.
Files changed (2) hide show
  1. package/bin/atel.mjs +6 -4
  2. package/package.json +1 -1
package/bin/atel.mjs CHANGED
@@ -3646,7 +3646,8 @@ Format:
3646
3646
  if (fastOrderId) {
3647
3647
  // Payload may not include chain — fetch order to check
3648
3648
  try {
3649
- const orderInfo = await fetchOrderState(fastOrderId);
3649
+ const _resp = await fetch(`${PLATFORM_URL}/trade/v1/order/${fastOrderId}`, { signal: AbortSignal.timeout(10000) });
3650
+ const orderInfo = _resp.ok ? await _resp.json() : null;
3650
3651
  const orderChain = orderInfo?.chain || orderInfo?.Chain || '';
3651
3652
  if (orderChain === 'fast-coop') {
3652
3653
  log({ event: 'fast_submit_triggered', orderId: fastOrderId, chain: orderChain });
@@ -8397,9 +8398,10 @@ async function cmdAliasRemove(args) {
8397
8398
  // private key (= Fast Ed25519 account key).
8398
8399
  async function submitFastDeliverable(orderId, identity) {
8399
8400
  try {
8400
- // 1. Get order info to find the escrow job_id
8401
- const orderInfo = await fetchOrderState(orderId);
8402
- if (!orderInfo) throw new Error('cannot fetch order');
8401
+ // 1. Get order info
8402
+ const orderResp = await fetch(`${PLATFORM_URL}/trade/v1/order/${orderId}`, { signal: AbortSignal.timeout(10000) });
8403
+ if (!orderResp.ok) throw new Error(`order fetch failed: ${orderResp.status}`);
8404
+ const orderInfo = await orderResp.json();
8403
8405
  const chain = orderInfo.chain || orderInfo.Chain || '';
8404
8406
  if (chain !== 'fast-coop') return;
8405
8407
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lawrenceliang-btc/atel-sdk",
3
- "version": "1.1.40",
3
+ "version": "1.1.41",
4
4
  "description": "ATEL Protocol SDK - Agent Trust & Exchange Layer",
5
5
  "repository": {
6
6
  "type": "git",