@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/native-libs.js
CHANGED
|
@@ -601,9 +601,9 @@ if (typeof window !== 'undefined' && window && window.Web3) {
|
|
|
601
601
|
var LibsWeb3 = Web3;
|
|
602
602
|
|
|
603
603
|
var name = "@audius/sdk";
|
|
604
|
-
var version$1 = "3.0.8-beta.
|
|
604
|
+
var version$1 = "3.0.8-beta.8";
|
|
605
605
|
var audius = {
|
|
606
|
-
releaseSHA: "
|
|
606
|
+
releaseSHA: "a4c4a74b40fe6089348aed0d7ccf545de988e506"
|
|
607
607
|
};
|
|
608
608
|
var description = "Audius SDK";
|
|
609
609
|
var keywords = [
|
|
@@ -34312,15 +34312,17 @@ var TransactionHandler = /*#__PURE__*/function () {
|
|
|
34312
34312
|
feePayerAccount,
|
|
34313
34313
|
tx,
|
|
34314
34314
|
rawTransaction,
|
|
34315
|
-
sendRawTransaction,
|
|
34316
|
-
txid,
|
|
34317
34315
|
errorCode,
|
|
34318
34316
|
error,
|
|
34317
|
+
sendRawTransaction,
|
|
34318
|
+
txid,
|
|
34319
|
+
_errorCode,
|
|
34320
|
+
_error,
|
|
34319
34321
|
done,
|
|
34320
34322
|
sendCount,
|
|
34321
34323
|
startTime,
|
|
34322
|
-
|
|
34323
|
-
|
|
34324
|
+
_errorCode2,
|
|
34325
|
+
_error2,
|
|
34324
34326
|
_args5 = arguments;
|
|
34325
34327
|
|
|
34326
34328
|
return regeneratorRuntime.wrap(function _callee5$(_context5) {
|
|
@@ -34393,8 +34395,31 @@ var TransactionHandler = /*#__PURE__*/function () {
|
|
|
34393
34395
|
});
|
|
34394
34396
|
}
|
|
34395
34397
|
|
|
34396
|
-
|
|
34398
|
+
_context5.prev = 21;
|
|
34399
|
+
rawTransaction = tx.serialize();
|
|
34400
|
+
_context5.next = 32;
|
|
34401
|
+
break;
|
|
34402
|
+
|
|
34403
|
+
case 25:
|
|
34404
|
+
_context5.prev = 25;
|
|
34405
|
+
_context5.t1 = _context5["catch"](21);
|
|
34406
|
+
logger.warn("transactionHandler: transaction serialization failed: ".concat(_context5.t1));
|
|
34407
|
+
errorCode = null;
|
|
34408
|
+
error = null;
|
|
34409
|
+
|
|
34410
|
+
if (_context5.t1 instanceof Error) {
|
|
34411
|
+
error = _context5.t1.message;
|
|
34412
|
+
errorCode = this._parseSolanaErrorCode(error);
|
|
34413
|
+
}
|
|
34414
|
+
|
|
34415
|
+
return _context5.abrupt("return", {
|
|
34416
|
+
res: null,
|
|
34417
|
+
error: error,
|
|
34418
|
+
errorCode: errorCode
|
|
34419
|
+
});
|
|
34397
34420
|
|
|
34421
|
+
case 32:
|
|
34422
|
+
// Send the txn
|
|
34398
34423
|
sendRawTransaction = /*#__PURE__*/function () {
|
|
34399
34424
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {
|
|
34400
34425
|
return regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
@@ -34424,35 +34449,35 @@ var TransactionHandler = /*#__PURE__*/function () {
|
|
|
34424
34449
|
};
|
|
34425
34450
|
}();
|
|
34426
34451
|
|
|
34427
|
-
_context5.prev =
|
|
34428
|
-
_context5.next =
|
|
34452
|
+
_context5.prev = 33;
|
|
34453
|
+
_context5.next = 36;
|
|
34429
34454
|
return sendRawTransaction();
|
|
34430
34455
|
|
|
34431
|
-
case
|
|
34456
|
+
case 36:
|
|
34432
34457
|
txid = _context5.sent;
|
|
34433
|
-
_context5.next =
|
|
34458
|
+
_context5.next = 46;
|
|
34434
34459
|
break;
|
|
34435
34460
|
|
|
34436
|
-
case
|
|
34437
|
-
_context5.prev =
|
|
34438
|
-
_context5.
|
|
34461
|
+
case 39:
|
|
34462
|
+
_context5.prev = 39;
|
|
34463
|
+
_context5.t2 = _context5["catch"](33);
|
|
34439
34464
|
// Rarely, this intiial send will fail
|
|
34440
|
-
logger.warn("transactionHandler: Initial send failed: ".concat(_context5.
|
|
34441
|
-
|
|
34442
|
-
|
|
34465
|
+
logger.warn("transactionHandler: Initial send failed: ".concat(_context5.t2));
|
|
34466
|
+
_errorCode = null;
|
|
34467
|
+
_error = null;
|
|
34443
34468
|
|
|
34444
|
-
if (_context5.
|
|
34445
|
-
|
|
34446
|
-
|
|
34469
|
+
if (_context5.t2 instanceof Error) {
|
|
34470
|
+
_error = _context5.t2.message;
|
|
34471
|
+
_errorCode = this._parseSolanaErrorCode(_error);
|
|
34447
34472
|
}
|
|
34448
34473
|
|
|
34449
34474
|
return _context5.abrupt("return", {
|
|
34450
34475
|
res: null,
|
|
34451
|
-
error:
|
|
34452
|
-
errorCode:
|
|
34476
|
+
error: _error,
|
|
34477
|
+
errorCode: _errorCode
|
|
34453
34478
|
});
|
|
34454
34479
|
|
|
34455
|
-
case
|
|
34480
|
+
case 46:
|
|
34456
34481
|
done = false; // Start up resubmission loop
|
|
34457
34482
|
|
|
34458
34483
|
sendCount = 0;
|
|
@@ -34499,11 +34524,11 @@ var TransactionHandler = /*#__PURE__*/function () {
|
|
|
34499
34524
|
} // Await for tx confirmation
|
|
34500
34525
|
|
|
34501
34526
|
|
|
34502
|
-
_context5.prev =
|
|
34503
|
-
_context5.next =
|
|
34527
|
+
_context5.prev = 50;
|
|
34528
|
+
_context5.next = 53;
|
|
34504
34529
|
return this._awaitTransactionSignatureConfirmation(txid, logger);
|
|
34505
34530
|
|
|
34506
|
-
case
|
|
34531
|
+
case 53:
|
|
34507
34532
|
done = true;
|
|
34508
34533
|
logger.info("transactionHandler: finished for txid ".concat(txid, " with ").concat(sendCount, " retries"));
|
|
34509
34534
|
return _context5.abrupt("return", {
|
|
@@ -34512,31 +34537,31 @@ var TransactionHandler = /*#__PURE__*/function () {
|
|
|
34512
34537
|
errorCode: null
|
|
34513
34538
|
});
|
|
34514
34539
|
|
|
34515
|
-
case
|
|
34516
|
-
_context5.prev =
|
|
34517
|
-
_context5.
|
|
34518
|
-
logger.warn("transactionHandler: error in awaitTransactionSignature: ".concat(JSON.stringify(_context5.
|
|
34540
|
+
case 58:
|
|
34541
|
+
_context5.prev = 58;
|
|
34542
|
+
_context5.t3 = _context5["catch"](50);
|
|
34543
|
+
logger.warn("transactionHandler: error in awaitTransactionSignature: ".concat(JSON.stringify(_context5.t3), ", ").concat(txid));
|
|
34519
34544
|
done = true;
|
|
34520
|
-
|
|
34521
|
-
|
|
34545
|
+
_errorCode2 = null;
|
|
34546
|
+
_error2 = null;
|
|
34522
34547
|
|
|
34523
|
-
if (_context5.
|
|
34524
|
-
|
|
34525
|
-
|
|
34548
|
+
if (_context5.t3 instanceof Error) {
|
|
34549
|
+
_error2 = _context5.t3.message;
|
|
34550
|
+
_errorCode2 = this._parseSolanaErrorCode(_error2);
|
|
34526
34551
|
}
|
|
34527
34552
|
|
|
34528
34553
|
return _context5.abrupt("return", {
|
|
34529
34554
|
res: null,
|
|
34530
|
-
error:
|
|
34531
|
-
errorCode:
|
|
34555
|
+
error: _error2,
|
|
34556
|
+
errorCode: _errorCode2
|
|
34532
34557
|
});
|
|
34533
34558
|
|
|
34534
|
-
case
|
|
34559
|
+
case 66:
|
|
34535
34560
|
case "end":
|
|
34536
34561
|
return _context5.stop();
|
|
34537
34562
|
}
|
|
34538
34563
|
}
|
|
34539
|
-
}, _callee5, this, [[
|
|
34564
|
+
}, _callee5, this, [[21, 25], [33, 39], [50, 58]]);
|
|
34540
34565
|
}));
|
|
34541
34566
|
|
|
34542
34567
|
function _locallyConfirmTransaction(_x5, _x6, _x7, _x8) {
|