Add kredits-formatter and additionally format balance #108
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "feature/kredits-formatter"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This adds a
balanceIntvalue to the contributor data that has thetoken balance formatted as full Kredits. (similar to Ether)
any naming suggestions?
No need for
Promise.resolvebecause everythenreturns a new Promise.return data;should work.Yay!
As this is not a class, but just one formatting function, I'd call the file
format_kreditsand import it asformatKredits().What's the benefit of doing this here instead of before the return in the first
thisabove?I think the convention is a dash for filenames in JS.
👍
formatKredits();catAndMergereturns a promise, so I only can do it in a nextthen, no?I thought
getContributorByIdalready includes the balance. In which case it wouldn't matter what's returned afterwards, as it would already include the formatted balance beforehand.ah, true. before passing it to IPFS. 👍
There's a merge conflict here.
conflict resolved.