Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add screen for reused address #366

Merged
merged 1 commit into from
Jul 31, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
110 changes: 81 additions & 29 deletions i18n/ui/lbm-ui_en-US.po
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
#: On screen: address-reuse
msgid "Address already used"
msgstr "Address already used"

#: On screen: address-reuse
msgid "It looks like you've used this address already."
msgstr "It looks like you've used this address already."

#: On screen: address-reuse
msgid "For both your privacy and safety against scams, plase generate a new one from your wallet and scan that one instead."
msgstr "For both your privacy and safety against scams, plase generate a new one from your wallet and scan that one instead."

#: On screen: address-reuse
msgid "Start over"
msgstr "Start over"

#: On screen: are-you-sure
msgid "Are you sure?"
msgstr "Are you sure?"
Expand Down Expand Up @@ -130,14 +146,30 @@ msgstr "Dispensing..."
msgid "Please wait while we dispense your cash."
msgstr "Please wait while we dispense your cash."

#: On screen: dispensing
#: On screen: dispensing-collect
msgid "All set"
msgstr "All set"

#: On screen: dispensing
#: On screen: dispensing-collect
msgid "Please remove your cash from the tray."
msgstr "Please remove your cash from the tray."

#: On screen: dispensing-partial-collect
msgid "Collect bills"
msgstr "Collect bills"

#: On screen: dispensing-partial-collect
msgid "To continue dispensing, take your cash from the tray."
msgstr "To continue dispensing, take your cash from the tray."

#: On screen: facephoto
msgid "Look at the dot"
msgstr "Look at the dot"

#: On screen: facephoto
msgid "This should just take a second."
msgstr "This should just take a second."

#: On screen: facephoto-permission
msgid "May we?"
msgstr "May we?"
Expand All @@ -154,15 +186,39 @@ msgstr "Yes, take photo"
msgid "No, finish up"
msgstr "No, finish up"

#: On screen: facephoto
#: On screen: facephoto-failed-number
msgid "Try again?"
msgstr "Try again?"

#: On screen: facephoto-failed-number
msgid "Looks like we didn't get a good shot."
msgstr "Looks like we didn't get a good shot."

#: On screen: facephoto-failed-number
msgid "Shall we try another photo?"
msgstr "Shall we try another photo?"

#: On screen: facephoto-failed-number
msgid "Yes, try again"
msgstr "Yes, try again"

#: On screen: facephoto-failed-number
msgid "No, send coins"
msgstr "No, send coins"

#: On screen: facephoto-failed-number
msgid "No, cancel"
msgstr "No, cancel"

#: On screen: facephoto_retry
msgid "Look into the camera"
msgstr "Look into the camera"

#: On screen: facephoto
#: On screen: facephoto_retry
msgid "We didn't get a good picture of you."
msgstr "We didn't get a good picture of you."

#: On screen: facephoto
#: On screen: facephoto_retry
msgid "Please look into the camera located above the screen."
msgstr "Please look into the camera located above the screen."

Expand Down Expand Up @@ -190,6 +246,22 @@ msgstr "Apologies. We've reached our mandated per-user limit."
msgid "OK"
msgstr "OK"

#: On screen: id-verification
msgid "ID verification"
msgstr "ID verification"

#: On screen: id-verification
msgid "If you'd like to make a larger purchase, we'll need to make sure you're you by asking for you to scan your ID."
msgstr "If you'd like to make a larger purchase, we'll need to make sure you're you by asking for you to scan your ID."

#: On screen: id-verification
msgid "Would you like to insert more bills?"
msgstr "Would you like to insert more bills?"

#: On screen: id-verification
msgid "Yes, verify ID"
msgstr "Yes, verify ID"

#: On screen: insert-bills
msgid "Wallet successfully validated!"
msgstr "Wallet successfully validated!"
Expand Down Expand Up @@ -386,30 +458,10 @@ msgstr "Send coins"
msgid "Sending your coins..."
msgstr "Sending your coins..."

#: On screen: sms-verification
msgid "ID verification"
msgstr "ID verification"

#: On screen: sms-verification
msgid "If you'd like to make a larger purchase we need to ask for your mobile phone number. We'll then send you an SMS code."
msgstr "If you'd like to make a larger purchase we need to ask for your mobile phone number. We'll then send you an SMS code."

#: On screen: sms-verification
msgid "Would you like to insert more bills?"
msgstr "Would you like to insert more bills?"

#: On screen: sms-verification
msgid "Yes, verify ID"
msgstr "Yes, verify ID"

#: On screen: sms-verification
msgid "No, send coins"
msgstr "No, send coins"

#: On screen: sms-verification
msgid "No, cancel"
msgstr "No, cancel"

#: On screen: suspicious-address
msgid "Suspicious address"
msgstr "Suspicious address"
Expand All @@ -418,10 +470,6 @@ msgstr "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: suspicious-address
msgid "Start over"
msgstr "Start over"

#: On screen: booting
msgid "Booting up..."
msgstr "Booting up..."
Expand Down Expand Up @@ -662,6 +710,10 @@ msgstr "This could take a few seconds."
msgid "Verifying photo card..."
msgstr "Verifying photo card..."

#: On screen: verifying-facephoto
msgid "Verifying photo..."
msgstr "Verifying photo..."

#: On screen: wifi
msgid "Select a WiFi network"
msgstr "Select a WiFi network"
Expand Down
6 changes: 6 additions & 0 deletions lib/brain.js
Original file line number Diff line number Diff line change
Expand Up @@ -2237,6 +2237,12 @@ Brain.prototype._handleScan = function _handleScan (address) {
? Math.max(0, extraTime)
: 0

if (it.addressReuse) {
return setTimeout(() => {
this._timedState('addressReuse')
}, remaining)
}

if (it.blacklisted) {
return setTimeout(() => {
this._timedState('suspiciousAddress')
Expand Down
1 change: 1 addition & 0 deletions ui/css/text-content-sizes.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
}

.unpaired_state,
.address_reuse_state,
.suspicious_address_state,
.max_phone_retries_state,
.sms_verification_state {
Expand Down
29 changes: 29 additions & 0 deletions ui/html/address-reuse.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<section
class="viewport address_reuse_state info cash-in-color"
data-tr-section="address-reuse"
data-screentype="info-action-tp"
>
<header>
<img src="images/address-reuse.svg" />
</header>

<main>
<h3 class="js-i18n xs-margin-bottom">Address already used</h3>
<div class="text-content sm-margin-top">
<p class="js-i18n d2 sm-margin-bottom">
It looks like you've used this address already.
</p>
<p class="js-i18n d2">
For both your privacy and safety against scams,
plase generate a new one from your wallet and
scan that one instead.
</p>
</div>
</main>

<footer>
<button id="address-reuse-start-over" class="filled-progress-button button js-i18n">
Start over
</button>
</footer>
</section>
42 changes: 42 additions & 0 deletions ui/images/address-reuse.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions ui/src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,7 @@ $(document).ready(function () {
setupButton('photo-scan-failed-cancel', 'bye')
setupButton('photo-verification-failed-ok', 'cancelIdScan')
setupButton('invalid-address-try-again', 'invalidAddressTryAgain')
setupButton('address-reuse-start-over', 'idle')
setupButton('suspicious-address-start-over', 'idle')

setupButton('sanctions-failure-ok', 'idle')
Expand Down