diff options
| -rw-r--r-- | routes/assets.js | 31 |
1 files changed, 21 insertions, 10 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 - }; + let contract; - if (filename) contract.filename = filename; + 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) { |
