@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 +62 -37
- package/dist/core.js.map +1 -1
- package/dist/index.cjs.js +64 -39
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +64 -39
- package/dist/index.esm.js.map +1 -1
- package/dist/legacy.js +64 -39
- package/dist/legacy.js.map +1 -1
- package/dist/native-libs.js +64 -39
- package/dist/native-libs.js.map +1 -1
- package/dist/web-libs.js +64 -39
- package/dist/web-libs.js.map +1 -1
- package/package.json +2 -2
- package/src/services/solana/transactionHandler.ts +17 -1
package/dist/web-libs.js
CHANGED
|
@@ -35984,9 +35984,9 @@ var EthWeb3Manager = /*#__PURE__*/function () {
|
|
|
35984
35984
|
}();
|
|
35985
35985
|
|
|
35986
35986
|
var name = "@audius/sdk";
|
|
35987
|
-
var version = "3.0.8-beta.
|
|
35987
|
+
var version = "3.0.8-beta.8";
|
|
35988
35988
|
var audius = {
|
|
35989
|
-
releaseSHA: "
|
|
35989
|
+
releaseSHA: "a4c4a74b40fe6089348aed0d7ccf545de988e506"
|
|
35990
35990
|
};
|
|
35991
35991
|
var description = "Audius SDK";
|
|
35992
35992
|
var keywords = [
|
|
@@ -53335,15 +53335,17 @@ var TransactionHandler = /*#__PURE__*/function () {
|
|
|
53335
53335
|
feePayerAccount,
|
|
53336
53336
|
tx,
|
|
53337
53337
|
rawTransaction,
|
|
53338
|
-
sendRawTransaction,
|
|
53339
|
-
txid,
|
|
53340
53338
|
errorCode,
|
|
53341
53339
|
error,
|
|
53340
|
+
sendRawTransaction,
|
|
53341
|
+
txid,
|
|
53342
|
+
_errorCode,
|
|
53343
|
+
_error,
|
|
53342
53344
|
done,
|
|
53343
53345
|
sendCount,
|
|
53344
53346
|
startTime,
|
|
53345
|
-
|
|
53346
|
-
|
|
53347
|
+
_errorCode2,
|
|
53348
|
+
_error2,
|
|
53347
53349
|
_args5 = arguments;
|
|
53348
53350
|
|
|
53349
53351
|
return regeneratorRuntime.wrap(function _callee5$(_context5) {
|
|
@@ -53416,8 +53418,31 @@ var TransactionHandler = /*#__PURE__*/function () {
|
|
|
53416
53418
|
});
|
|
53417
53419
|
}
|
|
53418
53420
|
|
|
53419
|
-
|
|
53421
|
+
_context5.prev = 21;
|
|
53422
|
+
rawTransaction = tx.serialize();
|
|
53423
|
+
_context5.next = 32;
|
|
53424
|
+
break;
|
|
53425
|
+
|
|
53426
|
+
case 25:
|
|
53427
|
+
_context5.prev = 25;
|
|
53428
|
+
_context5.t1 = _context5["catch"](21);
|
|
53429
|
+
logger.warn("transactionHandler: transaction serialization failed: ".concat(_context5.t1));
|
|
53430
|
+
errorCode = null;
|
|
53431
|
+
error = null;
|
|
53420
53432
|
|
|
53433
|
+
if (_context5.t1 instanceof Error) {
|
|
53434
|
+
error = _context5.t1.message;
|
|
53435
|
+
errorCode = this._parseSolanaErrorCode(error);
|
|
53436
|
+
}
|
|
53437
|
+
|
|
53438
|
+
return _context5.abrupt("return", {
|
|
53439
|
+
res: null,
|
|
53440
|
+
error: error,
|
|
53441
|
+
errorCode: errorCode
|
|
53442
|
+
});
|
|
53443
|
+
|
|
53444
|
+
case 32:
|
|
53445
|
+
// Send the txn
|
|
53421
53446
|
sendRawTransaction = /*#__PURE__*/function () {
|
|
53422
53447
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {
|
|
53423
53448
|
return regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
@@ -53447,35 +53472,35 @@ var TransactionHandler = /*#__PURE__*/function () {
|
|
|
53447
53472
|
};
|
|
53448
53473
|
}();
|
|
53449
53474
|
|
|
53450
|
-
_context5.prev =
|
|
53451
|
-
_context5.next =
|
|
53475
|
+
_context5.prev = 33;
|
|
53476
|
+
_context5.next = 36;
|
|
53452
53477
|
return sendRawTransaction();
|
|
53453
53478
|
|
|
53454
|
-
case
|
|
53479
|
+
case 36:
|
|
53455
53480
|
txid = _context5.sent;
|
|
53456
|
-
_context5.next =
|
|
53481
|
+
_context5.next = 46;
|
|
53457
53482
|
break;
|
|
53458
53483
|
|
|
53459
|
-
case
|
|
53460
|
-
_context5.prev =
|
|
53461
|
-
_context5.
|
|
53484
|
+
case 39:
|
|
53485
|
+
_context5.prev = 39;
|
|
53486
|
+
_context5.t2 = _context5["catch"](33);
|
|
53462
53487
|
// Rarely, this intiial send will fail
|
|
53463
|
-
logger.warn("transactionHandler: Initial send failed: ".concat(_context5.
|
|
53464
|
-
|
|
53465
|
-
|
|
53488
|
+
logger.warn("transactionHandler: Initial send failed: ".concat(_context5.t2));
|
|
53489
|
+
_errorCode = null;
|
|
53490
|
+
_error = null;
|
|
53466
53491
|
|
|
53467
|
-
if (_context5.
|
|
53468
|
-
|
|
53469
|
-
|
|
53492
|
+
if (_context5.t2 instanceof Error) {
|
|
53493
|
+
_error = _context5.t2.message;
|
|
53494
|
+
_errorCode = this._parseSolanaErrorCode(_error);
|
|
53470
53495
|
}
|
|
53471
53496
|
|
|
53472
53497
|
return _context5.abrupt("return", {
|
|
53473
53498
|
res: null,
|
|
53474
|
-
error:
|
|
53475
|
-
errorCode:
|
|
53499
|
+
error: _error,
|
|
53500
|
+
errorCode: _errorCode
|
|
53476
53501
|
});
|
|
53477
53502
|
|
|
53478
|
-
case
|
|
53503
|
+
case 46:
|
|
53479
53504
|
done = false; // Start up resubmission loop
|
|
53480
53505
|
|
|
53481
53506
|
sendCount = 0;
|
|
@@ -53522,11 +53547,11 @@ var TransactionHandler = /*#__PURE__*/function () {
|
|
|
53522
53547
|
} // Await for tx confirmation
|
|
53523
53548
|
|
|
53524
53549
|
|
|
53525
|
-
_context5.prev =
|
|
53526
|
-
_context5.next =
|
|
53550
|
+
_context5.prev = 50;
|
|
53551
|
+
_context5.next = 53;
|
|
53527
53552
|
return this._awaitTransactionSignatureConfirmation(txid, logger);
|
|
53528
53553
|
|
|
53529
|
-
case
|
|
53554
|
+
case 53:
|
|
53530
53555
|
done = true;
|
|
53531
53556
|
logger.info("transactionHandler: finished for txid ".concat(txid, " with ").concat(sendCount, " retries"));
|
|
53532
53557
|
return _context5.abrupt("return", {
|
|
@@ -53535,31 +53560,31 @@ var TransactionHandler = /*#__PURE__*/function () {
|
|
|
53535
53560
|
errorCode: null
|
|
53536
53561
|
});
|
|
53537
53562
|
|
|
53538
|
-
case
|
|
53539
|
-
_context5.prev =
|
|
53540
|
-
_context5.
|
|
53541
|
-
logger.warn("transactionHandler: error in awaitTransactionSignature: ".concat(JSON.stringify(_context5.
|
|
53563
|
+
case 58:
|
|
53564
|
+
_context5.prev = 58;
|
|
53565
|
+
_context5.t3 = _context5["catch"](50);
|
|
53566
|
+
logger.warn("transactionHandler: error in awaitTransactionSignature: ".concat(JSON.stringify(_context5.t3), ", ").concat(txid));
|
|
53542
53567
|
done = true;
|
|
53543
|
-
|
|
53544
|
-
|
|
53568
|
+
_errorCode2 = null;
|
|
53569
|
+
_error2 = null;
|
|
53545
53570
|
|
|
53546
|
-
if (_context5.
|
|
53547
|
-
|
|
53548
|
-
|
|
53571
|
+
if (_context5.t3 instanceof Error) {
|
|
53572
|
+
_error2 = _context5.t3.message;
|
|
53573
|
+
_errorCode2 = this._parseSolanaErrorCode(_error2);
|
|
53549
53574
|
}
|
|
53550
53575
|
|
|
53551
53576
|
return _context5.abrupt("return", {
|
|
53552
53577
|
res: null,
|
|
53553
|
-
error:
|
|
53554
|
-
errorCode:
|
|
53578
|
+
error: _error2,
|
|
53579
|
+
errorCode: _errorCode2
|
|
53555
53580
|
});
|
|
53556
53581
|
|
|
53557
|
-
case
|
|
53582
|
+
case 66:
|
|
53558
53583
|
case "end":
|
|
53559
53584
|
return _context5.stop();
|
|
53560
53585
|
}
|
|
53561
53586
|
}
|
|
53562
|
-
}, _callee5, this, [[
|
|
53587
|
+
}, _callee5, this, [[21, 25], [33, 39], [50, 58]]);
|
|
53563
53588
|
}));
|
|
53564
53589
|
|
|
53565
53590
|
function _locallyConfirmTransaction(_x5, _x6, _x7, _x8) {
|