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

Commit

Permalink
fix: updated estimatePendingRewards function (#67)
Browse files Browse the repository at this point in the history
* fix: updated estimatePendingRewards function

* fix: error
  • Loading branch information
impelcrypto authored Nov 24, 2023
1 parent e1fcf67 commit 98756ff
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"url": "https://github.com/AstarNetwork/astar.js.git"
},
"sideEffects": false,
"version": "0.2.6",
"version": "0.2.7",
"workspaces": [
"packages/*",
"examples/*"
Expand Down
2 changes: 1 addition & 1 deletion packages/api-derive/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@astar-network/astar-api-derive",
"version": "0.2.6",
"version": "0.2.7",
"description": "Astar JS API",
"main": "index.js",
"author": "Astar Network <[email protected]>",
Expand Down
2 changes: 1 addition & 1 deletion packages/api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@astar-network/astar-api",
"version": "0.2.6",
"version": "0.2.7",
"description": "Astar JS API",
"main": "index.js",
"author": "Astar Network <[email protected]>",
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@astar-network/astar-sdk-core",
"version": "0.2.6",
"version": "0.2.7",
"description": "the core for astar SDK",
"main": "index.js",
"author": "Astar Network <[email protected]>",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,11 @@ export const estimatePendingRewards = async ({ api,
api.query.dappsStaking.generalStakerInfo.entries(walletAddress),
api.query.system.number(),
Number(api.consts.dappsStaking.blockPerEra),
String(api.consts.blockReward.rewardAmount),
String(
Object.prototype.hasOwnProperty.call(api.consts.blockReward, 'maxBlockRewardAmount')
? api.consts.blockReward.maxBlockRewardAmount
: api.consts.blockReward.rewardAmount
),
fetchRewardsDistributionConfig(api)
]);

Expand Down
2 changes: 1 addition & 1 deletion packages/type-definitions/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@astar-network/astar-type-definitions",
"version": "0.2.6",
"version": "0.2.7",
"description": "Polkadot.js type definitions for astar Network",
"main": "index.js",
"author": "Astar Network <[email protected]>",
Expand Down
2 changes: 1 addition & 1 deletion packages/types/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@astar-network/astar-types",
"version": "0.2.6",
"version": "0.2.7",
"description": "Polkadot.js type definitions for Astar Network",
"main": "index.js",
"author": "Astar Network <[email protected]>",
Expand Down

0 comments on commit 98756ff

Please sign in to comment.