feat: show correct reward type (#930)
This commit is contained in:
parent
92febfde6e
commit
8644eac2be
@ -3,6 +3,8 @@
|
|||||||
// @generated
|
// @generated
|
||||||
// This file was automatically generated and should not be edited.
|
// This file was automatically generated and should not be edited.
|
||||||
|
|
||||||
|
import { AccountType } from "@vegaprotocol/types";
|
||||||
|
|
||||||
// ====================================================
|
// ====================================================
|
||||||
// GraphQL query operation: Rewards
|
// GraphQL query operation: Rewards
|
||||||
// ====================================================
|
// ====================================================
|
||||||
@ -45,6 +47,10 @@ export interface Rewards_party_rewardDetails_rewards_epoch {
|
|||||||
|
|
||||||
export interface Rewards_party_rewardDetails_rewards {
|
export interface Rewards_party_rewardDetails_rewards {
|
||||||
__typename: "Reward";
|
__typename: "Reward";
|
||||||
|
/**
|
||||||
|
* The type of reward
|
||||||
|
*/
|
||||||
|
rewardType: AccountType;
|
||||||
/**
|
/**
|
||||||
* The asset this reward is paid in
|
* The asset this reward is paid in
|
||||||
*/
|
*/
|
||||||
|
@ -30,6 +30,7 @@ export const REWARDS_QUERY = gql`
|
|||||||
symbol
|
symbol
|
||||||
}
|
}
|
||||||
rewards {
|
rewards {
|
||||||
|
rewardType
|
||||||
asset {
|
asset {
|
||||||
id
|
id
|
||||||
}
|
}
|
||||||
|
@ -19,10 +19,6 @@ interface RewardInfoProps {
|
|||||||
rewardAssetId: string;
|
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 = ({
|
export const RewardInfo = ({
|
||||||
data,
|
data,
|
||||||
currVegaKey,
|
currVegaKey,
|
||||||
@ -119,7 +115,7 @@ export const RewardTable = ({ reward, delegations }: RewardTableProps) => {
|
|||||||
<KeyValueTable>
|
<KeyValueTable>
|
||||||
<KeyValueTableRow>
|
<KeyValueTableRow>
|
||||||
{t('rewardType')}
|
{t('rewardType')}
|
||||||
<span>{DEFAULT_REWARD_TYPE}</span>
|
<span>{reward.rewardType}</span>
|
||||||
</KeyValueTableRow>
|
</KeyValueTableRow>
|
||||||
<KeyValueTableRow>
|
<KeyValueTableRow>
|
||||||
{t('yourStake')}
|
{t('yourStake')}
|
||||||
|
Loading…
Reference in New Issue
Block a user