[Nitrous] Beneficiary info / Tag order fix

avatar
(Edited)

Repository

https://github.com/steem-engine-exchange/nitrous/pull/51

Project Name: Nitrous

New Feature - Beneficiary info

PR: https://github.com/steem-engine-exchange/nitrous/pull/51

Show beneficiary info if exists

  • only when enable_comment_beneficiaries is true
  • and beneficiary is not in exclude_beneficiaries_accounts e.g., finex, likwid

screenshot tested on local dev server for AAA. In my opinion, utopian.pay should also be added to exclude_beneficiaries_accounts globally :) But utopian will end soon anyway :(

when beneficiary (e.g., finex, likwid in AAA, SCT) is in exclude_beneficiaries_accounts, it should not be shown. also, the header 'beneficiaries' itself should not be shown.

The same posting on Busy (finex 100% is shown): https://busy.org/@blockchainstudio/scot-vp-viewer-vote-weight-multiplier-support

Code

  • While some modification for styling id added, this is a basic code.
  • For each beneficiary info, add it with hyperlink to the account.

Bug Fix - Tag order fix

PR: https://github.com/steem-engine-exchange/nitrous/pull/57

  1. introduce MAX_TAG and APP_MAX_TAG to avoid hardcoded max num of tags
  2. fix tag order

Basically, we should use OrderedSet instead of Set.

This was much difficult to find than I initially thought, and that might be the reason why this bug had existed quite long.

It is because the standard JS library Set preserves the order, and immutable library Set also preserve the order up to 8 elements! Why up to 8!

Anyway, now the problem has been resolved.

Before

Trying to post with this order of tags on palnet.io

https://busy.org/@guest123/pob-is-dead
alphabetically ordered and palnet is inserted in a random position.

Another example.

palnet is inserted in 4th position (instead of 3rd position) which shows it's quite random.
https://busy.org/@guest123/3y2xik-test

After

previously tag order is tangled. https://busy.org/@guest123/j1tbe-test

fixed. You can also see duplicated tag is automatically removed, and APP_NAME is added to the last position if it's not added by users. https://busy.org/@guest123/tag-order-test

Code

  • Previously 10 was hard-coded and therefore the previous contributor forgot to change some place.
  • I first introduce MAX_TAG constant and use it throughout.
  • In fact, the last logic needs to be handled carefully, since APP_NAME tag is added if a user didn't include. So there should be a conditional check for this, which was also missing previously. (L973-4)

  • And then, as explained, change from Set to OrderedSet is needed.

GitHub Account

https://github.com/economicstudio



0
0
0.000
7 comments
avatar

donekim님이 blockchainstudio님을 멘션하셨습니당. 아래 링크를 누르시면 연결되용~ ^^
donekim님의 타계정 베네피셔리 설정 방법 가이드 + 블록체인스튜디오님의 유동성 서비스 피넥스 이용후기

...를 스팀(STEEM)으로 만드는 유동성에 얼마의 가치를 메길까?라는 포스팅을 통해 블록체인스튜디오님(blockchainstudio께서 개발하신 리워드 유동성 서비스 피넥스(finex)를 소개드렸었는데, 어제 스티밋의 페이아웃이 이...

0
0
0.000
avatar

Hi bro, i wonder if you have some time on discord. I left a DM. I have few tasks related to the Marlians tribe but all kept simple. I am hoping you can take a look at one: https://github.com/steem-engine-exchange/nitrous/issues/55


Posted via Marlians.com
0
0
0.000
avatar
(Edited)

@neal.leo (@nealmcspadden) downvoted this post, but first of all,

beneficiary is investment information.

Without beneficiary info, you will get less than you expected.

Second of all, i used more tags to announce this patch to the community. even the official @steem.leo account appreciates this post. How many people actually can or do contribute to steem community using their valuable time? only a few. this kind of careless downvoting discourage people.

LEO community should stop @neal.leo kind of unjustified downvoting account if you care about your communities and moreover your investment (and other communities and valuable contributors).

ps. I've never used downvote (except for mistakes) before for my entire steemit life. But to show I don't agree with him, I also made some downvote on his posts. I'll remove it if he removed his first.

0
0
0.000