@audius/sdk 3.0.3-beta.69 → 3.0.3-beta.70

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.
@@ -178,7 +178,7 @@ export declare class Track extends Base {
178
178
  */
179
179
  addTracksToChainV2(trackMetadatas: TrackMetadata[]): Promise<{
180
180
  error: boolean;
181
- trackIds: number[];
181
+ trackIds: (number | null)[];
182
182
  }>;
183
183
  /**
184
184
  * Adds the given track's metadata to chain for this user, optionally creating a trackId if one doesn't exist.
package/dist/index.cjs.js CHANGED
@@ -31131,9 +31131,9 @@ var EthWeb3Manager = /*#__PURE__*/function () {
31131
31131
  }();
31132
31132
 
31133
31133
  var name = "@audius/sdk";
31134
- var version = "3.0.3-beta.69";
31134
+ var version = "3.0.3-beta.70";
31135
31135
  var audius = {
31136
- releaseSHA: "997ff885d15fcd0e8a77ae4da6892f712c49f5d9"
31136
+ releaseSHA: "7574803d6ab02b40764f5dd067ea1227ea83b8fb"
31137
31137
  };
31138
31138
  var description = "Audius SDK";
31139
31139
  var main = "dist/index.cjs.js";
@@ -69907,7 +69907,7 @@ var Track = /*#__PURE__*/function (_Base) {
69907
69907
  var _addTracksToChainV = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee20(trackMetadatas) {
69908
69908
  var _this2 = this;
69909
69909
 
69910
- var ownerId, trackIds, requestFailed, error;
69910
+ var ownerId, requestFailed, trackIds, error;
69911
69911
  return regeneratorRuntime.wrap(function _callee20$(_context20) {
69912
69912
  while (1) {
69913
69913
  switch (_context20.prev = _context20.next) {
@@ -69922,9 +69922,10 @@ var Track = /*#__PURE__*/function (_Base) {
69922
69922
  throw new Error('No users loaded for this wallet');
69923
69923
 
69924
69924
  case 3:
69925
- trackIds = [];
69925
+ // Any failures in adding track to the blockchain will prevent further progress.
69926
+ // The list of successful track uploads is returned for revert operations by caller
69926
69927
  requestFailed = false;
69927
- _context20.next = 7;
69928
+ _context20.next = 6;
69928
69929
  return Promise.all(trackMetadatas.map( /*#__PURE__*/function () {
69929
69930
  var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee19(trackMetadata) {
69930
69931
  var _yield$_this2$writeTr, trackId;
@@ -69940,17 +69941,16 @@ var Track = /*#__PURE__*/function (_Base) {
69940
69941
  case 3:
69941
69942
  _yield$_this2$writeTr = _context19.sent;
69942
69943
  trackId = _yield$_this2$writeTr.trackId;
69943
- trackIds.push(trackId);
69944
- _context19.next = 12;
69945
- break;
69944
+ return _context19.abrupt("return", trackId);
69946
69945
 
69947
69946
  case 8:
69948
69947
  _context19.prev = 8;
69949
69948
  _context19.t0 = _context19["catch"](0);
69950
69949
  requestFailed = true;
69951
69950
  console.error("Failed to add track to chain: ".concat(_context19.t0));
69951
+ return _context19.abrupt("return", null);
69952
69952
 
69953
- case 12:
69953
+ case 13:
69954
69954
  case "end":
69955
69955
  return _context19.stop();
69956
69956
  }
@@ -69963,17 +69963,15 @@ var Track = /*#__PURE__*/function (_Base) {
69963
69963
  };
69964
69964
  }()));
69965
69965
 
69966
- case 7:
69967
- // Any failures in addding track to the blockchain will prevent further progress.
69968
- // The list of successful track uploads is returned for revert operations by caller
69969
- trackIds = trackIds.filter(Boolean);
69966
+ case 6:
69967
+ trackIds = _context20.sent.filter(Boolean);
69970
69968
  error = requestFailed || trackIds.length !== trackMetadatas.length;
69971
69969
  return _context20.abrupt("return", {
69972
69970
  error: error,
69973
69971
  trackIds: trackIds
69974
69972
  });
69975
69973
 
69976
- case 10:
69974
+ case 9:
69977
69975
  case "end":
69978
69976
  return _context20.stop();
69979
69977
  }