Skip to content

Commit 3f59a3b

Browse files
author
jsolman
committed
Support an additional KYC state.
1 parent 93ac9e4 commit 3f59a3b

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

src/renderer/components/modals/KycModal.vue

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020
<p>Unfortunately your KYC Application was denied.</p>
2121
<p>You must wait an additional {{ deniedRemainingMinutes }} minutes in order to try again.</p>
2222
</div>
23+
<div v-if="kycStatus.startsWith('disabled')">
24+
<p>We are temporarily not accepting KYC applications.</p>
25+
<p>This issue should be remedied in the near future. Please be patient and try again later. </p>
26+
</div>
2327
</body>
2428

2529
<button class="dismiss-btn" @click="close">Dismiss</button>
@@ -58,6 +62,8 @@ export default {
5862
webFrame.setZoomFactor(1);
5963
const services = this.$services;
6064
const store = this.$store;
65+
// For testing:
66+
// this.$store.state.kycInProgressModalModel.kycStatus = 'disabled';
6167
// this.$store.state.kycInProgressModalModel.kycStatus = 'denied|100000|0';
6268
// this.$store.state.kycInProgressModalModel.kycStatus = 'denied|100000|100000';
6369
// this.$store.state.kycInProgressModalModel.kycStatus = 'manualReview|5oclock';
@@ -66,7 +72,6 @@ export default {
6672
const address = store.state.kycInProgressModalModel.address;
6773
this.handleKycStatus(store.state.kycInProgressModalModel.kycStatus);
6874
if (this.kycStatus === 'kycneeded') {
69-
this.title = 'Proof of Non-US Resident';
7075
const webv = document.createElement('webview');
7176
webv.addEventListener('did-navigate', (event) => {
7277
const url = event.url;
@@ -116,7 +121,11 @@ export default {
116121
handleKycStatus(kycStatus) {
117122
console.log(`kycStatus: ${kycStatus}`);
118123
this.kycStatus = kycStatus;
119-
const content = document.getElementById('aph-kyc-modal').getElementsByClassName('content')[0];
124+
const modal = document.getElementById('aph-kyc-modal');
125+
if (modal == null) return;
126+
const content = modal.getElementsByClassName('content')[0];
127+
if (content == null) return;
128+
120129
if (kycStatus.startsWith('accepted')) {
121130
content.style.height = '300px'; // `${Math.floor(340 / 14)}rem`;
122131
this.title = 'KYC Accepted (whitelisting in progress...)';
@@ -138,6 +147,13 @@ export default {
138147
} else {
139148
this.kycStatus = 'kycneeded';
140149
}
150+
} else if (kycStatus.startsWith('disabled')) {
151+
content.style.height = '300px';
152+
this.title = 'KYC Temporarily Disabled';
153+
}
154+
155+
if (this.kycStatus === 'kycneeded') {
156+
this.title = 'Proof of Non-US Resident';
141157
}
142158
},
143159
getHeader() {

0 commit comments

Comments
 (0)