aboutsummaryrefslogtreecommitdiffstats
path: root/routes
diff options
context:
space:
mode:
Diffstat (limited to 'routes')
-rw-r--r--routes/assets.js22
1 files changed, 6 insertions, 16 deletions
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,