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
3 changed files with 6 additions and 7 deletions
Showing only changes of commit 375d8f3275 - Show all commits

View File

@@ -1,6 +1,6 @@
raucao commented 2019-04-19 10:04:15 +00:00 (Migrated from github.com)
Review

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 commented 2019-04-19 10:04:15 +00:00 (Migrated from github.com)
Review

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()`.
fsmanuel commented 2019-04-19 10:18:25 +00:00 (Migrated from github.com)
Review

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 commented 2019-04-19 10:18:25 +00:00 (Migrated from github.com)
Review

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

I think the convention is a dash for filenames in JS. 👍 `formatKredits()`
const Record = require('./record');
const ContributorSerializer = require('../serializers/contributor');
const KreditsFormatter = require('../utils/kredits-formatter');
raucao commented 2019-04-19 10:04:15 +00:00 (Migrated from github.com)
Review

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()`.
fsmanuel commented 2019-04-19 10:18:25 +00:00 (Migrated from github.com)
Review

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

I think the convention is a dash for filenames in JS. 👍 `formatKredits()`
const formatKredits = require('../utils/format-kredits');
raucao commented 2019-04-19 10:04:15 +00:00 (Migrated from github.com)
Review

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()`.
fsmanuel commented 2019-04-19 10:18:25 +00:00 (Migrated from github.com)
Review

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

I think the convention is a dash for filenames in JS. 👍 `formatKredits()`
class Contributor extends Record {
get count () {
@@ -11,11 +11,10 @@ class Contributor extends Record {
raucao commented 2019-04-19 10:04:15 +00:00 (Migrated from github.com)
Review

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 commented 2019-04-19 10:04:15 +00:00 (Migrated from github.com)
Review

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()`.
fsmanuel commented 2019-04-19 10:18:25 +00:00 (Migrated from github.com)
Review

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 commented 2019-04-19 10:18:25 +00:00 (Migrated from github.com)
Review

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

I think the convention is a dash for filenames in JS. 👍 `formatKredits()`
return this.functions.getContributorById(id)
.then(data => {
return this.ipfs.catAndMerge(data, ContributorSerializer.deserialize);
})
raucao commented 2019-04-19 10:04:15 +00:00 (Migrated from github.com)
Review

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()`.
fsmanuel commented 2019-04-19 10:18:25 +00:00 (Migrated from github.com)
Review

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

I think the convention is a dash for filenames in JS. 👍 `formatKredits()`
.then(data => {
raucao commented 2019-04-19 10:04:15 +00:00 (Migrated from github.com)
Review

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()`.
fsmanuel commented 2019-04-19 10:18:25 +00:00 (Migrated from github.com)
Review

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

I think the convention is a dash for filenames in JS. 👍 `formatKredits()`
data.balanceInt = KreditsFormatter(data.balance);
raucao commented 2019-04-19 10:04:15 +00:00 (Migrated from github.com)
Review

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()`.
fsmanuel commented 2019-04-19 10:18:25 +00:00 (Migrated from github.com)
Review

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

I think the convention is a dash for filenames in JS. 👍 `formatKredits()`
return Promise.resolve(data);
raucao commented 2019-04-19 10:04:15 +00:00 (Migrated from github.com)
Review

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()`.
fsmanuel commented 2019-04-19 10:18:25 +00:00 (Migrated from github.com)
Review

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

I think the convention is a dash for filenames in JS. 👍 `formatKredits()`
})
raucao commented 2019-04-19 10:04:15 +00:00 (Migrated from github.com)
Review

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()`.
fsmanuel commented 2019-04-19 10:18:25 +00:00 (Migrated from github.com)
Review

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

I think the convention is a dash for filenames in JS. 👍 `formatKredits()`
}).then(data => {
raucao commented 2019-04-19 10:04:15 +00:00 (Migrated from github.com)
Review

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()`.
fsmanuel commented 2019-04-19 10:18:25 +00:00 (Migrated from github.com)
Review

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

I think the convention is a dash for filenames in JS. 👍 `formatKredits()`
data.balanceInt = formatKredits(data.balance);
raucao commented 2019-04-19 10:04:15 +00:00 (Migrated from github.com)
Review

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()`.
fsmanuel commented 2019-04-19 10:18:25 +00:00 (Migrated from github.com)
Review

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

I think the convention is a dash for filenames in JS. 👍 `formatKredits()`
return data;
raucao commented 2019-04-19 10:04:15 +00:00 (Migrated from github.com)
Review

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()`.
fsmanuel commented 2019-04-19 10:18:25 +00:00 (Migrated from github.com)
Review

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

I think the convention is a dash for filenames in JS. 👍 `formatKredits()`
});
raucao commented 2019-04-19 10:04:15 +00:00 (Migrated from github.com)
Review

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()`.
fsmanuel commented 2019-04-19 10:18:25 +00:00 (Migrated from github.com)
Review

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

I think the convention is a dash for filenames in JS. 👍 `formatKredits()`
}
filterByAccount(search) {
raucao commented 2019-04-19 10:04:15 +00:00 (Migrated from github.com)
Review

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 commented 2019-04-19 10:04:15 +00:00 (Migrated from github.com)
Review

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()`.
fsmanuel commented 2019-04-19 10:18:25 +00:00 (Migrated from github.com)
Review

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 commented 2019-04-19 10:18:25 +00:00 (Migrated from github.com)
Review

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

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

View File

@@ -28,7 +28,7 @@ module.exports = async function(callback) {
c.account,
`${c.name}`,
c.isCore,
ethers.utils.formatEther(c.balance),
c.balanceInt,
c.ipfsHash
])
})