Merge pull request #893 from jessopb/j19bugfix
small bugfixes to outpoint and tweak markdown
This commit is contained in:
commit
c0e20f0420
3 changed files with 10 additions and 3 deletions
|
@ -64,7 +64,7 @@ class AssetDisplay extends React.Component {
|
||||||
if (typeof contentType === 'string') {
|
if (typeof contentType === 'string') {
|
||||||
fileExt = contentType.split('/')[1] || 'jpg';
|
fileExt = contentType.split('/')[1] || 'jpg';
|
||||||
}
|
}
|
||||||
const sourceUrl = `${createCanonicalLink({ asset: asset.claimData })}.${fileExt}?${outpoint}`;
|
const sourceUrl = `${createCanonicalLink({ asset: asset.claimData })}.${fileExt}?outpoint=${outpoint}`;
|
||||||
return (
|
return (
|
||||||
<div className={'asset-display'}>
|
<div className={'asset-display'}>
|
||||||
{(status === LOCAL_CHECK) &&
|
{(status === LOCAL_CHECK) &&
|
||||||
|
|
|
@ -37,7 +37,7 @@ class AssetInfo extends React.Component {
|
||||||
{ description && (
|
{ description && (
|
||||||
<RowLabeled
|
<RowLabeled
|
||||||
label={<Label value={'Description'} />}
|
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 && (
|
{editable && (
|
||||||
|
|
|
@ -10,7 +10,14 @@ module.exports = async (data, chName = null, chShortId = null) => {
|
||||||
// TODO: Refactor getching the channel name out; requires invasive changes.
|
// TODO: Refactor getching the channel name out; requires invasive changes.
|
||||||
const dataVals = data.dataValues ? data.dataValues : data;
|
const dataVals = data.dataValues ? data.dataValues : data;
|
||||||
const txid = dataVals.transaction_hash_id || dataVals.txid;
|
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 outpoint = `${txid}:${nout}`;
|
||||||
const certificateId = dataVals.publisher_id || dataVals.certificateId;
|
const certificateId = dataVals.publisher_id || dataVals.certificateId;
|
||||||
const fileExt = data.generated_extension || dataVals.fileExt;
|
const fileExt = data.generated_extension || dataVals.fileExt;
|
||||||
|
|
Loading…
Reference in a new issue