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);
|
||||
}
|
||||
|
||||
capitalize = (string: string) => string.charAt(0).toUpperCase() + string.slice(1);
|
||||
capitalize = (string: ?string) => string && string.charAt(0).toUpperCase() + string.slice(1);
|
||||
|
||||
render() {
|
||||
const { reward, transaction, isRevokeable } = this.props;
|
||||
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 = {
|
||||
month: 'short',
|
||||
|
|
Loading…
Add table
Reference in a new issue