Skip to content

Commit

Permalink
Update label
Browse files Browse the repository at this point in the history
  • Loading branch information
AzmiTouil committed Oct 21, 2024
1 parent bbf114a commit 17a102b
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public boolean hasErrorTransactions() {
return getFailedTransactionCount() > 0;
}

public boolean isCompletelyProceeded() {
public boolean isCompletelyProcessed() {
// Can be greater if in the mean time of transaction confirmation, a member
// has been invalidated / disabled / deleted
return getTransactionsCount() > 0 && getSuccessTransactionCount() >= getValidRewardCount();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@ public class RewardReportStatus {

private double tokensToSend;

private boolean completelyProceeded;
private boolean completelyProcessed;

}
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public void execute() {
// progress
RewardReport rewardReport = rewardReportService.computeRewards(rewardPeriod.getPeriodMedianDate());
if (rewardReport != null) {
if (rewardReport.isCompletelyProceeded()) {
if (rewardReport.isCompletelyProcessed()) {
listenerService.broadcast(REWARD_SUCCESS_EVENT_NAME, rewardReport, null);
rewardReportService.saveRewardReport(rewardReport);
} else if (rewardReport.getPendingTransactionCount() == 0 && rewardReport.getTokensSent() == 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ private RewardReportStatus buildReportStatus(RewardReport rewardReport, RewardPe
achievementsCount,
rewardReport.getTokensSent(),
rewardReport.getTokensToSend(),
CollectionUtils.isNotEmpty(rewardReport.getRewards()) && rewardReport.isCompletelyProceeded());
CollectionUtils.isNotEmpty(rewardReport.getRewards()) && rewardReport.isCompletelyProcessed());
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ public void saveRewardReport(RewardReport rewardReport) { // NOSONAR
rewardPeriodEntity.setEndTime(period.getEndDateInSeconds());
rewardPeriodEntity.setTimeZone(period.getTimeZone());

if (rewardReport.isCompletelyProceeded()) {
if (rewardReport.isCompletelyProcessed()) {
rewardPeriodEntity.setStatus(RewardStatus.SUCCESS);
} else if (rewardReport.getPendingTransactionCount() > 0) { // Always
// pending if
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ void testSendRewards_RewardPeriodsInProgress() {
when(rewardReportService.getRewardPeriodsInProgress()).thenReturn(rewardPeriodsInProgress);

RewardReport rewardReport = mock(RewardReport.class);
when(rewardReport.isCompletelyProceeded()).thenReturn(true);
when(rewardReport.isCompletelyProcessed()).thenReturn(true);

when(rewardReportService.computeRewards(any())).thenReturn(rewardReport);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<span class="text-header font-weight-light">{{ rangeDateTimeTitle }}</span>
</v-card-title>
<template v-if="isValid">
<template v-if="hasConfiguredBudget || completelyProceeded">
<template v-if="hasConfiguredBudget || completelyProcessed">
<v-card-title class="px-2 py-1">
<v-icon
:class="statusIconClass"
Expand Down Expand Up @@ -139,8 +139,8 @@ export default {
},
}),
computed: {
completelyProceeded() {
return this.rewardReport?.completelyProceeded;
completelyProcessed() {
return this.rewardReport?.completelyProcessed;
},
isNotPastPeriod() {
return !this.period || this.period.endDateInSeconds > this.currentTimeInSeconds;
Expand All @@ -157,7 +157,7 @@ export default {
message: this.$t('wallet.administration.rewardCard.status.inPeriod'),
};
}
if (!this.completelyProceeded) {
if (!this.completelyProcessed) {
return {
icon: 'fas fa-exclamation-triangle',
iconClass: null,
Expand Down Expand Up @@ -217,7 +217,7 @@ export default {
return Number.isFinite(Number(this.tokensSent)) ? Math.round(this.tokensSent) : 0;
},
budget() {
return this.completelyProceeded ? `${this.formatedTokensSent} MEED` : (this.hasConfiguredBudget ? `${this.formatedTokensToSend} MEED` : '-');
return this.completelyProcessed ? `${this.formatedTokensSent} MEED` : (this.hasConfiguredBudget ? `${this.formatedTokensToSend} MEED` : '-');
},
period() {
return this.rewardReport?.period;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
</v-card>
<v-spacer />
<span v-if="sendingInProgress" class="text-subtitle pe-2"> {{ $t('wallet.administration.rewardDetails.sendingProgress') }}... </span>
<template v-if="!completelyProceeded">
<template v-if="!completelyProcessed">
<div v-if="hasErrorTransactions" class="text-subtitle pe-2 align-self-center">
<v-icon
color="warning"
Expand Down Expand Up @@ -104,7 +104,7 @@
:reward="item"
:contract-details="contractDetails"
:token-symbol="tokenSymbol"
:completely-proceeded="completelyProceeded"
:completely-processed="completelyProcessed"
:transaction-ether-scan-link="transactionEtherScanLink"
@open-contribution-details="openContributionDetails" />
</template>
Expand Down Expand Up @@ -236,8 +236,8 @@ export default {
return new window.Intl.DateTimeFormat(this.lang, this.dateFormat)
.format(new Date(this.endDateInSeconds * 1000 - 86400 * 1000 - new Date().getTimezoneOffset() * 60 * 1000));
},
completelyProceeded() {
return this.rewardReport?.completelyProceeded;
completelyProcessed() {
return this.rewardReport?.completelyProcessed;
},
endDateInSeconds() {
return this.period?.endDateInSeconds;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ export default {
type: String,
default: ''
},
completelyProceeded: {
completelyProcessed: {
type: Boolean,
default: false
},
Expand Down Expand Up @@ -275,7 +275,7 @@ export default {
return this.pending ? this.$t('wallet.administration.rewardDetails.transactionInProgress') : this.$t('wallet.administration.rewardDetails.transactionError');
},
amount() {
return this.completelyProceeded ? this.reward?.tokensSent : this.reward?.amount;
return this.completelyProcessed ? this.reward?.tokensSent : this.reward?.amount;
},
transactionHash() {
return this.reward?.transaction?.hash;
Expand Down

0 comments on commit 17a102b

Please sign in to comment.