From 13bba6af63fe3f8020d40ed76279af5bc060e7e3 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Mon, 30 Aug 2021 17:53:20 -0400 Subject: put asset file in lexicographical order --- routes/assets.js | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/routes/assets.js b/routes/assets.js index 0a71bbb8..d163e8e6 100644 --- a/routes/assets.js +++ b/routes/assets.js @@ -100,16 +100,28 @@ app.post( : (await lq.getAddressInfo(asset_address)).pubkey; const version = 0; - const contract = { - entity: { domain }, - issuer_pubkey, - name, - precision, - ticker, - version - }; - - if (filename) contract.filename = filename; + let contract; + + if (filename) { + contract = { + entity: { domain }, + file: filename, + issuer_pubkey, + name, + precision, + ticker, + version + }; + } else { + contract = { + entity: { domain }, + issuer_pubkey, + name, + precision, + ticker, + version + }; + } l.info( "attempting issuance", @@ -136,7 +148,6 @@ app.post( contract_hash }; - params.asset_amount = asset_amount / (SATS / 10 ** precision); if (token_amount) { -- cgit v1.2.3