| 660 | } |
| 661 | |
| 662 | async function getCheckpoints() { |
| 663 | let result = []; |
| 664 | |
| 665 | let checkPointsTimestamps = await securityToken.methods.getCheckpointTimes().call(); |
| 666 | for (let index = 0; index < checkPointsTimestamps.length; index++) { |
| 667 | let checkpoint = {}; |
| 668 | checkpoint.id = index + 1; |
| 669 | checkpoint.timestamp = moment.unix(checkPointsTimestamps[index]).format('MMMM Do YYYY, HH:mm:ss'); |
| 670 | result.push(checkpoint); |
| 671 | } |
| 672 | |
| 673 | return result.sort((a, b) => a.id - b.id); |
| 674 | } |
| 675 | |
| 676 | function isValidDividend(dividend) { |
| 677 | let now = Math.floor(Date.now() / 1000); |