diff --git a/apps/trading/components/rewards-container/active-rewards.tsx b/apps/trading/components/rewards-container/active-rewards.tsx
index 40db0e296..bf281f5dd 100644
--- a/apps/trading/components/rewards-container/active-rewards.tsx
+++ b/apps/trading/components/rewards-container/active-rewards.tsx
@@ -1,5 +1,5 @@
import { useT } from '../../lib/use-t';
-import { addDecimalsFormatNumber } from '@vegaprotocol/utils';
+import { addDecimalsFormatNumber, formatNumber } from '@vegaprotocol/utils';
import classNames from 'classnames';
import {
type VegaIconSize,
@@ -24,6 +24,9 @@ import {
type DispatchStrategy,
IndividualScopeMapping,
IndividualScopeDescriptionMapping,
+ AccountType,
+ DistributionStrategy,
+ IndividualScope,
type Asset,
} from '@vegaprotocol/types';
import { Card } from '../card/card';
@@ -62,22 +65,27 @@ export const applyFilter = (
filter: Filter
) => {
const { transfer } = node;
- if (
- transfer.kind.__typename !== 'RecurringTransfer' ||
- !transfer.kind.dispatchStrategy?.dispatchMetric
- ) {
+
+ // if the transfer is a staking reward then it should be displayed
+ if (transfer.toAccountType === AccountType.ACCOUNT_TYPE_GLOBAL_REWARD) {
+ return true;
+ }
+
+ if (transfer.kind.__typename !== 'RecurringTransfer') {
return false;
}
if (
- DispatchMetricLabels[transfer.kind.dispatchStrategy.dispatchMetric]
- .toLowerCase()
- .includes(filter.searchTerm.toLowerCase()) ||
+ (transfer.kind.dispatchStrategy?.dispatchMetric &&
+ DispatchMetricLabels[transfer.kind.dispatchStrategy.dispatchMetric]
+ .toLowerCase()
+ .includes(filter.searchTerm.toLowerCase())) ||
transfer.asset?.symbol
.toLowerCase()
.includes(filter.searchTerm.toLowerCase()) ||
(
- EntityScopeLabelMapping[transfer.kind.dispatchStrategy.entityScope] ||
+ (transfer.kind.dispatchStrategy &&
+ EntityScopeLabelMapping[transfer.kind.dispatchStrategy.entityScope]) ||
'Unspecified'
)
.toLowerCase()
@@ -93,6 +101,7 @@ export const applyFilter = (
) {
return true;
}
+
return false;
};
@@ -174,6 +183,29 @@ export const ActiveRewardCard = ({
return null;
}
+ if (
+ !transferNode.transfer.kind.dispatchStrategy &&
+ transferNode.transfer.toAccountType ===
+ AccountType.ACCOUNT_TYPE_GLOBAL_REWARD
+ ) {
+ return (
+
{t(DispatchMetricDescription[dispatchStrategy?.dispatchMetric])}
-
+ {t( + 'Global staking reward for staking $VEGA on the network via the Governance app' + )} +
+ } + + {/** REQUIREMENTS */} +