Skip to content

Commit

Permalink
Merge pull request #1195 from RafaelTaranto/fix/sumsub-small-issues
Browse files Browse the repository at this point in the history
LAM-1175 Fix/sumsub small issues
  • Loading branch information
RafaelTaranto authored Oct 9, 2024
2 parents 294887d + dfd53fe commit 1cbf858
Show file tree
Hide file tree
Showing 14 changed files with 115 additions and 83 deletions.
24 changes: 14 additions & 10 deletions i18n/ui/lbm-ui_en-US.po
Original file line number Diff line number Diff line change
Expand Up @@ -251,12 +251,16 @@ msgid "No, cancel"
msgstr "No, cancel"

#: On screen: external-validation
msgid "External compliance required"
msgstr "External compliance required"
msgid "Customer verification required"
msgstr "Customer verification required"

#: On screen: external-validation
msgid "To proceed, we are required to ask you to go through an external compliance system."
msgstr "To proceed, we are required to ask you to go through an external compliance system."
msgid "To proceed, we are required to verify your identify using a service on your phone."
msgstr "To proceed, we are required to verify your identify using a service on your phone."

#: On screen: external-validation
msgid "The process is quick and you’ll need an ID card to complete it."
msgstr "The process is quick and you’ll need an ID card to complete it."

#: On screen: external-validation
msgid "Continue?"
Expand All @@ -267,16 +271,16 @@ msgid "Yes, continue"
msgstr "Yes, continue"

#: On screen: external-validation
msgid "External compliance validation"
msgstr "External compliance validation"
msgid "Customer verification"
msgstr "Customer verification"

#: On screen: external-validation
msgid "In order to process your transaction, we will need to process your information through an external compliance system. This transaction will now be finished."
msgstr "In order to process your transaction, we will need to process your information through an external compliance system. This transaction will now be finished."
msgid "In order to transact further, we will need to verify your identity through an external service. In the meantime, your current transaction will be completed and your funds sent."
msgstr "In order to transact further, we will need to verify your identity through an external service. In the meantime, your current transaction will be completed and your funds sent."

#: On screen: external-validation
msgid "Scan the following QR code and follow further instructions to proceed."
msgstr "Scan the following QR code and follow further instructions to proceed."
msgid "To proceed, scan the QR code below and follow the instructions on the website it takes you to. After a quick verification, you may purchase more at this machine."
msgstr "To proceed, scan the QR code below and follow the instructions on the website it takes you to. After a quick verification, you may purchase more at this machine."

#: On screen: external-validation
msgid "OK"
Expand Down
22 changes: 11 additions & 11 deletions lib/brain.js
Original file line number Diff line number Diff line change
Expand Up @@ -1939,19 +1939,17 @@ Brain.prototype.showExternalCompliance = function showExternalCompliance (url) {

const insertedBills = this.tx.fiat.gt(0)
if (!insertedBills) {
this._transitionState('externalCompliance', { insertedBills, externalComplianceUrl: url })
this._transitionState('externalCompliance', { externalComplianceUrl: url })
return this._screenTimeout(() => this.finishBeforeSms(), EXTERNAL_VALIDTION_TIMEOUT)
}

this.updateBillsScreen(true)
.then(() => {
this._transitionState('externalCompliance', {
sendOnly: true,
cryptoCode: this.tx.cryptoCode,
externalComplianceUrl: url
})
return this._screenTimeout(() => this.finishBeforeSms(), EXTERNAL_VALIDTION_TIMEOUT)
})
this._transitionState('externalCompliance', {
tx: this.tx,
sendOnly: true,
cryptoCode: this.tx.cryptoCode,
externalComplianceUrl: url
})
return this._screenTimeout(() => this.finishBeforeSms(), EXTERNAL_VALIDTION_TIMEOUT)
}

Brain.prototype.authCompliance = function authCompliance (opts = {}) {
Expand Down Expand Up @@ -2558,7 +2556,9 @@ Brain.prototype.requiredTiers = function requiredTiers (triggers, history, trigg

// Custom trigger is identified by its uuid and should be pushed to last
const orderedWithRequired = [].concat(requiredAuth, ORDERED_REQUIREMENTS)
const requiredTiers = _.sortBy(name => uuid4Validate(name) ? Infinity : _.indexOf(name, orderedWithRequired))(unorderedTiers)
const requiredTiers = _.sortBy(name => {
return _.indexOf(uuid4Validate(name) ? REQUIREMENTS.CUSTOM : name, orderedWithRequired)
})(unorderedTiers)

this.requirementAmountTriggered = getLowestAmountPerRequirement(triggeredFormatted)
return requiredTiers
Expand Down
1 change: 1 addition & 0 deletions lib/compliance/triggers/consts.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ const ORDERED_REQUIREMENTS = [
REQUIREMENTS.SUSPEND,
REQUIREMENTS.BLOCK,
REQUIREMENTS.US_SSN,
REQUIREMENTS.CUSTOM,
REQUIREMENTS.EXTERNAL
]

Expand Down
8 changes: 4 additions & 4 deletions ui/css/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1903,10 +1903,6 @@ button[disabled] {
pointer-events: none;
}

@media (orientation: portrait) {
@import "./portrait.scss";
}

.external_compliance_state {
footer: {
margin-top: 15px;
Expand All @@ -1929,3 +1925,7 @@ button[disabled] {
margin-right: 0px;
};
}

@media (orientation: portrait) {
@import "./portrait.scss";
}
9 changes: 9 additions & 0 deletions ui/css/portrait.scss
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,15 @@ main {
}
}

.external_compliance_state {
main {
margin-bottom: 4vh;
}
footer {
margin-top: 0;
}
}

.maintenance_state,
.locked_state {
header {
Expand Down
15 changes: 9 additions & 6 deletions ui/html/external-compliance.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@
>
<div class="flex-center-verical custom-requirement-margin">
<main>
<h3 class="js-i18n nm-margin-bottom">External compliance required</h3>
<p class="js-i18n d2">
To proceed, we are required to ask you to go through an external compliance system.
<h3 class="js-i18n nm-margin-bottom">Customer verification required</h3>
<p class="js-i18n d2 no-margin-bottom">
To proceed, we are required to verify your identify using a service on your phone.
</p>
<p class="js-i18n d2 no-margin-top">
The process is quick and you’ll need an ID card to complete it.
</p>
<p class="js-i18n tl2 no-margin-top">
Continue?
Expand All @@ -26,13 +29,13 @@ <h3 class="js-i18n nm-margin-bottom">External compliance required</h3>
data-screentype="info-contact-tp"
>
<main>
<h3 class="js-i18n">External compliance validation</h3>
<h3 class="js-i18n">Customer verification</h3>
<div class="text-content">
<p class="js-i18n d2">
In order to process your transaction, we will need to process your information through an external compliance system. This transaction will now be finished.
In order to transact further, we will need to verify your identity through an external service. In the meantime, your current transaction will be completed and your funds sent.
</p>
<p class="js-i18n d2">
Scan the following QR code and follow further instructions to proceed.
To proceed, scan the QR code below and follow the instructions on the website it takes you to. After a quick verification, you may purchase more at this machine.
</p>
</div>
<div class="qr-wrapper">
Expand Down
3 changes: 1 addition & 2 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.

3 changes: 1 addition & 2 deletions ui/js/docker-app.js

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

65 changes: 36 additions & 29 deletions ui/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -3445,6 +3445,36 @@ button[disabled] {
pointer-events: none;
}

.external_compliance_state {
footer-margin-top: 15px;
}

.external_compliance_state footer {
margin-top: 5vh;
}

.external-validation-info {
display: -webkit-box;
display: -webkit-flex;
display: flex;
-webkit-box-orient: horizontal;
-webkit-box-direction: normal;
-webkit-flex-direction: row;
flex-direction: row;
-webkit-box-align: center;
-webkit-align-items: center;
align-items: center;
-webkit-box-pack: justify;
-webkit-justify-content: space-between;
justify-content: space-between;
}
.external-validation-info div {
margin-right: 15px;
}
.external-validation-info div:last-child {
margin-right: 0px;
}

@media (orientation: portrait) {
header {
padding: 2vh;
Expand Down Expand Up @@ -3947,6 +3977,12 @@ button[disabled] {
.info-no-image main {
margin-bottom: 10vh;
}
.external_compliance_state main {
margin-bottom: 4vh;
}
.external_compliance_state footer {
margin-top: 0;
}
.maintenance_state header,
.locked_state header {
height: 36vh;
Expand Down Expand Up @@ -4284,32 +4320,3 @@ button[disabled] {
gap: 1vh;
}
}
.external_compliance_state {
footer-margin-top: 15px;
}

.external_compliance_state footer {
margin-top: 5vh;
}

.external-validation-info {
display: -webkit-box;
display: -webkit-flex;
display: flex;
-webkit-box-orient: horizontal;
-webkit-box-direction: normal;
-webkit-flex-direction: row;
flex-direction: row;
-webkit-box-align: center;
-webkit-align-items: center;
align-items: center;
-webkit-box-pack: justify;
-webkit-justify-content: space-between;
justify-content: space-between;
}
.external-validation-info div {
margin-right: 15px;
}
.external-validation-info div:last-child {
margin-right: 0px;
}
1 change: 1 addition & 0 deletions ui/src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ function processData (data) {
invalidAddress(data.lnInvoiceTypeError)
break
case 'externalCompliance':
clearTimeout(complianceTimeout)
externalCompliance(data.externalComplianceUrl)
break
default:
Expand Down
15 changes: 9 additions & 6 deletions ui/start-docker.html
Original file line number Diff line number Diff line change
Expand Up @@ -949,9 +949,12 @@ <h3 class="js-i18n nm-margin-bottom">Verify email to continue</h3>
>
<div class="flex-center-verical custom-requirement-margin">
<main>
<h3 class="js-i18n nm-margin-bottom">External compliance required</h3>
<p class="js-i18n d2">
To proceed, we are required to ask you to go through an external compliance system.
<h3 class="js-i18n nm-margin-bottom">Customer verification required</h3>
<p class="js-i18n d2 no-margin-bottom">
To proceed, we are required to verify your identify using a service on your phone.
</p>
<p class="js-i18n d2 no-margin-top">
The process is quick and you’ll need an ID card to complete it.
</p>
<p class="js-i18n tl2 no-margin-top">
Continue?
Expand All @@ -970,13 +973,13 @@ <h3 class="js-i18n nm-margin-bottom">External compliance required</h3>
data-screentype="info-contact-tp"
>
<main>
<h3 class="js-i18n">External compliance validation</h3>
<h3 class="js-i18n">Customer verification</h3>
<div class="text-content">
<p class="js-i18n d2">
In order to process your transaction, we will need to process your information through an external compliance system. This transaction will now be finished.
In order to transact further, we will need to verify your identity through an external service. In the meantime, your current transaction will be completed and your funds sent.
</p>
<p class="js-i18n d2">
Scan the following QR code and follow further instructions to proceed.
To proceed, scan the QR code below and follow the instructions on the website it takes you to. After a quick verification, you may purchase more at this machine.
</p>
</div>
<div class="qr-wrapper">
Expand Down
15 changes: 9 additions & 6 deletions ui/start-test.html
Original file line number Diff line number Diff line change
Expand Up @@ -949,9 +949,12 @@ <h3 class="js-i18n nm-margin-bottom">Verify email to continue</h3>
>
<div class="flex-center-verical custom-requirement-margin">
<main>
<h3 class="js-i18n nm-margin-bottom">External compliance required</h3>
<p class="js-i18n d2">
To proceed, we are required to ask you to go through an external compliance system.
<h3 class="js-i18n nm-margin-bottom">Customer verification required</h3>
<p class="js-i18n d2 no-margin-bottom">
To proceed, we are required to verify your identify using a service on your phone.
</p>
<p class="js-i18n d2 no-margin-top">
The process is quick and you’ll need an ID card to complete it.
</p>
<p class="js-i18n tl2 no-margin-top">
Continue?
Expand All @@ -970,13 +973,13 @@ <h3 class="js-i18n nm-margin-bottom">External compliance required</h3>
data-screentype="info-contact-tp"
>
<main>
<h3 class="js-i18n">External compliance validation</h3>
<h3 class="js-i18n">Customer verification</h3>
<div class="text-content">
<p class="js-i18n d2">
In order to process your transaction, we will need to process your information through an external compliance system. This transaction will now be finished.
In order to transact further, we will need to verify your identity through an external service. In the meantime, your current transaction will be completed and your funds sent.
</p>
<p class="js-i18n d2">
Scan the following QR code and follow further instructions to proceed.
To proceed, scan the QR code below and follow the instructions on the website it takes you to. After a quick verification, you may purchase more at this machine.
</p>
</div>
<div class="qr-wrapper">
Expand Down
15 changes: 9 additions & 6 deletions ui/start.html
Original file line number Diff line number Diff line change
Expand Up @@ -949,9 +949,12 @@ <h3 class="js-i18n nm-margin-bottom">Verify email to continue</h3>
>
<div class="flex-center-verical custom-requirement-margin">
<main>
<h3 class="js-i18n nm-margin-bottom">External compliance required</h3>
<p class="js-i18n d2">
To proceed, we are required to ask you to go through an external compliance system.
<h3 class="js-i18n nm-margin-bottom">Customer verification required</h3>
<p class="js-i18n d2 no-margin-bottom">
To proceed, we are required to verify your identify using a service on your phone.
</p>
<p class="js-i18n d2 no-margin-top">
The process is quick and you’ll need an ID card to complete it.
</p>
<p class="js-i18n tl2 no-margin-top">
Continue?
Expand All @@ -970,13 +973,13 @@ <h3 class="js-i18n nm-margin-bottom">External compliance required</h3>
data-screentype="info-contact-tp"
>
<main>
<h3 class="js-i18n">External compliance validation</h3>
<h3 class="js-i18n">Customer verification</h3>
<div class="text-content">
<p class="js-i18n d2">
In order to process your transaction, we will need to process your information through an external compliance system. This transaction will now be finished.
In order to transact further, we will need to verify your identity through an external service. In the meantime, your current transaction will be completed and your funds sent.
</p>
<p class="js-i18n d2">
Scan the following QR code and follow further instructions to proceed.
To proceed, scan the QR code below and follow the instructions on the website it takes you to. After a quick verification, you may purchase more at this machine.
</p>
</div>
<div class="qr-wrapper">
Expand Down

0 comments on commit 1cbf858

Please sign in to comment.