From 26b8d8bf28291a4eaf71ac7d9cacf8b360e0d24b Mon Sep 17 00:00:00 2001 From: Mario Pino Date: Thu, 12 Mar 2020 20:11:53 +0100 Subject: [PATCH] Fix expectedReturns for validators in Polkadot network (#446) * fix expectedReturns * change -- for null in getrewards and returns Co-authored-by: Bitcoinera --- lib/source/polkadotV0-source.js | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/lib/source/polkadotV0-source.js b/lib/source/polkadotV0-source.js index 73a15f0666..bab304d5ae 100644 --- a/lib/source/polkadotV0-source.js +++ b/lib/source/polkadotV0-source.js @@ -164,11 +164,6 @@ class polkadotAPI { ) } - // TODO: implement! - async getExpectedReturns() { - return 0 - } - async getSelfStake(validator) { return validator.selfStake } @@ -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) {