fix: pull up tx details

This commit is contained in:
Sérgio Salgado 2020-12-16 12:24:21 +00:00 committed by Josh Harvey
parent 783e2cf9fc
commit 368d528ee2

View file

@ -5,10 +5,6 @@ const getCashOutStatus = it => {
return 'Pending' return 'Pending'
} }
const getCashOutStatusDetails = it => {
return it.hasError ? it.hasError : null
}
const getCashInStatus = it => { const getCashInStatus = it => {
if (it.operatorCompleted) return 'Cancelled' if (it.operatorCompleted) return 'Cancelled'
if (it.hasError) return 'Error' if (it.hasError) return 'Error'
@ -17,10 +13,6 @@ const getCashInStatus = it => {
return 'Pending' return 'Pending'
} }
const getCashInStatusDetails = it => {
return it.hasError ? it.hasError : null
}
const getStatus = it => { const getStatus = it => {
if (it.txClass === 'cashOut') { if (it.txClass === 'cashOut') {
return getCashOutStatus(it) return getCashOutStatus(it)
@ -29,9 +21,7 @@ const getStatus = it => {
} }
const getStatusDetails = it => { const getStatusDetails = it => {
return it.txClass === 'cashOut' return it.hasError ? it.hasError : null
? getCashOutStatusDetails(it)
: getCashInStatusDetails(it)
} }
export { getStatus, getStatusDetails } export { getStatus, getStatusDetails }