mirror of
https://github.com/LBRYFoundation/lbry-desktop.git
synced 2025-09-03 20:35:17 +00:00
Fix: name in tx info
This should be avoidable going forward, but there was a claim name with a # present in a user's tx history. To be safe, pass the name through the parser again.
This commit is contained in:
parent
91f3b5f4ba
commit
13e70ecd09
1 changed files with 7 additions and 4 deletions
|
@ -6,7 +6,7 @@ import ButtonTransaction from 'component/common/transaction-link';
|
||||||
import CreditAmount from 'component/common/credit-amount';
|
import CreditAmount from 'component/common/credit-amount';
|
||||||
import DateTime from 'component/dateTime';
|
import DateTime from 'component/dateTime';
|
||||||
import Button from 'component/button';
|
import Button from 'component/button';
|
||||||
import { buildURI } from 'lbry-redux';
|
import { buildURI, parseURI } from 'lbry-redux';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
transaction: Transaction,
|
transaction: Transaction,
|
||||||
|
@ -42,6 +42,9 @@ class TransactionListItem extends React.PureComponent<Props> {
|
||||||
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);
|
||||||
|
|
||||||
const dateFormat = {
|
const dateFormat = {
|
||||||
month: 'short',
|
month: 'short',
|
||||||
day: 'numeric',
|
day: 'numeric',
|
||||||
|
@ -65,9 +68,9 @@ class TransactionListItem extends React.PureComponent<Props> {
|
||||||
</td>
|
</td>
|
||||||
<td className="table__item--actionable">
|
<td className="table__item--actionable">
|
||||||
{reward && <span>{reward.reward_title}</span>}
|
{reward && <span>{reward.reward_title}</span>}
|
||||||
{name && claimId && (
|
{claimName && claimId && (
|
||||||
<Button button="link" navigate={buildURI({ claimName: name, claimId })}>
|
<Button button="link" navigate={buildURI({ claimName: claimName, claimId })}>
|
||||||
{name}
|
{claimName}
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
</td>
|
</td>
|
||||||
|
|
Loading…
Add table
Reference in a new issue