@stokr/components-library 0.9.6 → 0.9.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -195,16 +195,6 @@ var UserChecklist = function UserChecklist(props) {
|
|
|
195
195
|
openModal: _ToDoList.ToDoModal.TAX_ID,
|
|
196
196
|
tooltip: "Some offers require you to provide your Tax ID before being able to invest.\n\nYour tax information will be disclosed to the Luxembourg tax authorities annually for tax compliance purposes required by the Common Reporting Standard implementation."
|
|
197
197
|
}];
|
|
198
|
-
if (countryObj !== null && countryObj !== void 0 && countryObj.SEPA) {
|
|
199
|
-
//add an item at first place
|
|
200
|
-
//only if the user is from a SEPA country
|
|
201
|
-
optionalTasks.splice(0, 0, {
|
|
202
|
-
title: 'Invest in Euro',
|
|
203
|
-
message: getInvestInEuroChecklist(isFromAllowedCountry, user).message,
|
|
204
|
-
state: getInvestInEuroChecklist(isFromAllowedCountry, user).state,
|
|
205
|
-
link: isFromAllowedCountry && kyc_status && kyc_status !== 'Draft' && "".concat(platformURL, "/verify-identity")
|
|
206
|
-
});
|
|
207
|
-
}
|
|
208
198
|
setoptionalTasks(optionalTasks);
|
|
209
199
|
}
|
|
210
200
|
};
|
|
@@ -252,40 +242,6 @@ var getVerifyIdentityChecklist = function getVerifyIdentityChecklist(isFromAllow
|
|
|
252
242
|
hasLink: hasLink
|
|
253
243
|
};
|
|
254
244
|
};
|
|
255
|
-
var getInvestInEuroChecklist = function getInvestInEuroChecklist(isFromAllowedCountry, user) {
|
|
256
|
-
var _KYCDocuments$status, _KYCDocuments$status2, _KYCDocuments$status3;
|
|
257
|
-
var kyc_status = user.kyc_status,
|
|
258
|
-
KYCDocuments = user.KYCDocuments,
|
|
259
|
-
lemonwayWallet = user.lemonwayWallet;
|
|
260
|
-
var message;
|
|
261
|
-
var state;
|
|
262
|
-
if (!isFromAllowedCountry) {
|
|
263
|
-
message = 'Sorry, you are living in a country where this is not available';
|
|
264
|
-
state = _ToDoList.ToDoTaskState.NOT_AVAILABLE;
|
|
265
|
-
} else if ((lemonwayWallet === null || lemonwayWallet === void 0 ? void 0 : lemonwayWallet.STATUS) === '6') {
|
|
266
|
-
message = 'Your document is verified';
|
|
267
|
-
state = _ToDoList.ToDoTaskState.APPROVED;
|
|
268
|
-
} else if ((lemonwayWallet === null || lemonwayWallet === void 0 ? void 0 : lemonwayWallet.STATUS) === '3') {
|
|
269
|
-
message = 'There seems to be a problem. The compliance team will contact you';
|
|
270
|
-
state = _ToDoList.ToDoTaskState.DENIED;
|
|
271
|
-
} else if (!kyc_status || kyc_status.toUpperCase() === 'DRAFT') {
|
|
272
|
-
message = 'In order to pay in EURO you need to verify your identity and provide a second identity document';
|
|
273
|
-
state = _ToDoList.ToDoTaskState.NOT_AVAILABLE;
|
|
274
|
-
} else if (!KYCDocuments || (kyc_status === null || kyc_status === void 0 ? void 0 : kyc_status.toUpperCase()) === 'ACCEPTED') {
|
|
275
|
-
message = 'In order to pay in EURO you need to provide a second identity document';
|
|
276
|
-
state = _ToDoList.ToDoTaskState.SKIPPED;
|
|
277
|
-
} else if (((_KYCDocuments$status = KYCDocuments.status) === null || _KYCDocuments$status === void 0 ? void 0 : _KYCDocuments$status.toUpperCase()) === 'PENDING' || ((_KYCDocuments$status2 = KYCDocuments.status) === null || _KYCDocuments$status2 === void 0 ? void 0 : _KYCDocuments$status2.toUpperCase()) === 'APPROVED' && !lemonwayWallet || (lemonwayWallet === null || lemonwayWallet === void 0 ? void 0 : lemonwayWallet.STATUS) === '5') {
|
|
278
|
-
message = 'The Lemonway team is having a look. This usually takes up to 24 hours';
|
|
279
|
-
state = _ToDoList.ToDoTaskState.IN_PROGRESS;
|
|
280
|
-
} else if (((_KYCDocuments$status3 = KYCDocuments.status) === null || _KYCDocuments$status3 === void 0 ? void 0 : _KYCDocuments$status3.toUpperCase()) === 'REJECTED') {
|
|
281
|
-
message = 'It seems there was a problem with your second identity document. Please try again or contact the compliance team at compliance@stokr.io';
|
|
282
|
-
state = _ToDoList.ToDoTaskState.DENIED;
|
|
283
|
-
}
|
|
284
|
-
return {
|
|
285
|
-
message: message,
|
|
286
|
-
state: state
|
|
287
|
-
};
|
|
288
|
-
};
|
|
289
245
|
UserChecklist.propTypes = {
|
|
290
246
|
user: _propTypes.default.object.isRequired,
|
|
291
247
|
additionalTasks: _propTypes.default.any,
|
|
@@ -206,13 +206,6 @@ var userStaging = {
|
|
|
206
206
|
address: '0x8f02dde046cdfecccf068a39a7c3844e49f5e33d'
|
|
207
207
|
}],
|
|
208
208
|
is_risk_questionnaire_finished: true,
|
|
209
|
-
lemonwayWallet: {
|
|
210
|
-
ID: '5e3571e222143e0016516946',
|
|
211
|
-
STATUS: '6',
|
|
212
|
-
poa_fileid: '42',
|
|
213
|
-
passport_fileid: '24',
|
|
214
|
-
dt: '2020-02-05T13:33:04.705Z'
|
|
215
|
-
},
|
|
216
209
|
liquid_network: {
|
|
217
210
|
GAID: 'GAvqQSMd9PpUqkPzKN2CvRzMihBYJ',
|
|
218
211
|
dt: '2021-10-12T07:59:24.256Z',
|
|
@@ -33,24 +33,7 @@ var Footer = function Footer(_ref) {
|
|
|
33
33
|
textDecoration: 'underline',
|
|
34
34
|
color: 'white'
|
|
35
35
|
}
|
|
36
|
-
}, "registered"), ' ', "with the Luxembourg regulator CSSF.")), /*#__PURE__*/_react.default.createElement(_Footer.PoweredWrap, null, /*#__PURE__*/_react.default.createElement(_Footer.
|
|
37
|
-
href: "http://www.lemonway.com/",
|
|
38
|
-
title: "Lemon Way - Payment Institution for the new economy",
|
|
39
|
-
target: "_blank",
|
|
40
|
-
rel: "noopener noreferrer",
|
|
41
|
-
style: {
|
|
42
|
-
color: 'white',
|
|
43
|
-
textDecoration: 'none'
|
|
44
|
-
}
|
|
45
|
-
}, /*#__PURE__*/_react.default.createElement("img", {
|
|
46
|
-
style: {
|
|
47
|
-
verticalAlign: 'middle'
|
|
48
|
-
},
|
|
49
|
-
src: lemonwayLogo,
|
|
50
|
-
height: 20,
|
|
51
|
-
width: 20,
|
|
52
|
-
alt: "Lemonway logo"
|
|
53
|
-
}), ' ', "LEMONWAY"), ". A European payment institution ", /*#__PURE__*/_react.default.createElement("br", null), " accredited in France by the ACPR (CIB 16568).")), /*#__PURE__*/_react.default.createElement(_Footer.Copyright, null, "Copyright ", new Date().getFullYear(), " STOKR. All rights reserved.")))));
|
|
36
|
+
}, "registered"), ' ', "with the Luxembourg regulator CSSF.")), /*#__PURE__*/_react.default.createElement(_Footer.PoweredWrap, null, /*#__PURE__*/_react.default.createElement(_Footer.Copyright, null, "Copyright ", new Date().getFullYear(), " STOKR. All rights reserved.")))));
|
|
54
37
|
};
|
|
55
38
|
exports.Footer = Footer;
|
|
56
39
|
Footer.propTypes = {
|
package/dist/index.js
CHANGED
|
@@ -1036,4 +1036,15 @@ Object.keys(_Layout).forEach(function (key) {
|
|
|
1036
1036
|
return _Layout[key];
|
|
1037
1037
|
}
|
|
1038
1038
|
});
|
|
1039
|
+
});
|
|
1040
|
+
var _km_ify = require("./utils/km_ify");
|
|
1041
|
+
Object.keys(_km_ify).forEach(function (key) {
|
|
1042
|
+
if (key === "default" || key === "__esModule") return;
|
|
1043
|
+
if (key in exports && exports[key] === _km_ify[key]) return;
|
|
1044
|
+
Object.defineProperty(exports, key, {
|
|
1045
|
+
enumerable: true,
|
|
1046
|
+
get: function get() {
|
|
1047
|
+
return _km_ify[key];
|
|
1048
|
+
}
|
|
1049
|
+
});
|
|
1039
1050
|
});
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.km_ify = void 0;
|
|
7
|
+
var km_ify = function km_ify(input) {
|
|
8
|
+
if (input >= 1000000) {
|
|
9
|
+
input /= 1000000;
|
|
10
|
+
if (input % 10 !== 0) {
|
|
11
|
+
input = truncateDecimals(input, 1);
|
|
12
|
+
}
|
|
13
|
+
input += 'M';
|
|
14
|
+
}
|
|
15
|
+
if (input >= 1000) {
|
|
16
|
+
input /= 1000;
|
|
17
|
+
if (input % 10 !== 0) {
|
|
18
|
+
input = truncateDecimals(input, 1);
|
|
19
|
+
}
|
|
20
|
+
input += 'K';
|
|
21
|
+
}
|
|
22
|
+
return input;
|
|
23
|
+
};
|
|
24
|
+
exports.km_ify = km_ify;
|
|
25
|
+
var truncateDecimals = function truncateDecimals(number, digits) {
|
|
26
|
+
var re = new RegExp('(\\d+\\.\\d{' + digits + '})(\\d)'),
|
|
27
|
+
m = number.toString().match(re);
|
|
28
|
+
return m ? parseFloat(m[1]) : number.valueOf();
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
//how the number should appear - SKR-870
|
|
32
|
+
// 1-999 just the number
|
|
33
|
+
// 1000 1K
|
|
34
|
+
// 1001 - <1100 1K
|
|
35
|
+
// 1100 - <1200 1.1K
|
|
36
|
+
// 999900 -999999 999.9K
|
|
37
|
+
// 1000000 - <1100000 1M
|
|
38
|
+
// 1100000 -<1200000 1.1M
|