Skip to content

Commit

Permalink
Merge pull request LN-Zap#667 from mrfelton/fix/transaction-amount-hints
Browse files Browse the repository at this point in the history
fix(activity): correct tooltips in activity log
  • Loading branch information
JimmyMow authored Aug 14, 2018
2 parents 024e9bd + a6439f1 commit 1f20907
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 12 deletions.
9 changes: 7 additions & 2 deletions app/routes/activity/components/components/Invoice/Invoice.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,13 @@ const Invoice = ({ invoice, ticker, currentTicker, showActivityModal, currencyNa
</Moment>
</div>
</div>
<div className={`${styles.amount} ${invoice.settled ? styles.positive : styles.negative}`}>
<span className="hint--top" data-hint="Invoice amount">
<div
className={`hint--top-left ${styles.amount} ${
invoice.settled ? styles.positive : styles.negative
}`}
data-hint="Invoice amount"
>
<span>
<i className={styles.plus}>+</i>
<Value value={invoice.value} currency={ticker.currency} currentTicker={currentTicker} />
<i> {currencyName}</i>
Expand Down
8 changes: 3 additions & 5 deletions app/routes/activity/components/components/Payment/Payment.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,13 @@ const Payment = ({ payment, ticker, currentTicker, showActivityModal, nodes, cur
<Moment format="h:mm a">{payment.creation_date * 1000}</Moment>
</div>
</div>
<div className={styles.amount}>
<span className="hint--top" data-hint="Payment amount">
<div className={`hint--top-left ${styles.amount}`} data-hint="Payment amount">
<span>
<i className={styles.minus}>-</i>
<Value value={payment.value} currency={ticker.currency} currentTicker={currentTicker} />
<i> {currencyName}</i>
</span>
<span className="hint--bottom" data-hint="Payment fee">
${btc.convert('sats', 'usd', payment.value, currentTicker.price_usd)}
</span>
<span>${btc.convert('sats', 'usd', payment.value, currentTicker.price_usd)}</span>
</div>
</div>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,13 @@ const Transaction = ({ transaction, ticker, currentTicker, showActivityModal, cu
<Moment format="h:mm a">{transaction.time_stamp * 1000}</Moment>
</div>
</div>
<div className={`${styles.amount} ${transaction.received ? styles.positive : styles.negative}`}>
<span className="hint--top" data-hint="Transaction amount">
<div
className={`hint--top-left ${styles.amount} ${
transaction.received ? styles.positive : styles.negative
}`}
data-hint="Transaction amount"
>
<span>
<i className={transaction.received ? styles.plus : styles.minus}>
{transaction.received ? '+' : '-'}
</i>
Expand All @@ -39,9 +44,7 @@ const Transaction = ({ transaction, ticker, currentTicker, showActivityModal, cu
/>
<i> {currencyName}</i>
</span>
<span className="hint--bottom" data-hint="Transaction fee">
${btc.convert('sats', 'usd', transaction.amount, currentTicker.price_usd)}
</span>
<span>${btc.convert('sats', 'usd', transaction.amount, currentTicker.price_usd)}</span>
</div>
</div>
)
Expand Down

0 comments on commit 1f20907

Please sign in to comment.