Selaa lähdekoodia

event proposalStatusUpdated, type ProposalStatus

Joystream Stats 3 vuotta sitten
vanhempi
commit
dac329378a
2 muutettua tiedostoa jossa 10 lisäystä ja 1 poistoa
  1. 3 1
      rewards.ts
  2. 7 0
      types.ts

+ 3 - 1
rewards.ts

@@ -45,7 +45,9 @@ export const filterMethods = {
   finalizedSpendingProposals: ({ section, method }: CacheEvent) =>
     section === "proposalsEngine" && method === "ProposalStatusUpdated",
   sudoSetBalance: ({ section, method }: CacheEvent) =>
-    section == "balances" && method == "BalanceSet",
+    section === "balances" && method === "BalanceSet",
+  proposalStatusUpdated: ({ section, method }: CacheEvent) =>
+    section === "proposalsEngine" && method === "ProposalStatusUpdated",
 };
 
 export const getWorkerRewards = async (

+ 7 - 0
types.ts

@@ -41,6 +41,13 @@ export interface ProposalDetail {
   authorId: number;
 }
 
+export interface ProposalStatus {
+  finalized: { proposalStatus: { approved: { pendingExecution: any } } };
+  finalizedAt: number;
+  encodedUnstakingErrorDueToBrokenRuntime?: any;
+  stakeDataAfterUnstakingError?: any;
+}
+
 export interface SpendingProposal {
   id: number;
   title: string;