This is another installment for porting the busy wallet to Utopian.
New Feature
Wallet Claim Rewards
Added updateAuthUser action and reducer that gets the user account to update the ClaimRewardsBlock once the user clicks on the Claim rewards button.
Added the ClaimRewardsBlock on the right side bar.
Modified the sc2 (Steem Connect v2) to support broadcast with callback. Added the claimRewardBalance() sc2 method.
In busy's latest codes from master, they used an updated version of sc2-sdk (v1.0.1). I had to decide whether to switch to that latest version or retain the current sc2-sdk that Utopian uses (v.0.0.5).
I decided to go with the latter and ported the codes from v1.0.1 to Utopian's local copy sc2.js.
- Added the callback (
cb) parameter to thebroadcastfunction.
- Added the
claimRewardBalance()function.
function claimRewardBalance(account, rewardSteem, rewardSbd, rewardVests, cb) {
var params = {
account: account,
reward_steem: rewardSteem,
reward_sbd: rewardSbd,
reward_vests: rewardVests
};
return broadcast([['claim_reward_balance', params]], cb);
};
Original source code licensed under MIT License. Copyright Busy.
Posted on Utopian.io - Rewarding Open Source Contributors