diff --git a/mocks/address/epochRewards.ts b/mocks/address/epochRewards.ts index a504e47cae..62050fa0cb 100644 --- a/mocks/address/epochRewards.ts +++ b/mocks/address/epochRewards.ts @@ -13,6 +13,7 @@ export const epochRewards: AddressEpochRewardsResponse = { associated_account: withName, block_hash: '0x', block_number: 26369280, + block_timestamp: '2022-05-15T13:16:24Z', epoch_number: 1526, token: tokenInfo, }, @@ -23,6 +24,7 @@ export const epochRewards: AddressEpochRewardsResponse = { associated_account: withoutName, block_hash: '0x', block_number: 26352000, + block_timestamp: '2022-05-15T13:16:24Z', epoch_number: 1525, token: tokenInfo, }, @@ -33,6 +35,7 @@ export const epochRewards: AddressEpochRewardsResponse = { associated_account: withEns, block_hash: '0x', block_number: 26300160, + block_timestamp: '2022-05-15T13:16:24Z', epoch_number: 1524, token: tokenInfo, }, diff --git a/stubs/address.ts b/stubs/address.ts index 29950028d3..917837d1f6 100644 --- a/stubs/address.ts +++ b/stubs/address.ts @@ -121,10 +121,11 @@ export const ADDRESS_MUD_TABLE_ITEM: AddressMudTableItem = { export const EPOCH_REWARD_ITEM: AddressEpochRewardsItem = { amount: '136609473658452408568', block_number: 10355938, + block_timestamp: '2022-05-15T13:16:24Z', type: 'voter', token: TOKEN_INFO_ERC_20, block_hash: '0x5956a847d8089e254e02e5111cad6992b99ceb9e5c2dc4343fd53002834c4dc6', account: ADDRESS_PARAMS, - epoch_number: 1526, + epoch_number: 1234, associated_account: ADDRESS_PARAMS, }; diff --git a/types/api/address.ts b/types/api/address.ts index 270db50007..3085ac8421 100644 --- a/types/api/address.ts +++ b/types/api/address.ts @@ -266,6 +266,7 @@ export type AddressEpochRewardsItem = { amount: string; block_number: number; block_hash: string; + block_timestamp: string; account: AddressParam; epoch_number: number; associated_account: AddressParam; diff --git a/ui/address/__screenshots__/AddressEpochRewards.pw.tsx_default_base-view-mobile-1.png b/ui/address/__screenshots__/AddressEpochRewards.pw.tsx_default_base-view-mobile-1.png index a978607c80..bd395b3189 100644 Binary files a/ui/address/__screenshots__/AddressEpochRewards.pw.tsx_default_base-view-mobile-1.png and b/ui/address/__screenshots__/AddressEpochRewards.pw.tsx_default_base-view-mobile-1.png differ diff --git a/ui/address/__screenshots__/AddressEpochRewards.pw.tsx_mobile_base-view-mobile-1.png b/ui/address/__screenshots__/AddressEpochRewards.pw.tsx_mobile_base-view-mobile-1.png index d20553d832..2ed33b0fdb 100644 Binary files a/ui/address/__screenshots__/AddressEpochRewards.pw.tsx_mobile_base-view-mobile-1.png and b/ui/address/__screenshots__/AddressEpochRewards.pw.tsx_mobile_base-view-mobile-1.png differ diff --git a/ui/address/epochRewards/AddressEpochRewardsListItem.tsx b/ui/address/epochRewards/AddressEpochRewardsListItem.tsx index a663dc7763..4d61904873 100644 --- a/ui/address/epochRewards/AddressEpochRewardsListItem.tsx +++ b/ui/address/epochRewards/AddressEpochRewardsListItem.tsx @@ -9,6 +9,7 @@ import BlockEntity from 'ui/shared/entities/block/BlockEntity'; import TokenEntity from 'ui/shared/entities/token/TokenEntity'; import EpochRewardTypeTag from 'ui/shared/EpochRewardTypeTag'; import ListItemMobileGrid from 'ui/shared/ListItemMobile/ListItemMobileGrid'; +import TimeAgoWithTooltip from 'ui/shared/TimeAgoWithTooltip'; type Props = { item: AddressEpochRewardsItem; @@ -31,18 +32,20 @@ const AddressEpochRewardsListItem = ({ item, isLoading }: Props) => { Epoch # - { item.epoch_number } + + { item.epoch_number } + - { /* Age + Age - */ } + Reward type diff --git a/ui/address/epochRewards/AddressEpochRewardsTableItem.tsx b/ui/address/epochRewards/AddressEpochRewardsTableItem.tsx index 6cac82a9e2..d6283feb40 100644 --- a/ui/address/epochRewards/AddressEpochRewardsTableItem.tsx +++ b/ui/address/epochRewards/AddressEpochRewardsTableItem.tsx @@ -8,6 +8,7 @@ import AddressEntity from 'ui/shared/entities/address/AddressEntity'; import BlockEntity from 'ui/shared/entities/block/BlockEntity'; import TokenEntity from 'ui/shared/entities/token/TokenEntity'; import EpochRewardTypeTag from 'ui/shared/EpochRewardTypeTag'; +import TimeAgoWithTooltip from 'ui/shared/TimeAgoWithTooltip'; type Props = { item: AddressEpochRewardsItem; @@ -20,10 +21,11 @@ const AddressEpochRewardsTableItem = ({ item, isLoading }: Props) => { - - { `Epoch # ${ item.epoch_number }` } - { /* no timestamp from API, will be added later */ } - { /* */ } + + + { `Epoch # ${ item.epoch_number }` } + +