Common components refactor #1
2 changed files with 3 additions and 27 deletions
|
@ -884,10 +884,9 @@ Object.defineProperty(exports, "__esModule", {
|
||||||
|
|
||||||
__webpack_require__(16);
|
__webpack_require__(16);
|
||||||
|
|
||||||
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
|
|
||||||
|
|
||||||
var CHECK_DAEMON_STARTED_TRY_NUMBER = 200;
|
var CHECK_DAEMON_STARTED_TRY_NUMBER = 200;
|
||||||
|
|
||||||
|
|
||||||
var Lbry = {
|
var Lbry = {
|
||||||
isConnected: false,
|
isConnected: false,
|
||||||
daemonConnectionString: 'http://localhost:5279',
|
daemonConnectionString: 'http://localhost:5279',
|
||||||
|
@ -1040,21 +1039,7 @@ Lbry.claim_list_mine = function () {
|
||||||
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
||||||
return new Promise(function (resolve, reject) {
|
return new Promise(function (resolve, reject) {
|
||||||
apiCall('claim_list_mine', params, function (claims) {
|
apiCall('claim_list_mine', params, function (claims) {
|
||||||
claims.forEach(function (_ref) {
|
resolve(claims);
|
||||||
var name = _ref.name,
|
|
||||||
channelName = _ref.channel_name,
|
|
||||||
txid = _ref.txid,
|
|
||||||
nout = _ref.nout;
|
|
||||||
|
|
||||||
removePendingPublishIfNeeded({
|
|
||||||
name: name,
|
|
||||||
channelName: channelName,
|
|
||||||
outpoint: txid + ':' + nout
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
var dummyClaims = Lbry.getPendingPublishes().map(pendingPublishToDummyClaim);
|
|
||||||
resolve([].concat(_toConsumableArray(claims), _toConsumableArray(dummyClaims)));
|
|
||||||
}, reject);
|
}, reject);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
11
src/lbry.js
11
src/lbry.js
|
@ -159,16 +159,7 @@ Lbry.claim_list_mine = (params = {}) =>
|
||||||
'claim_list_mine',
|
'claim_list_mine',
|
||||||
params,
|
params,
|
||||||
claims => {
|
claims => {
|
||||||
claims.forEach(({ name, channel_name: channelName, txid, nout }) => {
|
resolve(claims);
|
||||||
removePendingPublishIfNeeded({
|
|
||||||
name,
|
|
||||||
channelName,
|
|
||||||
outpoint: `${txid}:${nout}`,
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
const dummyClaims = Lbry.getPendingPublishes().map(pendingPublishToDummyClaim);
|
|
||||||
resolve([...claims, ...dummyClaims]);
|
|
||||||
},
|
},
|
||||||
reject
|
reject
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue