1
0
mirror of https://github.com/oceanprotocol/commons.git synced 2023-03-15 18:03:00 +01:00

consume fix

* workaround for https://github.com/oceanprotocol/squid-js/pull/221
This commit is contained in:
Matthias Kretschmann 2019-05-06 15:26:15 +02:00
parent 539cc0f3c8
commit 20299d9116
Signed by: m
GPG Key ID: 606EEEF3C479A91F

View File

@ -81,7 +81,7 @@ export default class AssetFile extends PureComponent<
return (
<div className={styles.fileWrap}>
<ul key={file.index} className={styles.file}>
<ul key={index} className={styles.file}>
<li>
{file.contentType && file.contentType.split('/')[1]}
</li>
@ -98,7 +98,10 @@ export default class AssetFile extends PureComponent<
<Button
primary
className={styles.buttonMain}
onClick={() => index && this.purchaseAsset(ddo, index)}
// TODO: remove the || 0 once hack
// https://github.com/oceanprotocol/squid-js/pull/221
// is released
onClick={() => this.purchaseAsset(ddo, index || 0)}
disabled={!isLogged || !isNile}
>
Get file