Skip to content

Commit

Permalink
notification tx
Browse files Browse the repository at this point in the history
  • Loading branch information
estebanmino committed Oct 16, 2020
1 parent 39287f6 commit 8607abc
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions app/components/UI/Notification/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,11 +254,17 @@ class Notification extends PureComponent {
tx = paymentChannelTransaction
? { paymentChannelTransaction, transaction: {} }
: this.props.transactions.find(({ id }) => id === this.props.transaction.id);
const decoded = await decodeTransaction({ ...this.props, tx });
transactionElement = decoded[0];
transactionDetails = decoded[1];
const existingGasPrice = tx.transaction ? tx.transaction.gasPrice : '0x0';
this.existingGasPriceDecimal = parseInt(existingGasPrice === undefined ? '0x0' : existingGasPrice, 16);
// THIS NEEDS REFACTOR
if (!tx) {
const decoded = await decodeTransaction({ ...this.props, tx });
transactionElement = decoded[0];
transactionDetails = decoded[1];
const existingGasPrice = tx.transaction ? tx.transaction.gasPrice : '0x0';
this.existingGasPriceDecimal = parseInt(
existingGasPrice === undefined ? '0x0' : existingGasPrice,
16
);
}
}
// eslint-disable-next-line react/no-did-update-set-state
await this.setState({
Expand Down

0 comments on commit 8607abc

Please sign in to comment.