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

fix: updated estimatePendingRewards function #67

Merged
merged 2 commits into from
Nov 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 <info@astar.network>",
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 <info@astar.network>",
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 <info@astar.network>",
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 <info@astar.network>",
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 <info@astar.network>",
Expand Down
Loading