mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Fixes shapeshift txs so that they render in tx list. (#3208)
This commit is contained in:
parent
f39222c9af
commit
c8c2dfdc0f
@ -29,10 +29,7 @@ function ShiftListItem () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ShiftListItem.prototype.render = function () {
|
ShiftListItem.prototype.render = function () {
|
||||||
const { selectedAddress, receivingAddress } = this.props
|
return h('div.tx-list-item.tx-list-clickable', {
|
||||||
return (
|
|
||||||
selectedAddress === receivingAddress
|
|
||||||
? h('div.tx-list-item.tx-list-clickable', {
|
|
||||||
style: {
|
style: {
|
||||||
paddingTop: '20px',
|
paddingTop: '20px',
|
||||||
paddingBottom: '20px',
|
paddingBottom: '20px',
|
||||||
@ -61,8 +58,6 @@ ShiftListItem.prototype.render = function () {
|
|||||||
this.renderInfo(),
|
this.renderInfo(),
|
||||||
this.renderUtilComponents(),
|
this.renderUtilComponents(),
|
||||||
])
|
])
|
||||||
: null
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function formatDate (date) {
|
function formatDate (date) {
|
||||||
|
@ -50,6 +50,7 @@ TxList.prototype.render = function () {
|
|||||||
|
|
||||||
TxList.prototype.renderTransaction = function () {
|
TxList.prototype.renderTransaction = function () {
|
||||||
const { txsToRender, conversionRate } = this.props
|
const { txsToRender, conversionRate } = this.props
|
||||||
|
|
||||||
return txsToRender.length
|
return txsToRender.length
|
||||||
? txsToRender.map((transaction, i) => this.renderTransactionListItem(transaction, conversionRate, i))
|
? txsToRender.map((transaction, i) => this.renderTransactionListItem(transaction, conversionRate, i))
|
||||||
: [h(
|
: [h(
|
||||||
@ -65,11 +66,7 @@ TxList.prototype.renderTransactionListItem = function (transaction, conversionRa
|
|||||||
// refer to transaction-list.js:line 58
|
// refer to transaction-list.js:line 58
|
||||||
|
|
||||||
if (transaction.key === 'shapeshift') {
|
if (transaction.key === 'shapeshift') {
|
||||||
return h('div', {
|
return h(ShiftListItem, { ...transaction, key: `shapeshift${index}` })
|
||||||
key: `shapeshift${index}`,
|
|
||||||
}, [
|
|
||||||
h(ShiftListItem, transaction),
|
|
||||||
])
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const props = {
|
const props = {
|
||||||
|
Loading…
Reference in New Issue
Block a user