Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 16 additions & 6 deletions lib/radiator/mixins/acts_as_wallet.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,26 @@ module ActsAsWallet
# @option options [String] :reward_sbd The amount of SBD to claim, like: `100.000 SBD`
# @option options [String] :reward_vests The amount of VESTS to claim, like: `100.000000 VESTS`
def claim_reward_balance(options)
reward_steem = options[:reward_steem] || '0.000 STEEM'
reward_sbd = options[:reward_sbd] || '0.000 SBD'
reward_vests = options[:reward_vests] || '0.000000 VESTS'
rewards =
case chain
when :steem
{
reward_steem: options[:reward_steem] || '0.000 STEEM',
reward_sbd: options[:reward_sbd] || '0.000 SBD',
reward_vests: options[:reward_vests] || '0.000000 VESTS'
}
else
{
reward_hive: options[:reward_hive] || '0.000 HIVE',
reward_hbd: options[:reward_hbd] || '0.000 HBD',
reward_vests: options[:reward_vests] || '0.000000 VESTS'
}
end

@operations << {
type: :claim_reward_balance,
account: account_name,
reward_steem: reward_steem,
reward_sbd: reward_sbd,
reward_vests: reward_vests
**rewards
}

self
Expand Down