Creates a new MissionCurrencyRewards
instance.
The NectarMission
instance that the reward belongs to.
The underlying Reward
object representing the reward data.
Protected
_missionProtected
_rewardGets the maximum amount of the reward.
The maximum amount.
Gets the minimum amount of the reward.
The minimum amount.
Gets the user interface (UI) amount representation of the reward.
The UI amount string.
// Example 1:
const reward = new MissionReward(mission, rewardData);
console.log(reward.uiAmount); // Output: "5" (if rewardData.min and rewardData.max are both 5000000000)
// Example 2:
const reward = new MissionReward(mission, rewardData);
console.log(reward.uiAmount); // Output: "1-10" (if rewardData.min is 1000000000 and rewardData.max is 10000000000)
Gets the currency associated with the reward.
The currency instance.
If the reward is not a currency.
const currencyReward = new MissionCurrencyRewards(mission, rewardData);
const currency = currencyReward.currency();
console.log(currency.symbol); // Output: "USD" (assuming rewardData.rewardType.address points to a valid currency token)
Checks if the reward is of type ParticipationCurrencyRewards
.
true
if the reward is of type ParticipationCurrencyRewards
, false
otherwise.
Generated using TypeDoc
Represents a Mission Reward of type
MissionCurrencyRewards
.