Skip to content

Commit

Permalink
Fix expectedReturns for validators in Polkadot network (#446)
Browse files Browse the repository at this point in the history
* fix expectedReturns

* change -- for null in getrewards and returns

Co-authored-by: Bitcoinera <[email protected]>
  • Loading branch information
mariopino and Bitcoinera authored Mar 12, 2020
1 parent e519388 commit 26b8d8b
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions lib/source/polkadotV0-source.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,6 @@ class polkadotAPI {
)
}

// TODO: implement!
async getExpectedReturns() {
return 0
}

async getSelfStake(validator) {
return validator.selfStake
}
Expand All @@ -180,12 +175,12 @@ class polkadotAPI {
return this.reducers.balanceReducer(this.network, freeBalance.toString())
}

async getRewards(delegatorAddress) {
const api = await this.getAPI()
const rewards = api.derive.staking.stakerRewards(delegatorAddress)
// currently not working. It always returns []
console.log('REWARDS', rewards)
return rewards
async getExpectedReturns() {
return null
}

async getRewards() {
return null
}

async getOverview(delegatorAddress) {
Expand Down

0 comments on commit 26b8d8b

Please sign in to comment.