Skip to content
This repository has been archived by the owner on Jan 14, 2022. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'origin/2.1.4' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
Michal Tuleja committed Aug 14, 2018
2 parents d3cc23a + b34f94c commit f16826e
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 5 deletions.
1 change: 1 addition & 0 deletions features/block.feature
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Feature: Block page
| Total Amount | 100,000,000 LSK |
| Timestamp | /2016\/05\/24 \d\d:00:00/ |
| Generated by | 1085993630748340485L |
| Version | 0 |
And I should see table "transactions" with 50 rows starting with:
| Transaction ID | Date | Sender | Recipient | Amount | Fee | Confirm. |
|----------------------|---------------------------|-------------------|-----------------------|--------|-------|---------------|
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lisk-explorer",
"version": "2.1.4-rc",
"version": "2.1.4",
"description": "Lisk blockchain explorer",
"keywords": [
"lisk",
Expand Down
15 changes: 12 additions & 3 deletions services/newsfeed/TwitterService.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,22 @@ const client = new Twitter({
access_token_secret: process.env.TWITTER_ACCESS_TOKEN_SECRET,
});

const safeRef = (obj, path) => {
try {
// eslint-disable-next-line
return path.split('.').reduce((xs, x) => (xs && xs[x]) ? xs[x] : null, obj);
} catch (e) {
return null;
}
};

const tweetUrl = (o) => {
if (o.retweeted_status) {
return o.retweeted_status.entities.urls[0].url;
return safeRef(o, 'retweeted_status.entities.urls.0.url');
} else if (o.extended_entities) {
return o.extended_entities.media[0].url;
return safeRef(o, 'extended_entities.media.0.url');
} else if (o.entities) {
return o.entities.urls[0].url;
return safeRef(o, 'entities.urls.0.url');
}
return null;
};
Expand Down
4 changes: 4 additions & 0 deletions src/components/blocks/block.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ <h1>
<a data-account-href="vm.block.delegate">{{vm.block.delegate.username || vm.block.generatorId}}</a>
</td>
</tr>
<tr>
<td class='left-padding-xs left-padding-s left-padding-m left-padding-l double'><strong>Version</strong></td>
<td class="right-padding-xs right-padding-s right-padding-m right-padding-l double text-right">{{vm.block.version}}</td>
</tr>
</tbody>
</table>
</div>
Expand Down

0 comments on commit f16826e

Please sign in to comment.