Skip to content

Commit

Permalink
Show wei and fix 0s (#148)
Browse files Browse the repository at this point in the history
  • Loading branch information
raymondjacobson authored and michellebrier committed Oct 9, 2023
1 parent 82aba98 commit e6dd624
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/protocol-dashboard/src/services/Audius/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e6dd624

Please sign in to comment.