remove reversal
the claims now come in ordered correctly.
This commit is contained in:
parent
82308ece97
commit
be023e0627
1 changed files with 14 additions and 18 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue