diff --git a/scripts/list-contributors.js b/scripts/list-contributors.js index 6ac7dc5..f4944d9 100644 --- a/scripts/list-contributors.js +++ b/scripts/list-contributors.js @@ -15,12 +15,16 @@ module.exports = async function(callback) { console.log(`Using Contributor at: ${kredits.Contributor.contract.address}`); - const table = new Table({ head: ['ID', 'Account', 'Name', 'Core?', 'Balance', 'IPFS'] }) - let contributors = await kredits.Contributor.all() + try { + const contributors = await kredits.Contributor.all() + } catch(e) { + callback(e); + return; + } contributors.forEach((c) => { table.push([ @@ -32,7 +36,9 @@ module.exports = async function(callback) { c.ipfsHash ]) }) + console.log(table.toString()) + callback() }