Revert "Revert "feat: show correct reward type (#930)"" (#969)

This reverts commit 2a584e862c.
This commit is contained in:
Dexter Edwards 2022-08-16 12:23:40 +01:00 committed by GitHub
parent 88dea2b8b4
commit 3de748a133
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 5 deletions

View File

@ -3,6 +3,8 @@
// @generated
// This file was automatically generated and should not be edited.
import { AccountType } from "@vegaprotocol/types";
// ====================================================
// GraphQL query operation: Rewards
// ====================================================
@ -45,6 +47,10 @@ export interface Rewards_party_rewardDetails_rewards_epoch {
export interface Rewards_party_rewardDetails_rewards {
__typename: "Reward";
/**
* The type of reward
*/
rewardType: AccountType;
/**
* The asset this reward is paid in
*/

View File

@ -30,6 +30,7 @@ export const REWARDS_QUERY = gql`
symbol
}
rewards {
rewardType
asset {
id
}

View File

@ -19,10 +19,6 @@ interface RewardInfoProps {
rewardAssetId: string;
}
// Note: For now the only reward type is Staking. We'll need this from the API
// at a later date
const DEFAULT_REWARD_TYPE = 'Staking';
export const RewardInfo = ({
data,
currVegaKey,
@ -119,7 +115,7 @@ export const RewardTable = ({ reward, delegations }: RewardTableProps) => {
<KeyValueTable>
<KeyValueTableRow>
{t('rewardType')}
<span>{DEFAULT_REWARD_TYPE}</span>
<span>{reward.rewardType}</span>
</KeyValueTableRow>
<KeyValueTableRow>
{t('yourStake')}