Merge pull request #14 from lbryio/remove-reversal

remove reversal
This commit is contained in:
Sean Yesmunt 2018-11-27 10:55:15 -05:00 committed by GitHub
commit e9508e259f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 20 deletions

4
dist/bundle.js vendored
View file

@ -8470,7 +8470,7 @@ rewards.claimReward = function (type, rewardParams) {
switch (type) {
case rewards.TYPE_FIRST_CHANNEL:
_lbryRedux.Lbry.claim_list_mine().then(function (claims) {
var claim = claims.reverse().find(function (foundClaim) {
var claim = claims.find(function (foundClaim) {
return foundClaim.name.length && foundClaim.name[0] === '@' && foundClaim.txid.length && foundClaim.type === 'claim';
});
if (claim) {
@ -8484,7 +8484,7 @@ rewards.claimReward = function (type, rewardParams) {
case rewards.TYPE_FIRST_PUBLISH:
_lbryRedux.Lbry.claim_list_mine().then(function (claims) {
var claim = claims.reverse().find(function (foundClaim) {
var claim = claims.find(function (foundClaim) {
return foundClaim.name.length && foundClaim.name[0] !== '@' && foundClaim.txid.length && foundClaim.type === 'claim';
});
if (claim) {

View file

@ -60,15 +60,13 @@ rewards.claimReward = (type, rewardParams) => {
case rewards.TYPE_FIRST_CHANNEL:
Lbry.claim_list_mine()
.then(claims => {
const claim = claims
.reverse()
.find(
foundClaim =>
foundClaim.name.length &&
foundClaim.name[0] === '@' &&
foundClaim.txid.length &&
foundClaim.type === 'claim'
);
const claim = claims.find(
foundClaim =>
foundClaim.name.length &&
foundClaim.name[0] === '@' &&
foundClaim.txid.length &&
foundClaim.type === 'claim'
);
if (claim) {
params.transaction_id = claim.txid;
requestReward(resolve, reject, params);
@ -82,15 +80,13 @@ rewards.claimReward = (type, rewardParams) => {
case rewards.TYPE_FIRST_PUBLISH:
Lbry.claim_list_mine()
.then(claims => {
const claim = claims
.reverse()
.find(
foundClaim =>
foundClaim.name.length &&
foundClaim.name[0] !== '@' &&
foundClaim.txid.length &&
foundClaim.type === 'claim'
);
const claim = claims.find(
foundClaim =>
foundClaim.name.length &&
foundClaim.name[0] !== '@' &&
foundClaim.txid.length &&
foundClaim.type === 'claim'
);
if (claim) {
params.transaction_id = claim.txid;
requestReward(resolve, reject, params);