Skip to content

Commit

Permalink
Fix payout history date range
Browse files Browse the repository at this point in the history
  • Loading branch information
shamilkhan committed Jun 1, 2023
1 parent 00878c1 commit 40f9928
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.1.1] - 2023-06-01

## Changed

- Fix payout history date range. The dates were initially reversed and displayed the wrong date range.

## [1.1.0] - 2023-05-31

## Added
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "polkadot-staking-dashboard",
"version": "1.1.0",
"version": "1.1.1",
"license": "apache-2.0",
"private": false,
"dependencies": {
Expand Down
8 changes: 5 additions & 3 deletions src/pages/Payouts/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,14 @@ export const Payouts = (props: PageProps) => {
<OpenAssistantIcon page="payouts" title="Payout History" />
</h4>
<h2>
{payouts.length ? (
{payoutsList.length ? (
<>
{moment.unix(payouts[0].block_timestamp).format('Do MMMM')}
{moment
.unix(payoutsList[payoutsList.length - 1].block_timestamp)
.format('Do MMMM')}
&nbsp;-&nbsp;
{moment
.unix(payouts[payouts.length - 1].block_timestamp)
.unix(payoutsList[0].block_timestamp)
.format('Do MMMM')}
</>
) : (
Expand Down

0 comments on commit 40f9928

Please sign in to comment.