fix: ciphertrace ui score color
This commit is contained in:
parent
c003cc81f8
commit
209ead5e32
4 changed files with 11 additions and 5 deletions
|
|
@ -113,7 +113,8 @@ function postProcess (r, pi, isBlacklisted, addressReuse, walletScore) {
|
|||
return Promise.resolve({
|
||||
walletScore: walletScore.score,
|
||||
operatorCompleted: true,
|
||||
error: 'Ciphertrace score is above defined threshold'
|
||||
error: 'Ciphertrace score is above defined threshold',
|
||||
errorCode: 'scoreThresholdReached'
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ function getWalletScore (tx, pi) {
|
|||
? _.assign(tx, { walletScore: highestScore.score })
|
||||
: _.assign(tx, {
|
||||
walletScore: highestScore.score,
|
||||
error: 'Address score is above defined threshold',
|
||||
error: 'Ciphertrace score is above defined threshold',
|
||||
errorCode: 'scoreThresholdReached',
|
||||
dispense: true
|
||||
})
|
||||
|
|
|
|||
|
|
@ -169,6 +169,10 @@ const DetailsRow = ({ it: tx, timezone }) => {
|
|||
FileSaver.saveAs(content, zipFilename)
|
||||
}
|
||||
|
||||
const hasCiphertraceError = tx =>
|
||||
!R.isNil(tx.errorCode) &&
|
||||
R.includes(tx.errorCode, ['scoreThresholdReached', 'ciphertraceError'])
|
||||
|
||||
const errorElements = (
|
||||
<>
|
||||
<Label>Transaction status</Label>
|
||||
|
|
@ -187,10 +191,10 @@ const DetailsRow = ({ it: tx, timezone }) => {
|
|||
r={3.5}
|
||||
fill={
|
||||
it < tx.walletScore
|
||||
? R.isNil(tx.hasError)
|
||||
? !hasCiphertraceError(tx)
|
||||
? primaryColor
|
||||
: errorColor
|
||||
: R.isNil(tx.hasError)
|
||||
: !hasCiphertraceError(tx)
|
||||
? subheaderColor
|
||||
: offErrorColor
|
||||
}
|
||||
|
|
@ -203,7 +207,7 @@ const DetailsRow = ({ it: tx, timezone }) => {
|
|||
noMargin
|
||||
className={classNames({
|
||||
[classes.bold]: true,
|
||||
[classes.error]: !R.isNil(tx.hasError)
|
||||
[classes.error]: hasCiphertraceError(tx)
|
||||
})}>
|
||||
{tx.walletScore}
|
||||
</P>
|
||||
|
|
|
|||
|
|
@ -101,6 +101,7 @@ const GET_TRANSACTIONS = gql`
|
|||
sendConfirmed
|
||||
dispense
|
||||
hasError: error
|
||||
errorCode
|
||||
deviceId
|
||||
fiat
|
||||
cashInFee
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue