Merge pull request #893 from jessopb/j19bugfix

small bugfixes to outpoint and tweak markdown
This commit is contained in:
jessopb 2019-02-02 22:03:36 -05:00 committed by GitHub
commit c0e20f0420
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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;