From 97406d895f8d2dffa493cf0ac8299151ebe27849 Mon Sep 17 00:00:00 2001 From: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com> Date: Sun, 18 Jun 2023 11:09:23 +0100 Subject: [PATCH] Fix delegation with x0.1 conviction and typo (#9599) * typo, conviction, activityFrom * Update packages/page-referenda/src/Referenda/Delegate/index.tsx Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com> * Update packages/page-referenda/src/Referenda/Delegate/index.tsx * Update packages/page-referenda/src/Referenda/Delegate/index.tsx --------- Co-authored-by: Jaco --- packages/page-referenda/src/Referenda/Delegate/Activity.tsx | 2 +- packages/page-referenda/src/Referenda/Delegate/index.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/page-referenda/src/Referenda/Delegate/Activity.tsx b/packages/page-referenda/src/Referenda/Delegate/Activity.tsx index c84ee459b8..c97e648e13 100644 --- a/packages/page-referenda/src/Referenda/Delegate/Activity.tsx +++ b/packages/page-referenda/src/Referenda/Delegate/Activity.tsx @@ -58,7 +58,7 @@ function Activity ({ allowEmpty, className, palletReferenda, tracks, value }: Pr ))} ) - : ('This account has no voting/delating activity in the chain state')} /> + : ('This account has no voting/delegating activity in the chain state')} /> } {!allowEmpty && infos.some(([{ delegating }]) => delegating) && ( ('This account has some delegations in itself')} /> diff --git a/packages/page-referenda/src/Referenda/Delegate/index.tsx b/packages/page-referenda/src/Referenda/Delegate/index.tsx index 164358c5eb..1dc898df97 100644 --- a/packages/page-referenda/src/Referenda/Delegate/index.tsx +++ b/packages/page-referenda/src/Referenda/Delegate/index.tsx @@ -93,7 +93,7 @@ function Delegate ({ className, palletReferenda, palletVote, tracks }: Props): R ); const extrinsic = useMemo( - () => balance && conviction && toAccount && includeTracks + () => balance && conviction >= 0 && toAccount && includeTracks ? isAllTracks ? api.tx.utility.forceBatch(includeTracks.map((trackId) => api.tx[palletVote as 'convictionVoting'].delegate(trackId, toAccount, conviction, balance)