wao 0.22.4 → 0.23.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.
@@ -272,7 +272,7 @@ var Adaptor = /*#__PURE__*/function () {
272
272
  while (1) switch (_context9.prev = _context9.next) {
273
273
  case 0:
274
274
  _context9.t0 = req.path;
275
- _context9.next = _context9.t0 === "/" ? 3 : _context9.t0 === "/wallet/:id/balance" ? 6 : _context9.t0 === "/mint/:id/:amount" ? 9 : _context9.t0 === "/tx/:id/offset" ? 12 : _context9.t0 === "/tx_anchor" ? 15 : _context9.t0 === "/mine" ? 18 : _context9.t0 === "/:id" ? 21 : _context9.t0 === "/price/:id" ? 24 : 27;
275
+ _context9.next = _context9.t0 === "/" ? 3 : _context9.t0 === "/tx" ? 6 : _context9.t0 === "/wallet/:id/balance" ? 9 : _context9.t0 === "/mint/:id/:amount" ? 12 : _context9.t0 === "/tx/:id/offset" ? 15 : _context9.t0 === "/tx_anchor" ? 18 : _context9.t0 === "/mine" ? 21 : _context9.t0 === "/:id" ? 24 : _context9.t0 === "/price/:id" ? 27 : 30;
276
276
  break;
277
277
  case 3:
278
278
  _context9.next = 5;
@@ -281,45 +281,50 @@ var Adaptor = /*#__PURE__*/function () {
281
281
  return _context9.abrupt("return", _context9.sent);
282
282
  case 6:
283
283
  _context9.next = 8;
284
- return this.ar_get_wallet_balance(req);
284
+ return this.ar_get_tx(req);
285
285
  case 8:
286
286
  return _context9.abrupt("return", _context9.sent);
287
287
  case 9:
288
288
  _context9.next = 11;
289
- return this.ar_get_mint(req);
289
+ return this.ar_get_wallet_balance(req);
290
290
  case 11:
291
291
  return _context9.abrupt("return", _context9.sent);
292
292
  case 12:
293
293
  _context9.next = 14;
294
- return this.ar_get_tx_offset(req);
294
+ return this.ar_get_mint(req);
295
295
  case 14:
296
296
  return _context9.abrupt("return", _context9.sent);
297
297
  case 15:
298
298
  _context9.next = 17;
299
- return this.ar_get_tx_anchor(req);
299
+ return this.ar_get_tx_offset(req);
300
300
  case 17:
301
301
  return _context9.abrupt("return", _context9.sent);
302
302
  case 18:
303
303
  _context9.next = 20;
304
- return this.ar_get_mine(req);
304
+ return this.ar_get_tx_anchor(req);
305
305
  case 20:
306
306
  return _context9.abrupt("return", _context9.sent);
307
307
  case 21:
308
308
  _context9.next = 23;
309
- return this.ar_get_id(req);
309
+ return this.ar_get_mine(req);
310
310
  case 23:
311
311
  return _context9.abrupt("return", _context9.sent);
312
312
  case 24:
313
313
  _context9.next = 26;
314
- return this.ar_get_price(req);
314
+ return this.ar_get_id(req);
315
315
  case 26:
316
316
  return _context9.abrupt("return", _context9.sent);
317
317
  case 27:
318
318
  _context9.next = 29;
319
- return this.bad();
319
+ return this.ar_get_price(req);
320
320
  case 29:
321
321
  return _context9.abrupt("return", _context9.sent);
322
322
  case 30:
323
+ _context9.next = 32;
324
+ return this.bad();
325
+ case 32:
326
+ return _context9.abrupt("return", _context9.sent);
327
+ case 33:
323
328
  case "end":
324
329
  return _context9.stop();
325
330
  }
@@ -1597,31 +1602,32 @@ var Adaptor = /*#__PURE__*/function () {
1597
1602
  query = _ref25.query, params = _ref25.params, body = _ref25.body, headers = _ref25.headers, method = _ref25.method;
1598
1603
  _context42.prev = 1;
1599
1604
  _query = body.query, variables = body.variables;
1605
+ console.log(_query, variables);
1600
1606
  _toGraphObj = (0, _utils.toGraphObj)({
1601
1607
  query: _query,
1602
1608
  variables: variables
1603
1609
  }), tar = _toGraphObj.tar, args = _toGraphObj.args;
1604
1610
  res2 = null;
1605
1611
  if (!(tar === "transactions")) {
1606
- _context42.next = 11;
1612
+ _context42.next = 12;
1607
1613
  break;
1608
1614
  }
1609
- _context42.next = 8;
1615
+ _context42.next = 9;
1610
1616
  return this.gql.txs(_objectSpread({}, args));
1611
- case 8:
1617
+ case 9:
1612
1618
  res2 = _context42.sent;
1613
- _context42.next = 15;
1619
+ _context42.next = 16;
1614
1620
  break;
1615
- case 11:
1621
+ case 12:
1616
1622
  if (!(tar === "blocks")) {
1617
- _context42.next = 15;
1623
+ _context42.next = 16;
1618
1624
  break;
1619
1625
  }
1620
- _context42.next = 14;
1626
+ _context42.next = 15;
1621
1627
  return this.gql.blocks(_objectSpread({}, args));
1622
- case 14:
1623
- res2 = _context42.sent;
1624
1628
  case 15:
1629
+ res2 = _context42.sent;
1630
+ case 16:
1625
1631
  edges = (0, _ramda.map)(function (v) {
1626
1632
  return {
1627
1633
  node: v,
@@ -1638,19 +1644,19 @@ var Adaptor = /*#__PURE__*/function () {
1638
1644
  })
1639
1645
  }
1640
1646
  });
1641
- case 19:
1642
- _context42.prev = 19;
1647
+ case 20:
1648
+ _context42.prev = 20;
1643
1649
  _context42.t0 = _context42["catch"](1);
1644
1650
  console.log(_context42.t0);
1645
1651
  return _context42.abrupt("return", {
1646
1652
  status: 400,
1647
1653
  error: "bad request"
1648
1654
  });
1649
- case 23:
1655
+ case 24:
1650
1656
  case "end":
1651
1657
  return _context42.stop();
1652
1658
  }
1653
- }, _callee42, this, [[1, 19]]);
1659
+ }, _callee42, this, [[1, 20]]);
1654
1660
  }));
1655
1661
  function ar_post_graphql(_x42) {
1656
1662
  return _ar_post_graphql.apply(this, arguments);