diff options
| -rw-r--r-- | lib/sync.js | 4 | ||||
| -rw-r--r-- | routes/assets.js | 22 |
2 files changed, 8 insertions, 18 deletions
diff --git a/lib/sync.js b/lib/sync.js index ba8d0a48..40f3f56f 100644 --- a/lib/sync.js +++ b/lib/sync.js @@ -269,5 +269,5 @@ const sync = async () => { } }; -setTimeout(sync, 5000); -setInterval(sync, 720000); +// setTimeout(sync, 5000); +// setInterval(sync, 720000); diff --git a/routes/assets.js b/routes/assets.js index 14d2c705..cf9aca4e 100644 --- a/routes/assets.js +++ b/routes/assets.js @@ -102,29 +102,19 @@ app.post( : (await lq.getAddressInfo(asset_address)).pubkey; const version = 0; - let contract; - - if (filename) { - contract = { - entity: { domain }, - file: filename, - issuer_pubkey, - name, - precision, - ticker, - version - }; - } else { - contract = { + let contract = { entity: { domain }, issuer_pubkey, name, precision, - ticker, version - }; } + if (filename) contract.file = filename; + if (ticker) contract.ticker = ticker; + + contract = Object.keys(contract).sort().reduce((r, k) => (r[k] = contract[k], r), {}); + l.info( "attempting issuance", req.user.username, |
