Skip to content

Commit

Permalink
Merge pull request #1246 from RafaelTaranto/backport/blacklist-message
Browse files Browse the repository at this point in the history
LAM-629 backport: blacklist message
  • Loading branch information
RafaelTaranto authored Nov 29, 2024
2 parents bedd930 + ce2fcf1 commit 6cdb40e
Show file tree
Hide file tree
Showing 10 changed files with 46 additions and 14 deletions.
8 changes: 4 additions & 4 deletions i18n/ui/lbm-ui_en-US.po
Original file line number Diff line number Diff line change
Expand Up @@ -702,10 +702,6 @@ msgstr "Yes, verify phone"
msgid "Suspicious address"
msgstr "Suspicious address"

#: On screen: suspicious-address
msgid "This address may be associated with a deceptive offer or a prohibited group. Please make sure you're using an address from your own wallet."
msgstr "This address may be associated with a deceptive offer or a prohibited group. Please make sure you're using an address from your own wallet."

#: On screen: booting
msgid "Booting up..."
msgstr "Booting up..."
Expand Down Expand Up @@ -1074,6 +1070,10 @@ msgstr "Discount added (%s off commissions)"
msgid "An error occurred, try again."
msgstr "An error occurred, try again."

#: On screen: dynamic
msgid "This address may be associated with a deceptive offer or a prohibited group. Please make sure you\'re using an address from your own wallet."
msgstr "This address may be associated with a deceptive offer or a prohibited group. Please make sure you\'re using an address from your own wallet."

#: On screen: coins
msgid "Bitcoin"
msgstr "Bitcoin"
Expand Down
2 changes: 1 addition & 1 deletion lib/brain.js
Original file line number Diff line number Diff line change
Expand Up @@ -2806,7 +2806,7 @@ Brain.prototype._handleScan = function _handleScan (address) {

if (it.blacklisted) {
return setTimeout(() => {
this._timedState('suspiciousAddress')
this._timedState('suspiciousAddress', { data: { blacklistMessage: it.blacklistMessage } })
}, remaining)
}

Expand Down
3 changes: 1 addition & 2 deletions ui/html/suspicious-address.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
<main>
<h3 class="js-i18n xs-margin-bottom">Suspicious address</h3>
<div class="text-content sm-margin-top">
<p class="js-i18n d2">
This address may be associated with a deceptive offer or a prohibited group. Please make sure you're using an address from your own wallet.
<p id="suspicious-address-message" class="d2">
</p>
</div>
</main>
Expand Down
12 changes: 12 additions & 0 deletions ui/js/app.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ui/js/app.js.map

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions ui/js/docker-app.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions ui/src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,10 @@ function processData (data) {
clearTimeout(complianceTimeout)
externalCompliance(data.externalComplianceUrl)
break
case 'suspiciousAddress':
suspiciousAddress(data.blacklistMessage)
setState('suspicious_address')
break
case 'rates':
setState('rates')
break
Expand Down Expand Up @@ -2097,6 +2101,14 @@ function externalCompliance (url) {
return setScreen('external_compliance')
}

function suspiciousAddress (blacklistMessage) {
if (blacklistMessage) {
$(`#suspicious-address-message`).html(blacklistMessage)
} else {
$(`#suspicious-address-message`).html(translate("This address may be associated with a deceptive offer or a prohibited group. Please make sure you\'re using an address from your own wallet."))
}
}

function setScreenOptions (opts) {
(opts.rates && opts.rates.active) ? $('#rates-section').show() : $('#rates-section').hide()
}
Expand Down
3 changes: 1 addition & 2 deletions ui/start-docker.html
Original file line number Diff line number Diff line change
Expand Up @@ -2506,8 +2506,7 @@ <h3 class="js-i18n nm-margin-bottom">Verify phone to continue</h3>
<main>
<h3 class="js-i18n xs-margin-bottom">Suspicious address</h3>
<div class="text-content sm-margin-top">
<p class="js-i18n d2">
This address may be associated with a deceptive offer or a prohibited group. Please make sure you're using an address from your own wallet.
<p id="suspicious-address-message" class="d2">
</p>
</div>
</main>
Expand Down
3 changes: 1 addition & 2 deletions ui/start-test.html
Original file line number Diff line number Diff line change
Expand Up @@ -2506,8 +2506,7 @@ <h3 class="js-i18n nm-margin-bottom">Verify phone to continue</h3>
<main>
<h3 class="js-i18n xs-margin-bottom">Suspicious address</h3>
<div class="text-content sm-margin-top">
<p class="js-i18n d2">
This address may be associated with a deceptive offer or a prohibited group. Please make sure you're using an address from your own wallet.
<p id="suspicious-address-message" class="d2">
</p>
</div>
</main>
Expand Down
3 changes: 1 addition & 2 deletions ui/start.html
Original file line number Diff line number Diff line change
Expand Up @@ -2506,8 +2506,7 @@ <h3 class="js-i18n nm-margin-bottom">Verify phone to continue</h3>
<main>
<h3 class="js-i18n xs-margin-bottom">Suspicious address</h3>
<div class="text-content sm-margin-top">
<p class="js-i18n d2">
This address may be associated with a deceptive offer or a prohibited group. Please make sure you're using an address from your own wallet.
<p id="suspicious-address-message" class="d2">
</p>
</div>
</main>
Expand Down

0 comments on commit 6cdb40e

Please sign in to comment.