|
@@ -11,7 +11,6 @@ import {
|
|
|
RewardRelationship,
|
|
|
RewardRelationshipId,
|
|
|
} from "@joystream/types/recurring-rewards";
|
|
|
-import { WorkerOf } from "@joystream/types/augment/types";
|
|
|
|
|
|
// lib
|
|
|
import { getPercent, getTotalMinted } from "./";
|
|
@@ -27,6 +26,7 @@ import {
|
|
|
getValidators,
|
|
|
getValidatorCount,
|
|
|
} from "./api";
|
|
|
+import {WorkerOf} from "@joystream/types/augment-codec/all";
|
|
|
|
|
|
export const filterMethods = {
|
|
|
getBurnedTokens: ({ section, method }: CacheEvent) =>
|
|
@@ -75,11 +75,11 @@ export const getWorkerRow = (
|
|
|
const mtjoy = (mtjoy: number): string => (mtjoy / 1000000).toFixed(1);
|
|
|
|
|
|
const { id, memberId, account, handle, status, reward } = worker;
|
|
|
- const earnedEnd = reward.total_reward_received.toNumber();
|
|
|
+ const earnedEnd = Number(reward.total_reward_received.toBigInt());
|
|
|
if (!earnedEnd) return ``;
|
|
|
const totalEarned = mtjoy(earnedEnd);
|
|
|
const earnedTerm = mtjoy(earnedEnd - earnedStart);
|
|
|
- const amount = reward.amount_per_payout.toNumber();
|
|
|
+ const amount = Number(reward.amount_per_payout.toBigInt());
|
|
|
const rewardPerBlock = (amount / Number(reward.payout_interval)).toFixed();
|
|
|
const url = `https://pioneer.joystreamstats.live/#/members/${handle}`; // TODO
|
|
|
// TODO compare earning to term start and show difference
|