diff --git a/server/web3tools/second_mint.js b/server/web3tools/second_mint.js index 241ef58..1798615 100644 --- a/server/web3tools/second_mint.js +++ b/server/web3tools/second_mint.js @@ -5,37 +5,3 @@ const bcutils = require('j7/bcutils'); const event = require('j7/event'); const config = require('j7/config'); const bchelper = require('common/bchelper'); - -function jsonToCsv(fileName, data, fields) { - let out = ''; - const csvFields = [ - ['chain', '', 13473], - ['to', 'address', ''], - ['type', '', 2], - ['address', '', '0x65570A86E5aA2B14325f8a13C70b74f7d1E2f5c9'], - ['from', '', ''], - ['amount', '', ''], - ['tokenid', 'token_id', ''] - ]; - csvFields.forEach( - (field) => { - out += field[0] + ','; - } - ); - out += '\n'; - data.forEach( - (row) => { - csvFields.forEach( - (field) => { - if (row[field[1]]) { - out += row[field[1]] + ','; - } else { - out += field[2] + ','; - } - } - ); - out += '\n'; - } - ); - fs.writeFileSync(fileName, out); -}