small bugfixes to outpoint and tweak markdown

This commit is contained in:
jessop 2019-02-01 02:18:15 -05:00
parent 4ae2410a71
commit 13aa109d28
3 changed files with 10 additions and 3 deletions

View file

@ -64,7 +64,7 @@ class AssetDisplay extends React.Component {
if (typeof contentType === 'string') {
fileExt = contentType.split('/')[1] || 'jpg';
}
const sourceUrl = `${createCanonicalLink({ asset: asset.claimData })}.${fileExt}?${outpoint}`;
const sourceUrl = `${createCanonicalLink({ asset: asset.claimData })}.${fileExt}?outpoint=${outpoint}`;
return (
<div className={'asset-display'}>
{(status === LOCAL_CHECK) &&

View file

@ -37,7 +37,7 @@ class AssetInfo extends React.Component {
{ description && (
<RowLabeled
label={<Label value={'Description'} />}
content={<div className='asset-info__description'><ReactMarkdown source={description}/></div>}
content={<div className='asset-info__description'><ReactMarkdown source={description} disallowedTypes={['image']}/></div>}
/>
)}
{editable && (

View file

@ -10,7 +10,14 @@ module.exports = async (data, chName = null, chShortId = null) => {
// TODO: Refactor getching the channel name out; requires invasive changes.
const dataVals = data.dataValues ? data.dataValues : data;
const txid = dataVals.transaction_hash_id || dataVals.txid;
const nout = dataVals.vout || dataVals.nout;
let nout;
if (typeof dataVals.vout === 'number') {
nout = dataVals.vout;
} else {
nout = dataVals.nout;
}
const outpoint = `${txid}:${nout}`;
const certificateId = dataVals.publisher_id || dataVals.certificateId;
const fileExt = data.generated_extension || dataVals.fileExt;