From aeeacde19ffffa21268715982886d8c1ec840b19 Mon Sep 17 00:00:00 2001 From: Raymond Jacobson Date: Wed, 20 Sep 2023 00:24:37 -0400 Subject: [PATCH] Show wei and fix 0s (#148) --- packages/protocol-dashboard/src/services/Audius/helpers.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/protocol-dashboard/src/services/Audius/helpers.ts b/packages/protocol-dashboard/src/services/Audius/helpers.ts index dbb898981a9..b84d53df010 100644 --- a/packages/protocol-dashboard/src/services/Audius/helpers.ts +++ b/packages/protocol-dashboard/src/services/Audius/helpers.ts @@ -200,11 +200,9 @@ export function decodeProposalCallData(proposal: Proposal) { ) delete decoded['__length__'] - const parsedCallData = Object.values(decoded).map((v: string) => - v.replace(/0+$/, '') - ) + const parsedCallData = Object.values(decoded) if (functionName === 'slash') { - parsedCallData[0] = weiAudToAud(new BN(parsedCallData[0])).toString() + parsedCallData[0] = new BN(parsedCallData[0]).toString() + '(wei)' } const joinedCallData = parsedCallData.join(',') return joinedCallData