Skip to content
This repository was archived by the owner on Aug 2, 2022. It is now read-only.

Move payment calculations from onblock to claimrewards #2805

Merged
spoonincode merged 5 commits intoslimfrom
payment_refactor
May 7, 2018
Merged

Move payment calculations from onblock to claimrewards #2805
spoonincode merged 5 commits intoslimfrom
payment_refactor

Conversation

@zorba80
Copy link
Contributor

@zorba80 zorba80 commented May 6, 2018

No description provided.


*/

INLINE_ACTION_SENDER(eosio::token, transfer)( N(eosio.token), {{N(eosio),N(active)}},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should not transfer to self, "to savings" is just internal eosio.system state, no need for this last send.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I deleted the transfer.

const asset issue_amount = to_eos_bucket + to_savings + perblock_pay;

eosio_assert( rewards > asset(0, S(4,EOS)), "no rewards available to claim" );
INLINE_ACTION_SENDER(eosio::token, issue)( N(eosio.token), {{N(eosio),N(active)}},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the memo is wrong here, some of these tokens are to savings.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed memo

@spoonincode spoonincode merged commit fbf155a into slim May 7, 2018
@spoonincode spoonincode deleted the payment_refactor branch May 7, 2018 22:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants