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 Sep 20, 2023
1 parent 0f40153 commit e7407ff
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions 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 e7407ff

Please sign in to comment.