diff --git a/dist/bundle.es.js b/dist/bundle.es.js index 49b2a29..d9f45d4 100644 --- a/dist/bundle.es.js +++ b/dist/bundle.es.js @@ -1552,16 +1552,14 @@ const doCheckSubscription = (subscriptionUri, shouldNotify) => (dispatch, getSta if (!savedSubscription) { throw Error(`Trying to find new content for ${subscriptionUri} but it doesn't exist in your subscriptions`); - } + } // We may be duplicating calls here. Can this logic be baked into doFetchClaimsByChannel? - const { - claimId - } = lbryRedux.parseURI(subscriptionUri); // We may be duplicating calls here. Can this logic be baked into doFetchClaimsByChannel? lbryRedux.Lbry.claim_search({ - channel_id: claimId, + channel_name: subscriptionUri, page: 1, - page_size: PAGE_SIZE + page_size: PAGE_SIZE, + winning: true }).then(result => { const { items: claimsInChannel diff --git a/dist/bundle.js b/dist/bundle.js index a3ee11d..917e4f9 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -2547,16 +2547,14 @@ var doCheckSubscription = function doCheckSubscription(subscriptionUri, shouldNo if (!savedSubscription) { throw Error("Trying to find new content for ".concat(subscriptionUri, " but it doesn't exist in your subscriptions")); - } - - var _parseURI = Object(lbry_redux__WEBPACK_IMPORTED_MODULE_3__["parseURI"])(subscriptionUri), - claimId = _parseURI.claimId; // We may be duplicating calls here. Can this logic be baked into doFetchClaimsByChannel? + } // We may be duplicating calls here. Can this logic be baked into doFetchClaimsByChannel? lbry_redux__WEBPACK_IMPORTED_MODULE_3__["Lbry"].claim_search({ - channel_id: claimId, + channel_name: subscriptionUri, page: 1, - page_size: constants_claim__WEBPACK_IMPORTED_MODULE_0__["PAGE_SIZE"] + page_size: constants_claim__WEBPACK_IMPORTED_MODULE_0__["PAGE_SIZE"], + winning: true }).then(function (result) { var claimsInChannel = result.items; // may happen if subscribed to an abandoned channel or an empty channel @@ -2639,8 +2637,8 @@ var doChannelSubscribe = function doChannelSubscribe(subscription) { }); // if the user isn't sharing data, keep the subscriptions entirely in the app if (isSharingData) { - var _parseURI2 = Object(lbry_redux__WEBPACK_IMPORTED_MODULE_3__["parseURI"])(subscription.uri), - claimId = _parseURI2.claimId; // They are sharing data, we can store their subscriptions in our internal database + var _parseURI = Object(lbry_redux__WEBPACK_IMPORTED_MODULE_3__["parseURI"])(subscription.uri), + claimId = _parseURI.claimId; // They are sharing data, we can store their subscriptions in our internal database lbryio__WEBPACK_IMPORTED_MODULE_6__["default"].call('subscription', 'new', { @@ -2667,8 +2665,8 @@ var doChannelUnsubscribe = function doChannelUnsubscribe(subscription) { }); if (isSharingData) { - var _parseURI3 = Object(lbry_redux__WEBPACK_IMPORTED_MODULE_3__["parseURI"])(subscription.uri), - claimId = _parseURI3.claimId; + var _parseURI2 = Object(lbry_redux__WEBPACK_IMPORTED_MODULE_3__["parseURI"])(subscription.uri), + claimId = _parseURI2.claimId; lbryio__WEBPACK_IMPORTED_MODULE_6__["default"].call('subscription', 'delete', { claim_id: claimId @@ -2721,8 +2719,8 @@ var doFetchMySubscriptions = function doFetchMySubscriptions() { dbSubMap[sub.claim_id] = 1; }); reduxSubscriptions.forEach(function (sub) { - var _parseURI4 = Object(lbry_redux__WEBPACK_IMPORTED_MODULE_3__["parseURI"])(sub.uri), - claimId = _parseURI4.claimId; + var _parseURI3 = Object(lbry_redux__WEBPACK_IMPORTED_MODULE_3__["parseURI"])(sub.uri), + claimId = _parseURI3.claimId; reduxSubMap[claimId] = 1; diff --git a/src/redux/actions/subscriptions.js b/src/redux/actions/subscriptions.js index dd924ac..9984f60 100644 --- a/src/redux/actions/subscriptions.js +++ b/src/redux/actions/subscriptions.js @@ -156,10 +156,13 @@ export const doCheckSubscription = (subscriptionUri: string, shouldNotify?: bool ); } - const { claimId } = parseURI(subscriptionUri); - // We may be duplicating calls here. Can this logic be baked into doFetchClaimsByChannel? - Lbry.claim_search({ channel_id: claimId, page: 1, page_size: PAGE_SIZE }).then(result => { + Lbry.claim_search({ + channel_name: subscriptionUri, + page: 1, + page_size: PAGE_SIZE, + winning: true, + }).then(result => { const { items: claimsInChannel } = result; // may happen if subscribed to an abandoned channel or an empty channel