@stokr/components-library 0.9.7 → 0.9.8

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,6 +195,16 @@ 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
+ }
198
208
  setoptionalTasks(optionalTasks);
199
209
  }
200
210
  };
@@ -242,6 +252,40 @@ var getVerifyIdentityChecklist = function getVerifyIdentityChecklist(isFromAllow
242
252
  hasLink: hasLink
243
253
  };
244
254
  };
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
+ };
245
289
  UserChecklist.propTypes = {
246
290
  user: _propTypes.default.object.isRequired,
247
291
  additionalTasks: _propTypes.default.any,
@@ -206,6 +206,13 @@ 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
+ },
209
216
  liquid_network: {
210
217
  GAID: 'GAvqQSMd9PpUqkPzKN2CvRzMihBYJ',
211
218
  dt: '2021-10-12T07:59:24.256Z',
@@ -33,7 +33,24 @@ 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.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.Powered, null, /*#__PURE__*/_react.default.createElement("div", null, "Partner of", ' ', /*#__PURE__*/_react.default.createElement("a", {
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.")))));
37
54
  };
38
55
  exports.Footer = Footer;
39
56
  Footer.propTypes = {
@@ -100,15 +100,9 @@ var footerGroups = [{
100
100
  items: [{
101
101
  name: 'linkedin',
102
102
  url: 'https://www.linkedin.com/company/stokr/'
103
- }, {
104
- name: 'instagram',
105
- url: 'https://www.instagram.com/stokr_media'
106
103
  }, {
107
104
  name: 'twitter',
108
105
  url: 'https://twitter.com/stokr_io'
109
- }, {
110
- name: 'facebook',
111
- url: 'https://web.facebook.com/STOKR-696540447399052/'
112
106
  }, {
113
107
  name: 'telegram',
114
108
  url: 'https://t.me/joinchat/G2o5yBCe7FiYvv1YiZhNZg'
@@ -8,18 +8,21 @@ var _react = _interopRequireDefault(require("react"));
8
8
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9
9
  var SocialTwitter = function SocialTwitter() {
10
10
  return /*#__PURE__*/_react.default.createElement("svg", {
11
- version: "1.1",
12
11
  xmlns: "http://www.w3.org/2000/svg",
13
- viewBox: "0 0 12 12",
14
- width: "12",
15
- height: "12",
16
- style: {
17
- width: '12px',
18
- height: '12px'
19
- }
12
+ version: "1.1",
13
+ width: "256",
14
+ height: "256",
15
+ viewBox: "0 0 256 256"
16
+ }, /*#__PURE__*/_react.default.createElement("defs", null), /*#__PURE__*/_react.default.createElement("g", {
17
+ // style="stroke: none; stroke-width: 0; stroke-dasharray: none; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 10; fill: none; fill-rule: nonzero; opacity: 1;"
18
+ transform: "translate(1.4065934065934016 1.4065934065934016) scale(2.81 2.81)"
20
19
  }, /*#__PURE__*/_react.default.createElement("path", {
21
- d: "m10.64 5.5733a1.4695 1.4695 0 0 0 1.3104-0.72537 2.2884 2.2884 0 0 1-1.4142 0.14695c-0.020592-0.093596-0.043055-0.17783-0.065518-0.25645a2.5552 2.5552 0 0 0-2.5477-1.8588c0.093596-0.034631 0.18719-0.067389 0.28079-0.093596 0.12542-0.042118 0.86109-0.1535 0.74877-0.39591-0.093596-0.2134-0.9968 0.16099-1.1662 0.20966 0.21808-0.080493 0.58779-0.21527 0.6271-0.45488a1.842 1.842 0 0 0-0.93596 0.41463 0.58779 0.58779 0 0 0 0.17783-0.33227 5.3481 5.3481 0 0 0-1.8775 2.7049 4.4383 4.4383 0 0 0-0.91069-0.68138 24.58 24.58 0 0 0-3.0765-1.2636 1.5191 1.5191 0 0 0 1.0296 1.4039 2.6843 2.6843 0 0 0-0.73848 0.082365c0.10296 0.50168 0.4371 0.91537 1.344 1.1147a1.1391 1.1391 0 0 0-0.82271 0.30325 1.4189 1.4189 0 0 0 1.477 0.67577c-0.92099 0.37439-0.37439 1.0558 0.37439 0.95375a3.347 3.347 0 0 1-4.4543 0.11325c3.0213 3.8375 9.589 2.2716 10.568-1.4283a1.8869 1.8869 0 0 0 1.432-0.50448 3.1186 3.1186 0 0 1-1.36-0.12823z"
22
- }));
20
+ d: "M 0.219 2.882 l 34.748 46.461 L 0 87.118 h 7.87 l 30.614 -33.073 l 24.735 33.073 H 90 L 53.297 38.043 L 85.844 2.882 h -7.87 L 49.781 33.341 L 27.001 2.882 H 0.219 z M 11.793 8.679 h 12.303 L 78.425 81.32 H 66.122 L 11.793 8.679 z"
21
+ //style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 10; fill: rgb(0,0,0); fill-rule: nonzero; opacity: 1;"
22
+ ,
23
+ transform: " matrix(1 0 0 1 0 0) ",
24
+ "stroke-linecap": "round"
25
+ })));
23
26
  };
24
27
  var _default = SocialTwitter;
25
28
  exports.default = _default;
@@ -103,13 +103,17 @@ var RegisterTaxId = function RegisterTaxId(_ref) {
103
103
  var onRefreshClick = function onRefreshClick() {
104
104
  setError(false);
105
105
  };
106
- return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, showBackButton && /*#__PURE__*/_react.default.createElement(_ComponentWrapper.default, {
106
+ return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, showBackButton ? /*#__PURE__*/_react.default.createElement(_ComponentWrapper.default, {
107
107
  noPaddingVertical: true
108
108
  }, /*#__PURE__*/_react.default.createElement(_TextLink.TextButton, {
109
109
  onClick: function onClick() {
110
110
  return navigate('/verify-identity');
111
111
  }
112
- }, "Back to verify identity")), /*#__PURE__*/_react.default.createElement(_ComponentWrapper.default, null, /*#__PURE__*/_react.default.createElement(_Text.default, null, /*#__PURE__*/_react.default.createElement(LiquidDescription, null, /*#__PURE__*/_react.default.createElement("h1", null, "Provide your tax id"), /*#__PURE__*/_react.default.createElement("p", null, "Some offers require you to provide your Tax ID before being able to invest in.")))), taxId && /*#__PURE__*/_react.default.createElement(_ComponentWrapper.default, {
112
+ }, "Back to verify identity")) : /*#__PURE__*/_react.default.createElement("div", {
113
+ style: {
114
+ height: 14
115
+ }
116
+ }), /*#__PURE__*/_react.default.createElement(_ComponentWrapper.default, null, /*#__PURE__*/_react.default.createElement(_Text.default, null, /*#__PURE__*/_react.default.createElement("h1", null, "Provide your tax id"), /*#__PURE__*/_react.default.createElement("p", null, "Some offers require you to provide your Tax ID before being able to invest in."))), taxId && /*#__PURE__*/_react.default.createElement(_ComponentWrapper.default, {
113
117
  noPaddingTop: true
114
118
  }, /*#__PURE__*/_react.default.createElement(_Text.default, null, /*#__PURE__*/_react.default.createElement("p", null, "You have successfully submitted your Tax ID information."))), !isUpdatingUser && !error && !taxId && /*#__PURE__*/_react.default.createElement(_ComponentWrapper.default, {
115
119
  noPaddingVertical: true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stokr/components-library",
3
- "version": "0.9.7",
3
+ "version": "0.9.8",
4
4
  "description": "STOKR - Components Library",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",