Skip to content
This repository was archived by the owner on Oct 30, 2024. It is now read-only.

Commit 98756ff

Browse files
authored
fix: updated estimatePendingRewards function (#67)
* fix: updated estimatePendingRewards function * fix: error
1 parent e1fcf67 commit 98756ff

7 files changed

Lines changed: 11 additions & 7 deletions

File tree

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"url": "https://github.com/AstarNetwork/astar.js.git"
1313
},
1414
"sideEffects": false,
15-
"version": "0.2.6",
15+
"version": "0.2.7",
1616
"workspaces": [
1717
"packages/*",
1818
"examples/*"

‎packages/api-derive/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@astar-network/astar-api-derive",
3-
"version": "0.2.6",
3+
"version": "0.2.7",
44
"description": "Astar JS API",
55
"main": "index.js",
66
"author": "Astar Network <info@astar.network>",

‎packages/api/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@astar-network/astar-api",
3-
"version": "0.2.6",
3+
"version": "0.2.7",
44
"description": "Astar JS API",
55
"main": "index.js",
66
"author": "Astar Network <info@astar.network>",

‎packages/sdk-core/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@astar-network/astar-sdk-core",
3-
"version": "0.2.6",
3+
"version": "0.2.7",
44
"description": "the core for astar SDK",
55
"main": "index.js",
66
"author": "Astar Network <info@astar.network>",

‎packages/sdk-core/src/modules/dapp-staking/pending-rewards/index.ts‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,11 @@ export const estimatePendingRewards = async ({ api,
209209
api.query.dappsStaking.generalStakerInfo.entries(walletAddress),
210210
api.query.system.number(),
211211
Number(api.consts.dappsStaking.blockPerEra),
212-
String(api.consts.blockReward.rewardAmount),
212+
String(
213+
Object.prototype.hasOwnProperty.call(api.consts.blockReward, 'maxBlockRewardAmount')
214+
? api.consts.blockReward.maxBlockRewardAmount
215+
: api.consts.blockReward.rewardAmount
216+
),
213217
fetchRewardsDistributionConfig(api)
214218
]);
215219

‎packages/type-definitions/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@astar-network/astar-type-definitions",
3-
"version": "0.2.6",
3+
"version": "0.2.7",
44
"description": "Polkadot.js type definitions for astar Network",
55
"main": "index.js",
66
"author": "Astar Network <info@astar.network>",

‎packages/types/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@astar-network/astar-types",
3-
"version": "0.2.6",
3+
"version": "0.2.7",
44
"description": "Polkadot.js type definitions for Astar Network",
55
"main": "index.js",
66
"author": "Astar Network <info@astar.network>",

0 commit comments

Comments
 (0)