mirror of
https://github.com/LBRYFoundation/lbry-desktop.git
synced 2025-09-08 03:29:46 +00:00
fix: tx list for claims with no name
This commit is contained in:
parent
6eeafeca4c
commit
439ac848ab
1 changed files with 7 additions and 3 deletions
|
@ -37,13 +37,17 @@ class TransactionListItem extends React.PureComponent<Props> {
|
||||||
this.props.revokeClaim(txid, nout);
|
this.props.revokeClaim(txid, nout);
|
||||||
}
|
}
|
||||||
|
|
||||||
capitalize = (string: string) => string.charAt(0).toUpperCase() + string.slice(1);
|
capitalize = (string: ?string) => string && string.charAt(0).toUpperCase() + string.slice(1);
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { reward, transaction, isRevokeable } = this.props;
|
const { reward, transaction, isRevokeable } = this.props;
|
||||||
const { amount, claim_id: claimId, claim_name: name, date, fee, txid, type } = transaction;
|
const { amount, claim_id: claimId, claim_name: name, date, fee, txid, type } = transaction;
|
||||||
// Ensure the claim name is valid
|
|
||||||
const { claimName } = parseURI(name);
|
// Ensure the claim name exists and is valid
|
||||||
|
let claimName = name;
|
||||||
|
if (claimName) {
|
||||||
|
({ claimName } = parseURI(name));
|
||||||
|
}
|
||||||
|
|
||||||
const dateFormat = {
|
const dateFormat = {
|
||||||
month: 'short',
|
month: 'short',
|
||||||
|
|
Loading…
Add table
Reference in a new issue