jnordberg / dsteem

Steem blockchain RPC client
https://jnordberg.github.io/dsteem/
Other
82 stars 57 forks source link

Added support for find_rc_accounts, get_resource_params, get_resource_pool in addition with helper methods for calculating and getting the Manabars (RC & VP) #27

Closed therealwolf42 closed 5 years ago

therealwolf42 commented 6 years ago

This the same PR as before, just without /doc & /dist.

therealwolf42 commented 6 years ago

Changed some things up and will write the tests tomorrow+ make lint.

mahdiyari commented 6 years ago

We should consider active power downs in the max RC and Mana calculations I just fixed this in the steemauto: https://github.com/mahdiyari/steemauto/commit/da4e61d4ac0c12086def9131650452250855bb33#diff-8c7713ecea14e3e5605b9abb67cac6c3

therealwolf42 commented 6 years ago

@mahdiyari Fixed. Thanks for the input!

jnordberg commented 5 years ago

Merged and included in the 0.11.0 release. FYI @therealwolf42 the rc_api test fails with


  11) rc_api
       calculateVPMana:
     Error: Invalid asset 'undefined'
      at Function.from (src/steem/asset.ts:89:20)
      at Object.getVests (src/steem/misc.ts:251:40)
      at RCAPI.calculateVPMana (src/helpers/rc.ts:66:34)
      at Context.<anonymous> (test/rc.ts:34:29)

There's a couple of other tests failing as well related to how steemd is currently a bit schizophrenic about Asset serialisation, some APIs will return/expect the new "NAI" style and some the old asset strings. I don't have the bandwidth to fix those now and hope that the SMT release will just remove the old assets completely and we can deal with the migration then