Add kredits-formatter and additionally format balance #108

Merged
bumi merged 5 commits from feature/kredits-formatter into master 2019-04-24 13:20:45 +00:00
bumi commented 2019-04-19 09:59:00 +00:00 (Migrated from github.com)

This adds a balanceInt value to the contributor data that has the
token balance formatted as full Kredits. (similar to Ether)

any naming suggestions?

This adds a `balanceInt` value to the contributor data that has the token balance formatted as full Kredits. (similar to Ether) any naming suggestions?
fsmanuel (Migrated from github.com) reviewed 2019-04-19 10:07:00 +00:00
fsmanuel (Migrated from github.com) commented 2019-04-19 10:07:00 +00:00

No need for Promise.resolve because every then returns a new Promise.

return data; should work.

No need for `Promise.resolve` because every `then` returns a new Promise. `return data;` should work.
raucao (Migrated from github.com) reviewed 2019-04-19 10:07:39 +00:00
raucao (Migrated from github.com) left a comment

Yay!

Yay!
raucao (Migrated from github.com) commented 2019-04-19 10:04:15 +00:00

As this is not a class, but just one formatting function, I'd call the file format_kredits and import it as formatKredits().

As this is not a class, but just one formatting function, I'd call the file `format_kredits` and import it as `formatKredits()`.
raucao (Migrated from github.com) commented 2019-04-19 10:05:09 +00:00

What's the benefit of doing this here instead of before the return in the first this above?

What's the benefit of doing this here instead of before the return in the first `this` above?
fsmanuel (Migrated from github.com) reviewed 2019-04-19 10:18:25 +00:00
fsmanuel (Migrated from github.com) commented 2019-04-19 10:18:25 +00:00

I think the convention is a dash for filenames in JS.
👍 formatKredits()

I think the convention is a dash for filenames in JS. 👍 `formatKredits()`
fsmanuel (Migrated from github.com) reviewed 2019-04-19 10:23:37 +00:00
fsmanuel (Migrated from github.com) commented 2019-04-19 10:23:37 +00:00

;

`;`
bumi (Migrated from github.com) reviewed 2019-04-19 11:32:36 +00:00
bumi (Migrated from github.com) commented 2019-04-19 11:32:36 +00:00

catAndMerge returns a promise, so I only can do it in a next then, no?

`catAndMerge` returns a promise, so I only can do it in a next `then`, no?
raucao (Migrated from github.com) reviewed 2019-04-19 11:40:28 +00:00
raucao (Migrated from github.com) commented 2019-04-19 11:40:28 +00:00

I thought getContributorById already includes the balance. In which case it wouldn't matter what's returned afterwards, as it would already include the formatted balance beforehand.

I thought `getContributorById` already includes the balance. In which case it wouldn't matter what's returned afterwards, as it would already include the formatted balance beforehand.
bumi (Migrated from github.com) reviewed 2019-04-19 22:27:04 +00:00
bumi (Migrated from github.com) commented 2019-04-19 22:27:04 +00:00

ah, true. before passing it to IPFS. 👍

ah, true. before passing it to IPFS. :+1:
raucao commented 2019-04-23 12:48:49 +00:00 (Migrated from github.com)

There's a merge conflict here.

There's a merge conflict here.
bumi commented 2019-04-24 13:10:59 +00:00 (Migrated from github.com)

conflict resolved.

conflict resolved.
Sign in to join this conversation.
No description provided.