@audius/sdk 3.0.8-beta.7 → 3.0.8-beta.8

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/core.js CHANGED
@@ -1498,15 +1498,17 @@ var TransactionHandler = /*#__PURE__*/function () {
1498
1498
  feePayerAccount,
1499
1499
  tx,
1500
1500
  rawTransaction,
1501
- sendRawTransaction,
1502
- txid,
1503
1501
  errorCode,
1504
1502
  error,
1503
+ sendRawTransaction,
1504
+ txid,
1505
+ _errorCode,
1506
+ _error,
1505
1507
  done,
1506
1508
  sendCount,
1507
1509
  startTime,
1508
- _errorCode,
1509
- _error,
1510
+ _errorCode2,
1511
+ _error2,
1510
1512
  _args5 = arguments;
1511
1513
 
1512
1514
  return regeneratorRuntime.wrap(function _callee5$(_context5) {
@@ -1579,8 +1581,31 @@ var TransactionHandler = /*#__PURE__*/function () {
1579
1581
  });
1580
1582
  }
1581
1583
 
1582
- rawTransaction = tx.serialize(); // Send the txn
1584
+ _context5.prev = 21;
1585
+ rawTransaction = tx.serialize();
1586
+ _context5.next = 32;
1587
+ break;
1588
+
1589
+ case 25:
1590
+ _context5.prev = 25;
1591
+ _context5.t1 = _context5["catch"](21);
1592
+ logger.warn("transactionHandler: transaction serialization failed: ".concat(_context5.t1));
1593
+ errorCode = null;
1594
+ error = null;
1595
+
1596
+ if (_context5.t1 instanceof Error) {
1597
+ error = _context5.t1.message;
1598
+ errorCode = this._parseSolanaErrorCode(error);
1599
+ }
1600
+
1601
+ return _context5.abrupt("return", {
1602
+ res: null,
1603
+ error: error,
1604
+ errorCode: errorCode
1605
+ });
1583
1606
 
1607
+ case 32:
1608
+ // Send the txn
1584
1609
  sendRawTransaction = /*#__PURE__*/function () {
1585
1610
  var _ref4 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {
1586
1611
  return regeneratorRuntime.wrap(function _callee3$(_context3) {
@@ -1610,35 +1635,35 @@ var TransactionHandler = /*#__PURE__*/function () {
1610
1635
  };
1611
1636
  }();
1612
1637
 
1613
- _context5.prev = 23;
1614
- _context5.next = 26;
1638
+ _context5.prev = 33;
1639
+ _context5.next = 36;
1615
1640
  return sendRawTransaction();
1616
1641
 
1617
- case 26:
1642
+ case 36:
1618
1643
  txid = _context5.sent;
1619
- _context5.next = 36;
1644
+ _context5.next = 46;
1620
1645
  break;
1621
1646
 
1622
- case 29:
1623
- _context5.prev = 29;
1624
- _context5.t1 = _context5["catch"](23);
1647
+ case 39:
1648
+ _context5.prev = 39;
1649
+ _context5.t2 = _context5["catch"](33);
1625
1650
  // Rarely, this intiial send will fail
1626
- logger.warn("transactionHandler: Initial send failed: ".concat(_context5.t1));
1627
- errorCode = null;
1628
- error = null;
1651
+ logger.warn("transactionHandler: Initial send failed: ".concat(_context5.t2));
1652
+ _errorCode = null;
1653
+ _error = null;
1629
1654
 
1630
- if (_context5.t1 instanceof Error) {
1631
- error = _context5.t1.message;
1632
- errorCode = this._parseSolanaErrorCode(error);
1655
+ if (_context5.t2 instanceof Error) {
1656
+ _error = _context5.t2.message;
1657
+ _errorCode = this._parseSolanaErrorCode(_error);
1633
1658
  }
1634
1659
 
1635
1660
  return _context5.abrupt("return", {
1636
1661
  res: null,
1637
- error: error,
1638
- errorCode: errorCode
1662
+ error: _error,
1663
+ errorCode: _errorCode
1639
1664
  });
1640
1665
 
1641
- case 36:
1666
+ case 46:
1642
1667
  done = false; // Start up resubmission loop
1643
1668
 
1644
1669
  sendCount = 0;
@@ -1685,11 +1710,11 @@ var TransactionHandler = /*#__PURE__*/function () {
1685
1710
  } // Await for tx confirmation
1686
1711
 
1687
1712
 
1688
- _context5.prev = 40;
1689
- _context5.next = 43;
1713
+ _context5.prev = 50;
1714
+ _context5.next = 53;
1690
1715
  return this._awaitTransactionSignatureConfirmation(txid, logger);
1691
1716
 
1692
- case 43:
1717
+ case 53:
1693
1718
  done = true;
1694
1719
  logger.info("transactionHandler: finished for txid ".concat(txid, " with ").concat(sendCount, " retries"));
1695
1720
  return _context5.abrupt("return", {
@@ -1698,31 +1723,31 @@ var TransactionHandler = /*#__PURE__*/function () {
1698
1723
  errorCode: null
1699
1724
  });
1700
1725
 
1701
- case 48:
1702
- _context5.prev = 48;
1703
- _context5.t2 = _context5["catch"](40);
1704
- logger.warn("transactionHandler: error in awaitTransactionSignature: ".concat(JSON.stringify(_context5.t2), ", ").concat(txid));
1726
+ case 58:
1727
+ _context5.prev = 58;
1728
+ _context5.t3 = _context5["catch"](50);
1729
+ logger.warn("transactionHandler: error in awaitTransactionSignature: ".concat(JSON.stringify(_context5.t3), ", ").concat(txid));
1705
1730
  done = true;
1706
- _errorCode = null;
1707
- _error = null;
1731
+ _errorCode2 = null;
1732
+ _error2 = null;
1708
1733
 
1709
- if (_context5.t2 instanceof Error) {
1710
- _error = _context5.t2.message;
1711
- _errorCode = this._parseSolanaErrorCode(_error);
1734
+ if (_context5.t3 instanceof Error) {
1735
+ _error2 = _context5.t3.message;
1736
+ _errorCode2 = this._parseSolanaErrorCode(_error2);
1712
1737
  }
1713
1738
 
1714
1739
  return _context5.abrupt("return", {
1715
1740
  res: null,
1716
- error: _error,
1717
- errorCode: _errorCode
1741
+ error: _error2,
1742
+ errorCode: _errorCode2
1718
1743
  });
1719
1744
 
1720
- case 56:
1745
+ case 66:
1721
1746
  case "end":
1722
1747
  return _context5.stop();
1723
1748
  }
1724
1749
  }
1725
- }, _callee5, this, [[23, 29], [40, 48]]);
1750
+ }, _callee5, this, [[21, 25], [33, 39], [50, 58]]);
1726
1751
  }));
1727
1752
 
1728
1753
  function _locallyConfirmTransaction(_x5, _x6, _x7, _x8) {