@stokr/components-library 0.5.3 → 0.5.5
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.
- package/build/asset-manifest.json +9 -0
- package/build/favicon.ico +0 -0
- package/build/index.html +1 -0
- package/build/logo192.png +0 -0
- package/build/logo512.png +0 -0
- package/build/manifest.json +25 -0
- package/build/robots.txt +3 -0
- package/build/static/js/main.31d6cfe0.js +0 -0
- package/dist/AccountBalance/AccountBalance.js +43 -0
- package/dist/AccountBalance/AccountBalance.stories.js +75 -0
- package/dist/AccountBalance/AccountBalance.styles.js +38 -0
- package/dist/AdminDashboard/Table/Table.js +120 -0
- package/dist/AdminDashboard/Table/Table.styles.js +111 -0
- package/dist/AgreementItem/AgreementItem.js +38 -0
- package/dist/AgreementItem/AgreementItem.stories.js +98 -0
- package/dist/AgreementItem/AgreementItem.styles.js +31 -0
- package/dist/AnalyticGraphs/Analytic.js +528 -0
- package/dist/AnalyticGraphs/Analytic.styles.js +49 -0
- package/dist/BackButton/BackButton.js +22 -0
- package/dist/BackButton/BackButton.stories.js +24 -0
- package/dist/BackButton/BackButton.styles.js +110 -0
- package/dist/Background/Background.js +34 -0
- package/dist/Background/Background.stories.js +50 -0
- package/dist/Background/Background.styles.js +113 -0
- package/dist/BarChart/BarChart.js +258 -0
- package/dist/BarChart/BarChart.stories.js +46 -0
- package/dist/BarChart/BarChart.styles.js +93 -0
- package/dist/BarChartLegend/BarChartLegend.js +74 -0
- package/dist/BarChartLegend/BarChartLegend.styles.js +26 -0
- package/dist/BasicTable/BasicTable.js +20 -0
- package/dist/BasicTable/BasicTable.stories.js +51 -0
- package/dist/BasicTable/BasicTable.styles.js +64 -0
- package/dist/Button/Button.stories.js +63 -0
- package/dist/Button/Button.styles.js +180 -0
- package/dist/ButtonContainer/ButtonContainer.styles.js +25 -0
- package/dist/CapitalRaisedSummary/CapitalRaisedSummery.stories.js +35 -0
- package/dist/CapitalRaisedSummary/CaptialRaisedSummary.js +23 -0
- package/dist/CapitalRaisedSummary/CaptialRaisedSummary.styles.js +36 -0
- package/dist/ChartBox/ChartBox.js +34 -0
- package/dist/ChartBox/ChartBox.stories.js +9 -0
- package/dist/ChartBox/ChartBox.styles.js +50 -0
- package/dist/ChartBox/ChartBoxDistribution.js +20 -0
- package/dist/ChartBox/ChartBoxDistribution.stories.js +10 -0
- package/dist/ChartLegend/ChartLegend.js +37 -0
- package/dist/ChartLegend/ChartLegend.stories.js +74 -0
- package/dist/ChartLegend/ChartLegend.styles.js +67 -0
- package/dist/Checkbox/Checkbox.js +108 -0
- package/dist/Checkbox/Checkbox.stories.js +82 -0
- package/dist/Checkbox/Checkbox.styles.js +123 -0
- package/dist/Checklist/UserChecklist.js +247 -0
- package/dist/Checklist/UserChecklist.stories.js +115 -0
- package/dist/ComponentScroll/ComponentScroll.js +99 -0
- package/dist/ComponentScroll/ComponentScroll.stories.js +92 -0
- package/dist/ComponentScroll/ComponentScroll.styles.js +104 -0
- package/dist/ComponentWrapper/ComponentWrapper.styles.js +128 -0
- package/dist/CryptoAddress/ComponentWrap.js +24 -0
- package/dist/CryptoAddress/CryptoAddress.js +124 -0
- package/dist/CryptoAddress/CryptoAddress.stories.js +163 -0
- package/dist/CryptoAddress/CryptoAddress.styles.js +399 -0
- package/dist/CryptoAddress/RadioWrap.js +36 -0
- package/dist/CryptoAddressDetails/CryptoAddressDetails.js +42 -0
- package/dist/CryptoAddressDetails/CryptoAddressDetails.stories.js +65 -0
- package/dist/CryptoAddressDetails/CryptoAddressDetails.styles.js +114 -0
- package/dist/CryptoAddressWrapper/CryptoAddressWrapper.js +30 -0
- package/dist/CryptoAddressWrapper/CryptoAddressWrapper.styles.js +98 -0
- package/dist/DonutChart/DonutChart.js +137 -0
- package/dist/DonutChart/DonutChart.stories.js +39 -0
- package/dist/DonutChart/DonutChart.styles.js +101 -0
- package/dist/DoubleButton/DoubleButton.styles.js +25 -0
- package/dist/ErrorMessage/ErrorMessage.styles.js +9 -0
- package/dist/FAQ/FAQ.js +40 -0
- package/dist/FAQ/FAQ.stories.js +63 -0
- package/dist/FAQ/FAQ.styles.js +69 -0
- package/dist/Footer/Footer.js +54 -0
- package/dist/Footer/Footer.stories.js +41 -0
- package/dist/Footer/Footer.styles.js +230 -0
- package/dist/Footer/FooterLayout.js +114 -0
- package/dist/Footer/FooterLayout.stories.js +20 -0
- package/dist/Footer/FooterMenu.js +83 -0
- package/dist/Footer/FooterMenu.stories.js +110 -0
- package/dist/Footer/FooterMenu.styles.js +274 -0
- package/dist/Footer/index.js +4 -0
- package/dist/{03f9f978feb2b015b6812ba10f689967.png → Footer/lemonway.png} +0 -0
- package/dist/Footer/sicos-logo.svg +1 -0
- package/dist/ForgotPasswordModal/ForgotPasswordModal.js +89 -0
- package/dist/ForgotPasswordModal/ForgotPasswordModal.stories.js +31 -0
- package/dist/Form/Form.js +38 -0
- package/dist/Form/Form.stories.js +24 -0
- package/dist/Form/Form.styles.js +66 -0
- package/dist/FullscreenCard/FullscreenCard.styles.js +36 -0
- package/dist/Grid/Grid.styles.js +109 -0
- package/dist/Header/Header.js +369 -0
- package/dist/Header/Header.stories.js +172 -0
- package/dist/Header/Header.styles.js +493 -0
- package/dist/Icon/Icon.style.js +75 -0
- package/dist/InfoIcon/InfoIcon.js +40 -0
- package/dist/InfoIcon/InfoIcon.stories.js +40 -0
- package/dist/InfoIcon/InfoIcon.styles.js +42 -0
- package/dist/InfoPanel/InfoPanel.js +115 -0
- package/dist/Input/DatePickerInput.js +64 -0
- package/dist/Input/DatePickerInput.stories.js +80 -0
- package/dist/Input/DatePickerInput.styles.js +67 -0
- package/dist/Input/Input.js +86 -0
- package/dist/Input/Input.stories.js +134 -0
- package/dist/Input/Input.styles.js +126 -0
- package/dist/Input/InputPassword.js +122 -0
- package/dist/Input/InputPassword.stories.js +72 -0
- package/dist/Input/InputPassword.styles.js +139 -0
- package/dist/Input/RangeInput.js +46 -0
- package/dist/Input/RangeInput.stories.js +48 -0
- package/dist/Input/RangeInput.styles.js +125 -0
- package/dist/Input/Select.js +130 -0
- package/dist/Input/Select.stories.js +129 -0
- package/dist/Input/Select.styles.js +143 -0
- package/dist/InvestCalculator/InvestCalculator.js +353 -0
- package/dist/InvestCalculator/InvestCalculator.stories.js +129 -0
- package/dist/InvestCalculator/InvestCalculator.styles.js +78 -0
- package/dist/InvestmentStat/InvestmentStat.js +33 -0
- package/dist/InvestmentStat/InvestmentStat.stories.js +44 -0
- package/dist/InvestmentStat/InvestmentStat.styles.js +53 -0
- package/dist/KYCFlow/BasicInfo.js +396 -0
- package/dist/KYCFlow/Confirmation.js +37 -0
- package/dist/KYCFlow/DocumentFileUpload.js +240 -0
- package/dist/KYCFlow/DocumentScan.js +66 -0
- package/dist/KYCFlow/DocumentScanUpload.js +228 -0
- package/dist/KYCFlow/DocumentSelect.js +101 -0
- package/dist/KYCFlow/DocumentSuccess.js +54 -0
- package/dist/KYCFlow/DocumentUpload.js +44 -0
- package/dist/KYCFlow/DocumentVerificationType.js +114 -0
- package/dist/KYCFlow/FaceScan.js +45 -0
- package/dist/KYCFlow/FaceScanRecognition.js +52 -0
- package/dist/KYCFlow/FaceScanSuccess.js +47 -0
- package/dist/KYCFlow/Terms.js +99 -0
- package/dist/KYCFlow/_styles.js +284 -0
- package/dist/KYCFlow/index.js +14 -0
- package/dist/KYCSelectBox/KYCSelectBox.styles.js +62 -0
- package/dist/LatestUpdate/LatestUpdate.js +35 -0
- package/dist/LatestUpdate/LatestUpdate.stories.js +51 -0
- package/dist/LatestUpdate/LatestUpdate.styles.js +77 -0
- package/dist/Layout/Layout-func-no-work.js +67 -0
- package/dist/Layout/Layout.js +68 -0
- package/dist/Layout/Layout.stories.js +55 -0
- package/dist/LearnMoreCarousel/LearnMoreCarousel.js +39 -0
- package/dist/LearnMoreCarousel/LearnMoreCarousel.stories.js +58 -0
- package/dist/LearnMoreCarousel/LearnMoreCarousel.styles.js +205 -0
- package/dist/LearnMorePage/LearnMore.js +199 -0
- package/dist/LearnMorePage/LearnMore.shared.styles.js +49 -0
- package/dist/LearnMorePage/LearnMore.stories.js +41 -0
- package/dist/LearnMorePage/LearnMore.styles.js +250 -0
- package/dist/LearnMorePage/LearnMoreExampleObject.js +102 -0
- package/dist/LearnMorePage/LearnMoreItem.js +59 -0
- package/dist/LearnMorePage/LearnMoreItem.stories.js +54 -0
- package/dist/LearnMorePage/LearnMoreItem.styles.js +218 -0
- package/dist/LearnMoreSection/LearnMore.js +144 -0
- package/dist/LearnMoreSection/LearnMore.stories.js +23 -0
- package/dist/LearnMoreSection/LearnMore.styles.js +134 -0
- package/dist/LearnMoreSection/LearnMoreItem.js +39 -0
- package/dist/LearnMoreSection/LearnMoreItem.stories.js +52 -0
- package/dist/LearnMoreSection/LearnMoreItem.styles.js +54 -0
- package/dist/LoginModal/LoginModal.js +125 -0
- package/dist/MainMenu/DynamicMainMenu.js +41 -0
- package/dist/MainMenu/MainMenu.js +207 -0
- package/dist/MainMenu/MainMenu.styles.js +361 -0
- package/dist/MatomoConnect/Matomo.js +221 -0
- package/dist/MatomoConnect/Matomo_fuckup.js +185 -0
- package/dist/MenuNav/MenuNav.styles.js +88 -0
- package/dist/Modal/Modal.js +71 -0
- package/dist/Modal/Modal.stories.js +67 -0
- package/dist/Modal/Modal.styles.js +407 -0
- package/dist/MultiProgressBar/MultiProgressBar.js +33 -0
- package/dist/MultiProgressBar/MultiProgressBar.stories.js +61 -0
- package/dist/MultiProgressBar/MultiProgressBar.styles.js +92 -0
- package/dist/Newsletter/Newsletter.js +106 -0
- package/dist/Newsletter/Newsletter.stories.js +8 -0
- package/dist/Newsletter/Newsletter.styles.js +173 -0
- package/dist/NotificationContext/NotificationContext.js +126 -0
- package/dist/NotificationContext/NotificationContext.stories.js +32 -0
- package/dist/NotificationCounter/NotificationCounter.styles.js +23 -0
- package/dist/Number/Number.js +25 -0
- package/dist/Number/Number.stories.js +18 -0
- package/dist/Number/Number.styles.js +21 -0
- package/dist/PageTransition/PageTransition.js +42 -0
- package/dist/Process/Process.stories.js +34 -0
- package/dist/Process/Process.styles.js +87 -0
- package/dist/ProfileBadge/ProfileBadge.js +46 -0
- package/dist/ProfileBadge/ProfileBadge.stories.js +37 -0
- package/dist/ProfileBadge/ProfileBadge.styles.js +47 -0
- package/dist/ProfileBox/ProfileBox.js +29 -0
- package/dist/ProfileBox/ProfileBox.stories.js +27 -0
- package/dist/ProfileBox/ProfileBox.styles.js +60 -0
- package/dist/ProfileHeader/ProfileHeader-CLb4.js +401 -0
- package/dist/ProfileHeader/ProfileHeader.js +268 -0
- package/dist/ProfileHeader/ProfileHeader.styles.js +114 -0
- package/dist/ProfileStat/ProfileStat.js +32 -0
- package/dist/ProfileStat/ProfileStat.stories.js +58 -0
- package/dist/ProfileStat/ProfileStat.styles.js +80 -0
- package/dist/ProofOfAddress/ProofOfAddress.styles.js +76 -0
- package/dist/ROI/ROI.js +261 -0
- package/dist/ROI/ROI.styles.js +71 -0
- package/dist/ROI/ROIChart.js +348 -0
- package/dist/ROI/ROIChart.styles.js +98 -0
- package/dist/ROI/ROIModal.js +74 -0
- package/dist/ROI/ROIScenarioBox.js +46 -0
- package/dist/ROI/ROIScenarioBox.styles.js +131 -0
- package/dist/Radio/Radio.js +58 -0
- package/dist/Radio/Radio.stories.js +65 -0
- package/dist/Radio/Radio.styles.js +93 -0
- package/dist/RefreshButton/RefreshButton.js +14 -0
- package/dist/RefreshButton/RefreshButton.stories.js +31 -0
- package/dist/RefreshButton/RefreshButton.styles.js +57 -0
- package/dist/RegisterAlgorand/AlgoAddressName.js +103 -0
- package/dist/RegisterAlgorand/AlgoAdressSelect.js +274 -0
- package/dist/RegisterAlgorand/AlgoConnectWallet.js +37 -0
- package/dist/RegisterAlgorand/AlgoSuccess.js +28 -0
- package/dist/RegisterAlgorand/Algorand.stories.js +63 -0
- package/dist/RegisterAlgorand/ChooseWallet.js +77 -0
- package/dist/RegisterAlgorand/SelectProject.js +77 -0
- package/dist/RegisterAlgorand/_styles.js +30 -0
- package/dist/RegisterAlgorand/flow.js +243 -0
- package/dist/RegisterAlgorand/flowWithMemo.js +244 -0
- package/dist/RegisterAlgorand/index.js +7 -0
- package/dist/RegisterConfirmModal/RegisterConfirmModal.js +30 -0
- package/dist/RegisterConfirmModal/RegisterConfirmModal.stories.js +22 -0
- package/dist/RegisterConfirmModal/RegisterConfirmModal.styles.js +19 -0
- package/dist/RegisterEthereum/EthAddressLedger.js +151 -0
- package/dist/RegisterEthereum/EthAddressMetamask.js +165 -0
- package/dist/RegisterEthereum/EthAddressName.js +101 -0
- package/dist/RegisterEthereum/EthConnectLedger.js +117 -0
- package/dist/RegisterEthereum/EthConnectMetamask.js +25 -0
- package/dist/RegisterEthereum/EthFinish.js +32 -0
- package/dist/RegisterEthereum/EthIntro.js +77 -0
- package/dist/RegisterEthereum/_styles.js +30 -0
- package/dist/RegisterEthereum/index.js +9 -0
- package/dist/RegisterLiquidSteps/RegisterLiquidSteps.js +75 -0
- package/dist/RegisterLiquidSteps/RegisterLiquidSteps.stories.js +65 -0
- package/dist/RegisterLiquidSteps/RegisterLiquidSteps.styles.js +69 -0
- package/dist/RegisterLiquidSteps/assets/nav_green.svg +31 -0
- package/dist/RegisterLiquidSteps/assets/video.mp4 +0 -0
- package/dist/RegisterLiquidSteps/assets/videothumbnail.jpg +0 -0
- package/dist/RegisterLiquidSteps/complete.js +29 -0
- package/dist/RegisterLiquidSteps/flow.js +141 -0
- package/dist/RegisterLiquidSteps/index.js +29 -0
- package/dist/RegisterLiquidSteps/register-liquid.js +197 -0
- package/dist/RegisterModal/RegisterModal.js +143 -0
- package/dist/RegisterModal/RegisterModal.stories.js +35 -0
- package/dist/RequestDataBox/RequestDataBox.js +21 -0
- package/dist/RequestDataBox/RequestDataBox.stories.js +29 -0
- package/dist/RequestDataBox/RequestDataBox.styles.js +40 -0
- package/dist/RiskQuestionnaire/RiskQuestionnaireContext.js +111 -0
- package/dist/RiskQuestionnaire/_styles.js +6 -0
- package/dist/SEO/SEO.js +63 -0
- package/dist/SEO/SEO.stories.js +53 -0
- package/dist/SectionTitle/SectionTitle.styles.js +23 -0
- package/dist/SideLine/SideLine.js +4 -0
- package/dist/SideLine/SideLine.stories.js +20 -0
- package/dist/SideLine/SideLine.styles.js +29 -0
- package/dist/SigningSubflow/SignSubAddressMetamask.js +105 -0
- package/dist/SigningSubflow/SignSubConnectLedger.js +114 -0
- package/dist/SigningSubflow/SignSubConnectMetamask.js +101 -0
- package/dist/SigningSubflow/SignSubIntro.js +45 -0
- package/dist/SigningSubflow/SignSubSendLedger.js +114 -0
- package/dist/SigningSubflow/SignSubSendMetamask.js +53 -0
- package/dist/SigningSubflow/SignSubTransactionLedger.js +125 -0
- package/dist/SigningSubflow/SignSubTransactionMetamask.js +130 -0
- package/dist/SigningSubflow/_styles.js +59 -0
- package/dist/SigningSubflow/index.js +9 -0
- package/dist/Slider/Slider.js +43 -0
- package/dist/Slider/Slider.stories.js +63 -0
- package/dist/Slider/Slider.styles.js +115 -0
- package/dist/SpanButton/SpanButton.styles.js +14 -0
- package/dist/StatusBadge/StatusBadge.styles.js +16 -0
- package/dist/StepController/StepController.js +73 -0
- package/dist/StepController/StepController.stories.js +52 -0
- package/dist/StepController/StepController.styles.js +27 -0
- package/dist/StepController/StepControllerContext.js +61 -0
- package/dist/StepController/StepControllerProgress.js +28 -0
- package/dist/StepController/StepControllerProgress.stories.js +41 -0
- package/dist/StepsProgress/StepsProgress.js +95 -0
- package/dist/StepsProgress/StepsProgress.stories.js +23 -0
- package/dist/StepsProgress/StepsProgress.styles.js +97 -0
- package/dist/StokrLoader/StokrLoader.js +60 -0
- package/dist/StokrLoader/media.js +22 -0
- package/dist/StokrLoader/stokr_loader_white_400x400.gif +0 -0
- package/dist/SvgIcons/AdminBadgeSvg.js +16 -0
- package/dist/SvgIcons/CameraSvg.js +26 -0
- package/dist/SvgIcons/CapsLockSvg.js +21 -0
- package/dist/SvgIcons/DocumentBackSvg.js +25 -0
- package/dist/SvgIcons/DocumentSmallSvg.js +51 -0
- package/dist/SvgIcons/DocumentSvg.js +28 -0
- package/dist/SvgIcons/Early.js +14 -0
- package/dist/SvgIcons/EthSvg.js +30 -0
- package/dist/SvgIcons/EurSvg.js +16 -0
- package/dist/SvgIcons/FaceScanIconSvg.js +21 -0
- package/dist/SvgIcons/FourSvg.js +11 -0
- package/dist/SvgIcons/Glassess.js +19 -0
- package/dist/SvgIcons/Icons_Badge.png +0 -0
- package/dist/SvgIcons/LogoSvg.js +14 -0
- package/dist/SvgIcons/OneSvg.js +13 -0
- package/dist/SvgIcons/PassportSvg.js +46 -0
- package/dist/SvgIcons/RefreshSvg.js +17 -0
- package/dist/SvgIcons/SocialFacebook.js +15 -0
- package/dist/SvgIcons/SocialInstagram.js +15 -0
- package/dist/SvgIcons/SocialLinkedIn.js +15 -0
- package/dist/SvgIcons/SocialMedium.js +15 -0
- package/dist/SvgIcons/SocialReddit.js +15 -0
- package/dist/SvgIcons/SocialTelegram.js +15 -0
- package/dist/SvgIcons/SocialTwitter.js +15 -0
- package/dist/SvgIcons/SocialYoutube.js +15 -0
- package/dist/SvgIcons/ThreeSvg.js +10 -0
- package/dist/SvgIcons/TwoSidedDocumentSvg.js +72 -0
- package/dist/SvgIcons/TwoSvg.js +13 -0
- package/dist/SvgIcons/UpdateDefaultSvg.js +19 -0
- package/dist/SvgIcons/UpdateHardSvg.js +15 -0
- package/dist/SvgIcons/UpdateSoftSvg.js +17 -0
- package/dist/SvgIcons/UploadSvg.js +24 -0
- package/dist/SvgIcons/VerifiedBadge.js +13 -0
- package/dist/SvgIcons/index.js +32 -0
- package/dist/Switch/Switch.js +45 -0
- package/dist/Switch/Switch.stories.js +73 -0
- package/dist/Switch/Switch.styles.js +105 -0
- package/dist/Tabs/Tabs.js +48 -0
- package/dist/Tabs/Tabs.stories.js +28 -0
- package/dist/Tabs/Tabs.styles.js +11 -0
- package/dist/TabsNav/TabNav.js +21 -0
- package/dist/TabsNav/TabNav.stories.js +32 -0
- package/dist/TabsNav/TabsNav.js +23 -0
- package/dist/TabsNav/TabsNav.stories.js +25 -0
- package/dist/TabsNav/TabsNav.styles.js +80 -0
- package/dist/TeamOverview/TeamOverview.js +69 -0
- package/dist/TeamOverview/TeamOverview.stories.js +68 -0
- package/dist/TeamOverview/TeamOverview.styles.js +152 -0
- package/dist/Text/Headline.js +34 -0
- package/dist/Text/Headline.stories.js +40 -0
- package/dist/Text/StyledText.js +30 -0
- package/dist/Text/Text.stories.js +59 -0
- package/dist/Text/Text.styles.js +166 -0
- package/dist/TextLink/TextLink.styles.js +50 -0
- package/dist/ToDoList/ToDoList.js +172 -0
- package/dist/ToDoList/ToDoList.stories.js +123 -0
- package/dist/ToDoList/ToDoList.styles.js +115 -0
- package/dist/ToDoList/ToDoListTask.js +96 -0
- package/dist/ToDoList/ToDoListTask.stories.js +60 -0
- package/dist/ToDoList/ToDoListTask.styles.js +104 -0
- package/dist/TransactionDetails/TransactionDetails.js +27 -0
- package/dist/TransactionDetails/TransactionDetails.stories.js +47 -0
- package/dist/TransactionDetails/TransactionDetails.styles.js +31 -0
- package/dist/TransactionInfo/TransactionInfo.js +48 -0
- package/dist/TransactionInfo/TransactionInfo.stories.js +53 -0
- package/dist/TransactionInfo/TransactionInfo.styles.js +64 -0
- package/dist/TwoFactorModal/TwoFactorModal.js +84 -0
- package/dist/breakdown/Breakdown.js +124 -0
- package/dist/breakdown/index.js +2 -0
- package/dist/context/Auth.js +133 -0
- package/dist/context/AuthContext.js +154 -0
- package/dist/icons/Arrow.js +62 -0
- package/dist/icons/Arrow.stories.js +37 -0
- package/dist/icons/ArrowSimple.js +51 -0
- package/dist/icons/ArrowSimple.stories.js +41 -0
- package/dist/icons/Check.js +29 -0
- package/dist/icons/Check.stories.js +14 -0
- package/dist/icons/Facebook.js +15 -0
- package/dist/icons/Facebook.stories.js +15 -0
- package/dist/icons/Info.js +41 -0
- package/dist/icons/Info.stories.js +8 -0
- package/dist/icons/Instagram.js +15 -0
- package/dist/icons/Instagram.stories.js +15 -0
- package/dist/icons/LinkIcon.js +23 -0
- package/dist/icons/LinkIcon.stories.js +15 -0
- package/dist/icons/LinkedIn.js +29 -0
- package/dist/icons/LinkedIn.stories.js +8 -0
- package/dist/icons/Medium.js +28 -0
- package/dist/icons/Medium.stories.js +8 -0
- package/dist/icons/Reddit.js +18 -0
- package/dist/icons/Reddit.stories.js +15 -0
- package/dist/icons/Share.js +48 -0
- package/dist/icons/Share.stories.js +8 -0
- package/dist/icons/Telegram.js +28 -0
- package/dist/icons/Telegram.stories.js +8 -0
- package/dist/icons/Twitter.js +15 -0
- package/dist/icons/Twitter.stories.js +15 -0
- package/dist/icons/X.js +15 -0
- package/dist/icons/X.stories.js +8 -0
- package/dist/icons/Youtube.js +15 -0
- package/dist/icons/Youtube.stories.js +15 -0
- package/dist/icons/index.js +15 -0
- package/dist/index.js +177 -1
- package/dist/renderToBody/index.js +2 -0
- package/dist/renderToBody/renderToBody.js +26 -0
- package/dist/taxId/TaxId.stories.js +31 -0
- package/dist/taxId/complete.js +21 -0
- package/dist/taxId/flow.js +31 -0
- package/dist/taxId/index.js +4 -0
- package/dist/taxId/register-taxid.js +156 -0
- package/dist/video/Video.js +274 -0
- package/dist/video/Video.stories.js +45 -0
- package/dist/video/img/play-btn.svg +1 -0
- package/dist/video/index.js +2 -0
- package/package.json +128 -133
- package/public/favicon.ico +0 -0
- package/public/index.html +43 -0
- package/public/logo192.png +0 -0
- package/public/logo512.png +0 -0
- package/public/manifest.json +25 -0
- package/public/robots.txt +3 -0
- package/dist/07233f511246c9825a0d58e5ab2641f3.svg +0 -47
- package/dist/08418fc6c324f51f7e56.svg +0 -1
- package/dist/14aa35d4e84aebef77cf00b421fc393a.gif +0 -0
- package/dist/179ef2df02cb0b68c9fd.woff2 +0 -0
- package/dist/21e493d43617de76dbc7.woff2 +0 -0
- package/dist/2640959b1f9381cde047.eot +0 -0
- package/dist/2ba2db4ff86a2663686a100e75b50ba9.png +0 -0
- package/dist/311956ded96d3fd2813d.woff2 +0 -0
- package/dist/39f5961b2d3eb4aa5bf5.woff +0 -0
- package/dist/3caa0d4f9b7d58668066.woff2 +0 -0
- package/dist/4a510354f2f82b59fced805a8e3fe2bf.svg +0 -1
- package/dist/4c3c428d0ce82f840710.woff +0 -0
- package/dist/4e528d6445ca1974c313.woff +0 -0
- package/dist/55053cc0a8e6482eca64.ttf +0 -0
- package/dist/643c37f102b41f7f90c3.woff2 +0 -0
- package/dist/76dd0ed9c3f137513fd4.svg +0 -1
- package/dist/81f3ef07b7952e249da1.woff +0 -0
- package/dist/98b7d3182f652f021bc3.ttf +0 -0
- package/dist/9bea22b57dc165ed4382.ttf +0 -0
- package/dist/9ec738fbb66068dc1ca7.woff +0 -0
- package/dist/a1d7666a48f976227722.ttf +0 -0
- package/dist/a750292d6a0b5a760679.woff +0 -0
- package/dist/b85a961d44cc55c58050cbf7c53dd505.png +0 -0
- package/dist/bcb6531cf820152b7538.ttf +0 -0
- package/dist/c6a4bc1bd034d6303053.woff +0 -0
- package/dist/cbfc24090ef8bacab132.woff2 +0 -0
- package/dist/d2b1865643b98c0e8b54.ttf +0 -0
- package/dist/d97d7385fe8771611848.ttf +0 -0
- package/dist/index.js.LICENSE.txt +0 -1
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import React, { PureComponent } from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { Collapse } from 'react-collapse';
|
|
4
|
+
import Text from 'components/Text/Text.styles';
|
|
5
|
+
import Button from 'components/Button/Button.styles';
|
|
6
|
+
import TextLink from 'components/TextLink/TextLink.styles';
|
|
7
|
+
import CryptoAddress from 'components/CryptoAddress/CryptoAddress';
|
|
8
|
+
import FAQ from 'components/FAQ/FAQ';
|
|
9
|
+
import SectionTitle from 'components/SectionTitle/SectionTitle.styles';
|
|
10
|
+
import ComponentWrapper from 'components/ComponentWrapper/ComponentWrapper.styles';
|
|
11
|
+
import ComponentScroll from 'components/ComponentScroll/ComponentScroll';
|
|
12
|
+
import CryptoAddressWrapper from 'components/CryptoAddressWrapper/CryptoAddressWrapper';
|
|
13
|
+
import { ModalWrapper } from 'components/Modal/Modal.styles';
|
|
14
|
+
import { getLedgerAddresses } from 'api/StokrWeb3';
|
|
15
|
+
import Config from 'api/StokrWeb3Config';
|
|
16
|
+
class EthAddressLedger extends PureComponent {
|
|
17
|
+
state = {
|
|
18
|
+
selectedAddress: null,
|
|
19
|
+
showAll: false,
|
|
20
|
+
addressPool: undefined
|
|
21
|
+
};
|
|
22
|
+
async componentDidMount() {
|
|
23
|
+
this.setState({
|
|
24
|
+
addressPool: await getLedgerAddresses()
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
onAddressChange = e => {
|
|
28
|
+
this.setState({
|
|
29
|
+
selectedAddress: e.target.value
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
onRegisterClick = () => {
|
|
33
|
+
const {
|
|
34
|
+
addressPool,
|
|
35
|
+
selectedAddress
|
|
36
|
+
} = this.state;
|
|
37
|
+
const {
|
|
38
|
+
changeStep,
|
|
39
|
+
setAddressToRegister
|
|
40
|
+
} = this.props;
|
|
41
|
+
for (let i in addressPool) {
|
|
42
|
+
if (addressPool[i].radioId === selectedAddress) {
|
|
43
|
+
setAddressToRegister(addressPool[i].address);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
selectedAddress && changeStep && changeStep();
|
|
47
|
+
};
|
|
48
|
+
toggleShowAll = () => {
|
|
49
|
+
const {
|
|
50
|
+
showAll
|
|
51
|
+
} = this.state;
|
|
52
|
+
this.setState({
|
|
53
|
+
showAll: !showAll
|
|
54
|
+
});
|
|
55
|
+
};
|
|
56
|
+
render() {
|
|
57
|
+
const {
|
|
58
|
+
selectedAddress,
|
|
59
|
+
showAll,
|
|
60
|
+
addressPool
|
|
61
|
+
} = this.state;
|
|
62
|
+
return /*#__PURE__*/React.createElement(ModalWrapper, null, /*#__PURE__*/React.createElement(ComponentWrapper, null, /*#__PURE__*/React.createElement(SectionTitle, null, "Register Ethereum address")), /*#__PURE__*/React.createElement(ComponentScroll, null, /*#__PURE__*/React.createElement(ComponentWrapper, {
|
|
63
|
+
noPaddingTop: true
|
|
64
|
+
}, /*#__PURE__*/React.createElement(Text, null, /*#__PURE__*/React.createElement("h3", null, "Select an ethereum address"), /*#__PURE__*/React.createElement("p", null, 'On this address you will receive your security tokens. You can also use it to purchase security tokens using Ether, Gemini or Tether. '))), addressPool ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ComponentWrapper, {
|
|
65
|
+
noPadding: true
|
|
66
|
+
}, addressPool.slice(Config.ledger.showAccountSlice[0], Config.ledger.showAccountSlice[1]).map((account, i) => /*#__PURE__*/React.createElement(CryptoAddress, {
|
|
67
|
+
key: account + i,
|
|
68
|
+
title: account.title,
|
|
69
|
+
address: account.address,
|
|
70
|
+
data: {
|
|
71
|
+
value: account.ether,
|
|
72
|
+
unit: 'ETH',
|
|
73
|
+
eqValue: account.euro,
|
|
74
|
+
eqUnit: '€'
|
|
75
|
+
},
|
|
76
|
+
radio: {
|
|
77
|
+
id: account.id,
|
|
78
|
+
name: 'address',
|
|
79
|
+
value: account.radioId,
|
|
80
|
+
checked: selectedAddress === account.radioId,
|
|
81
|
+
onChange: this.onAddressChange,
|
|
82
|
+
onBlur: () => {}
|
|
83
|
+
},
|
|
84
|
+
wrapped: true,
|
|
85
|
+
borderTop: true
|
|
86
|
+
}))), /*#__PURE__*/React.createElement(Collapse, {
|
|
87
|
+
isOpened: showAll
|
|
88
|
+
}, /*#__PURE__*/React.createElement(ComponentWrapper, {
|
|
89
|
+
noPadding: true
|
|
90
|
+
}, addressPool.slice(Config.ledger.showAdditionalSlice[0], Config.ledger.showAdditionalSlice[1]).map((account, i) => /*#__PURE__*/React.createElement(CryptoAddress, {
|
|
91
|
+
key: account + i,
|
|
92
|
+
title: account.title,
|
|
93
|
+
address: account.address,
|
|
94
|
+
data: {
|
|
95
|
+
value: account.ether,
|
|
96
|
+
unit: 'ETH',
|
|
97
|
+
eqValue: account.euro,
|
|
98
|
+
eqUnit: '€'
|
|
99
|
+
},
|
|
100
|
+
radio: {
|
|
101
|
+
id: account.id,
|
|
102
|
+
name: 'address',
|
|
103
|
+
value: account.radioId,
|
|
104
|
+
checked: selectedAddress === account.radioId,
|
|
105
|
+
onChange: this.onAddressChange,
|
|
106
|
+
onBlur: () => {}
|
|
107
|
+
},
|
|
108
|
+
wrapped: true,
|
|
109
|
+
borderTop: true
|
|
110
|
+
})))), /*#__PURE__*/React.createElement(ComponentWrapper, {
|
|
111
|
+
noPaddingHorizontal: true,
|
|
112
|
+
noPaddingBottom: true,
|
|
113
|
+
borderTop: true
|
|
114
|
+
}, /*#__PURE__*/React.createElement(ComponentWrapper, {
|
|
115
|
+
noPaddingBottom: true,
|
|
116
|
+
center: true
|
|
117
|
+
}, /*#__PURE__*/React.createElement(TextLink, {
|
|
118
|
+
as: "button",
|
|
119
|
+
onClick: this.toggleShowAll
|
|
120
|
+
}, showAll ? 'view less' : 'view more')), /*#__PURE__*/React.createElement(ComponentWrapper, {
|
|
121
|
+
center: true
|
|
122
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
123
|
+
minWidth: "240px",
|
|
124
|
+
onClick: this.onRegisterClick,
|
|
125
|
+
disabled: selectedAddress === null
|
|
126
|
+
}, "Register selected address")))) : /*#__PURE__*/React.createElement(ComponentWrapper, {
|
|
127
|
+
borderTop: true,
|
|
128
|
+
borderBottom: true,
|
|
129
|
+
center: true
|
|
130
|
+
}, /*#__PURE__*/React.createElement(CryptoAddressWrapper, {
|
|
131
|
+
refresh: 'Please wait while we connect to your Ledger'
|
|
132
|
+
}, /*#__PURE__*/React.createElement(CryptoAddress, {
|
|
133
|
+
title: "ethereum address",
|
|
134
|
+
address: '',
|
|
135
|
+
data: {
|
|
136
|
+
value: ''
|
|
137
|
+
}
|
|
138
|
+
}))), /*#__PURE__*/React.createElement(ComponentWrapper, {
|
|
139
|
+
noPaddingBottom: true
|
|
140
|
+
}, /*#__PURE__*/React.createElement(SectionTitle, null, "Frequently Asked Questions")), /*#__PURE__*/React.createElement(ComponentWrapper, null, /*#__PURE__*/React.createElement(FAQ, {
|
|
141
|
+
items: [{
|
|
142
|
+
title: 'Which address should I choose?',
|
|
143
|
+
content: "If you're planning to use the address to purchase tokens, choose one with sufficient funds or that you plan to top up. For your security and privacy, it's considered best practice to use more than one address for your crypto investments."
|
|
144
|
+
}]
|
|
145
|
+
}))));
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
EthAddressLedger.propTypes = {
|
|
149
|
+
changeStep: PropTypes.func.isRequired
|
|
150
|
+
};
|
|
151
|
+
export default EthAddressLedger;
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import React, { PureComponent } from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { EthInfo } from 'components/RegisterEthereum';
|
|
4
|
+
import Text from 'components/Text/Text.styles';
|
|
5
|
+
import Button from 'components/Button/Button.styles';
|
|
6
|
+
import RefreshButton from 'components/RefreshButton/RefreshButton';
|
|
7
|
+
import CryptoAddress from 'components/CryptoAddress/CryptoAddress';
|
|
8
|
+
import CryptoAddressWrapper from 'components/CryptoAddressWrapper/CryptoAddressWrapper';
|
|
9
|
+
import FAQ from 'components/FAQ/FAQ';
|
|
10
|
+
import SectionTitle from 'components/SectionTitle/SectionTitle.styles';
|
|
11
|
+
import ComponentWrapper from 'components/ComponentWrapper/ComponentWrapper.styles';
|
|
12
|
+
import ComponentScroll from 'components/ComponentScroll/ComponentScroll';
|
|
13
|
+
import { ModalWrapper } from 'components/Modal/Modal.styles';
|
|
14
|
+
import { getBalance, getBalanceInEther, getEtherInEuro, isMetamaskInstalled, getMetamaskAddress } from 'api/StokrWeb3';
|
|
15
|
+
class EthAddressMetamask extends PureComponent {
|
|
16
|
+
state = {
|
|
17
|
+
correct: false,
|
|
18
|
+
refresh: false,
|
|
19
|
+
failed: false,
|
|
20
|
+
address: '0x0000000000000000000000000000000000000000',
|
|
21
|
+
data: {
|
|
22
|
+
value: '0',
|
|
23
|
+
unit: 'ETH',
|
|
24
|
+
eqValue: '0',
|
|
25
|
+
eqUnit: '€'
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
async getBalanceData() {
|
|
29
|
+
const mmAddress = await getMetamaskAddress();
|
|
30
|
+
const wei = await getBalance(mmAddress);
|
|
31
|
+
const ether = getBalanceInEther(wei, 4);
|
|
32
|
+
const euro = await getEtherInEuro(ether, 2);
|
|
33
|
+
const data = {
|
|
34
|
+
value: ether,
|
|
35
|
+
unit: 'ETH',
|
|
36
|
+
eqValue: euro,
|
|
37
|
+
eqUnit: '€'
|
|
38
|
+
};
|
|
39
|
+
this.setState({
|
|
40
|
+
data: data
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
async initMetamask() {
|
|
44
|
+
if (isMetamaskInstalled()) {
|
|
45
|
+
try {
|
|
46
|
+
const address = await getMetamaskAddress();
|
|
47
|
+
if (address) {
|
|
48
|
+
await this.getBalanceData();
|
|
49
|
+
this.setState({
|
|
50
|
+
failed: false,
|
|
51
|
+
correct: true,
|
|
52
|
+
address: address
|
|
53
|
+
});
|
|
54
|
+
window.ethereum.on('accountsChanged', async accounts => {
|
|
55
|
+
const address = await getMetamaskAddress();
|
|
56
|
+
this.setState({
|
|
57
|
+
address: address
|
|
58
|
+
});
|
|
59
|
+
await this.getBalanceData();
|
|
60
|
+
this.setState({
|
|
61
|
+
refresh: true
|
|
62
|
+
}, () => {
|
|
63
|
+
this.setStateDelayed({
|
|
64
|
+
refresh: false
|
|
65
|
+
}, 2000);
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
} catch (error) {
|
|
70
|
+
console.log(error);
|
|
71
|
+
this.setState({
|
|
72
|
+
failed: true,
|
|
73
|
+
correct: false
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
async componentDidMount() {
|
|
79
|
+
await this.initMetamask();
|
|
80
|
+
}
|
|
81
|
+
setStateDelayed = (newState, time) => {
|
|
82
|
+
this.timeout = setTimeout(() => {
|
|
83
|
+
this.setState(newState);
|
|
84
|
+
}, time);
|
|
85
|
+
};
|
|
86
|
+
onRefreshClick = async () => {
|
|
87
|
+
await this.initMetamask();
|
|
88
|
+
this.setState({
|
|
89
|
+
//correct: false,
|
|
90
|
+
refresh: true
|
|
91
|
+
//failed: false
|
|
92
|
+
}, () => {
|
|
93
|
+
this.setStateDelayed({
|
|
94
|
+
refresh: false
|
|
95
|
+
}, 2000);
|
|
96
|
+
});
|
|
97
|
+
};
|
|
98
|
+
onRegisterClick = () => {
|
|
99
|
+
const {
|
|
100
|
+
correct,
|
|
101
|
+
address
|
|
102
|
+
} = this.state;
|
|
103
|
+
const {
|
|
104
|
+
changeStep,
|
|
105
|
+
setAddressToRegister
|
|
106
|
+
} = this.props;
|
|
107
|
+
setAddressToRegister(address);
|
|
108
|
+
correct && changeStep();
|
|
109
|
+
};
|
|
110
|
+
render() {
|
|
111
|
+
const {
|
|
112
|
+
correct,
|
|
113
|
+
refresh,
|
|
114
|
+
failed,
|
|
115
|
+
address,
|
|
116
|
+
data
|
|
117
|
+
} = this.state;
|
|
118
|
+
return /*#__PURE__*/React.createElement(ModalWrapper, null, /*#__PURE__*/React.createElement(ComponentWrapper, null, /*#__PURE__*/React.createElement(SectionTitle, null, "Register Ethereum address")), /*#__PURE__*/React.createElement(ComponentScroll, null, /*#__PURE__*/React.createElement(ComponentWrapper, {
|
|
119
|
+
noPaddingVertical: true
|
|
120
|
+
}, /*#__PURE__*/React.createElement(Text, null, /*#__PURE__*/React.createElement("h3", null, "Select an ethereum address"), /*#__PURE__*/React.createElement("p", null, 'On this address you will receive your security tokens. You can also use it to purchase security tokens using Ether, Gemini or Tether.'))), /*#__PURE__*/React.createElement(ComponentWrapper, null, /*#__PURE__*/React.createElement(SectionTitle, null, "YOUR CURRENT ADDRESS")), /*#__PURE__*/React.createElement(ComponentWrapper, {
|
|
121
|
+
borderTop: true,
|
|
122
|
+
borderBottom: true
|
|
123
|
+
}, correct ? /*#__PURE__*/React.createElement(CryptoAddressWrapper, {
|
|
124
|
+
refresh: refresh ? 'Refreshing' : '',
|
|
125
|
+
failed: failed ? 'NO DICE. PLEASE CHECK METAMASK IS CONNECTED, THEN HIT REFRESH.' : ''
|
|
126
|
+
}, /*#__PURE__*/React.createElement(CryptoAddress, {
|
|
127
|
+
title: "ethereum address",
|
|
128
|
+
address: address,
|
|
129
|
+
data: data
|
|
130
|
+
})) : /*#__PURE__*/React.createElement(CryptoAddressWrapper, {
|
|
131
|
+
refresh: !correct && !failed ? "We're fetching your registered address from your MetaMask." : '',
|
|
132
|
+
failed: failed ? "Our interface couldn't connect to MetaMask because you need to give permission to do so. Try again?" : ''
|
|
133
|
+
}, /*#__PURE__*/React.createElement(CryptoAddress, {
|
|
134
|
+
title: "ethereum address",
|
|
135
|
+
address: address,
|
|
136
|
+
data: data
|
|
137
|
+
}))), /*#__PURE__*/React.createElement(ComponentWrapper, {
|
|
138
|
+
noPaddingBottom: true
|
|
139
|
+
}, /*#__PURE__*/React.createElement(EthInfo, {
|
|
140
|
+
center: true
|
|
141
|
+
}, 'To use a different MetaMask address, select one from the MetaMask extension on your browser and press the refresh button below.')), /*#__PURE__*/React.createElement(ComponentWrapper, {
|
|
142
|
+
center: true
|
|
143
|
+
}, /*#__PURE__*/React.createElement(RefreshButton, {
|
|
144
|
+
onClick: this.onRefreshClick
|
|
145
|
+
}, "TRY AGAIN")), /*#__PURE__*/React.createElement(ComponentWrapper, {
|
|
146
|
+
noPaddingTop: true,
|
|
147
|
+
center: true
|
|
148
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
149
|
+
minWidth: "300px",
|
|
150
|
+
onClick: this.onRegisterClick,
|
|
151
|
+
disabled: !correct
|
|
152
|
+
}, "REGISTER THIS ADDRESS")), /*#__PURE__*/React.createElement(ComponentWrapper, {
|
|
153
|
+
noPaddingBottom: true
|
|
154
|
+
}, /*#__PURE__*/React.createElement(SectionTitle, null, "Frequently Asked Questions")), /*#__PURE__*/React.createElement(ComponentWrapper, null, /*#__PURE__*/React.createElement(FAQ, {
|
|
155
|
+
items: [{
|
|
156
|
+
title: 'Which address should I choose?',
|
|
157
|
+
content: "If you're planning to use the address to purchase tokens, choose one with sufficient funds or that you plan to top up. For your security and privacy, it's considered best practice to use more than one address for your crypto investments."
|
|
158
|
+
}]
|
|
159
|
+
}))));
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
EthAddressMetamask.propTypes = {
|
|
163
|
+
changeStep: PropTypes.func.isRequired
|
|
164
|
+
};
|
|
165
|
+
export default EthAddressMetamask;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import React, { PureComponent } from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { Formik } from 'formik';
|
|
4
|
+
import * as Yup from 'yup';
|
|
5
|
+
import Text from 'components/Text/Text.styles';
|
|
6
|
+
import Button from 'components/Button/Button.styles';
|
|
7
|
+
import Form, { FormField, FormError } from 'components/Form/Form';
|
|
8
|
+
import Input from 'components/Input/Input';
|
|
9
|
+
import FAQ from 'components/FAQ/FAQ';
|
|
10
|
+
import SectionTitle from 'components/SectionTitle/SectionTitle.styles';
|
|
11
|
+
import ComponentWrapper from 'components/ComponentWrapper/ComponentWrapper.styles';
|
|
12
|
+
import ComponentScroll from 'components/ComponentScroll/ComponentScroll';
|
|
13
|
+
import { ModalWrapper } from 'components/Modal/Modal.styles';
|
|
14
|
+
class EthAddressName extends PureComponent {
|
|
15
|
+
initialValues = {
|
|
16
|
+
name: ''
|
|
17
|
+
};
|
|
18
|
+
validationSchema = Yup.object().shape({
|
|
19
|
+
name: Yup.string().required('Address name is required')
|
|
20
|
+
});
|
|
21
|
+
onSubmit = () => {
|
|
22
|
+
const {
|
|
23
|
+
changeStep
|
|
24
|
+
} = this.props;
|
|
25
|
+
changeStep();
|
|
26
|
+
};
|
|
27
|
+
render() {
|
|
28
|
+
const {
|
|
29
|
+
error,
|
|
30
|
+
isUpdatingUser
|
|
31
|
+
} = this.props;
|
|
32
|
+
return /*#__PURE__*/React.createElement(ModalWrapper, null, /*#__PURE__*/React.createElement(ComponentWrapper, null, /*#__PURE__*/React.createElement(SectionTitle, null, "Register Ethereum address")), /*#__PURE__*/React.createElement(ComponentScroll, null, /*#__PURE__*/React.createElement(ComponentWrapper, {
|
|
33
|
+
noPaddingVertical: true
|
|
34
|
+
}, /*#__PURE__*/React.createElement(Text, null, /*#__PURE__*/React.createElement("h3", null, "Name your ethereum address"), /*#__PURE__*/React.createElement("p", null, "Give your address a name that reflects what it will store. Remember Satoshi's recommendation to spread your crypto investments over different addresses. "))), /*#__PURE__*/React.createElement(ComponentWrapper, {
|
|
35
|
+
noPaddingBottom: true
|
|
36
|
+
}, /*#__PURE__*/React.createElement(FAQ, {
|
|
37
|
+
items: [{
|
|
38
|
+
title: 'Why should I name my Ethereum address?',
|
|
39
|
+
content: "If you're following best practice and spreading your crypto investments over different addresses, a name makes it easier to manage your portfolio."
|
|
40
|
+
}]
|
|
41
|
+
})), /*#__PURE__*/React.createElement(ComponentWrapper, null, /*#__PURE__*/React.createElement(Formik, {
|
|
42
|
+
initialValues: this.initialValues,
|
|
43
|
+
validationSchema: this.validationSchema,
|
|
44
|
+
onSubmit: this.onSubmit
|
|
45
|
+
}, ({
|
|
46
|
+
values,
|
|
47
|
+
errors,
|
|
48
|
+
touched,
|
|
49
|
+
handleBlur,
|
|
50
|
+
setFieldValue,
|
|
51
|
+
setFieldTouched
|
|
52
|
+
}) => {
|
|
53
|
+
const onChangeWithTouch = e => {
|
|
54
|
+
const {
|
|
55
|
+
setNameToRegister
|
|
56
|
+
} = this.props;
|
|
57
|
+
const field = e.target;
|
|
58
|
+
setFieldValue(field.name, field.value, false);
|
|
59
|
+
setFieldTouched(field.name);
|
|
60
|
+
setNameToRegister(field.value);
|
|
61
|
+
};
|
|
62
|
+
const submitDisabled = !touched.name || !!errors.name || isUpdatingUser;
|
|
63
|
+
return /*#__PURE__*/React.createElement(Form, null, /*#__PURE__*/React.createElement(ComponentWrapper, {
|
|
64
|
+
noPadding: true
|
|
65
|
+
}, /*#__PURE__*/React.createElement(FormField, null, /*#__PURE__*/React.createElement(Input, {
|
|
66
|
+
id: "register-eth-name",
|
|
67
|
+
name: "name",
|
|
68
|
+
label: "Address name",
|
|
69
|
+
value: values.name,
|
|
70
|
+
onChange: onChangeWithTouch,
|
|
71
|
+
onBlur: handleBlur,
|
|
72
|
+
error: !!errors.name,
|
|
73
|
+
touched: !!touched.name
|
|
74
|
+
}), /*#__PURE__*/React.createElement(FormError, {
|
|
75
|
+
show: errors.name && touched.name
|
|
76
|
+
}, errors.name))), /*#__PURE__*/React.createElement(ComponentWrapper, {
|
|
77
|
+
noPaddingHorizontal: true,
|
|
78
|
+
noPaddingBottom: true,
|
|
79
|
+
center: true
|
|
80
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
81
|
+
type: "submit",
|
|
82
|
+
minWidth: "240px",
|
|
83
|
+
disabled: submitDisabled
|
|
84
|
+
}, "Use this name"), /*#__PURE__*/React.createElement(FormError, {
|
|
85
|
+
withTopSpacing: true,
|
|
86
|
+
show: error
|
|
87
|
+
}, error), "`"));
|
|
88
|
+
})), /*#__PURE__*/React.createElement(ComponentWrapper, {
|
|
89
|
+
noPaddingBottom: true
|
|
90
|
+
}, /*#__PURE__*/React.createElement(SectionTitle, null, "Frequently Asked Questions")), /*#__PURE__*/React.createElement(ComponentWrapper, null, /*#__PURE__*/React.createElement(FAQ, {
|
|
91
|
+
items: [{
|
|
92
|
+
title: 'Why should I name my Ethereum address?',
|
|
93
|
+
content: "If you're following best practice and spreading your crypto investments over different addresses, a name makes it easier to manage your portfolio."
|
|
94
|
+
}]
|
|
95
|
+
}))));
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
EthAddressName.propTypes = {
|
|
99
|
+
changeStep: PropTypes.func.isRequired
|
|
100
|
+
};
|
|
101
|
+
export default EthAddressName;
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import React, { PureComponent } from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { Collapse } from 'react-collapse';
|
|
4
|
+
import Text from 'components/Text/Text.styles';
|
|
5
|
+
import Process from 'components/Process/Process.styles';
|
|
6
|
+
import Button from 'components/Button/Button.styles';
|
|
7
|
+
// import FAQ from 'components/FAQ/FAQ'
|
|
8
|
+
import SectionTitle from 'components/SectionTitle/SectionTitle.styles';
|
|
9
|
+
import ComponentWrapper from 'components/ComponentWrapper/ComponentWrapper.styles';
|
|
10
|
+
import ComponentScroll from 'components/ComponentScroll/ComponentScroll';
|
|
11
|
+
import { ModalWrapper } from 'components/Modal/Modal.styles';
|
|
12
|
+
import { isLedgerAvailable } from 'api/StokrWeb3';
|
|
13
|
+
const processState = {
|
|
14
|
+
DEFAULT: '',
|
|
15
|
+
WAITING: 'waiting',
|
|
16
|
+
SUCCESS: 'success',
|
|
17
|
+
FAILED: 'failed'
|
|
18
|
+
};
|
|
19
|
+
class EthConnectLedger extends PureComponent {
|
|
20
|
+
state = {
|
|
21
|
+
showRetry: false,
|
|
22
|
+
showContinue: false,
|
|
23
|
+
firstProcess: processState.WAITING,
|
|
24
|
+
secondProcess: processState.DEFAULT
|
|
25
|
+
};
|
|
26
|
+
async detectLedger() {
|
|
27
|
+
if (await isLedgerAvailable()) {
|
|
28
|
+
this.setState({
|
|
29
|
+
firstProcess: processState.SUCCESS,
|
|
30
|
+
secondProcess: processState.SUCCESS,
|
|
31
|
+
showRetry: false,
|
|
32
|
+
showContinue: true
|
|
33
|
+
});
|
|
34
|
+
} else {
|
|
35
|
+
this.setState({
|
|
36
|
+
firstProcess: processState.FAILED,
|
|
37
|
+
secondProcess: processState.FAILED,
|
|
38
|
+
showRetry: true,
|
|
39
|
+
showContinue: false
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
async componentDidMount() {
|
|
44
|
+
await this.detectLedger();
|
|
45
|
+
}
|
|
46
|
+
componentDidUpdate(prevState) {
|
|
47
|
+
const {
|
|
48
|
+
firstProcess: prevFirstProcess,
|
|
49
|
+
secondProcess: prevSecondProcess
|
|
50
|
+
} = prevState;
|
|
51
|
+
const {
|
|
52
|
+
firstProcess,
|
|
53
|
+
secondProcess
|
|
54
|
+
} = this.state;
|
|
55
|
+
if (firstProcess !== prevFirstProcess || secondProcess !== prevSecondProcess) {
|
|
56
|
+
clearTimeout(this.timeout);
|
|
57
|
+
if (firstProcess === processState.SUCCESS && secondProcess === processState.WAITING) {
|
|
58
|
+
this.setStateDelayed({
|
|
59
|
+
showContinue: true,
|
|
60
|
+
secondProcess: processState.SUCCESS
|
|
61
|
+
}, 2000);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
onRetryClick = () => {
|
|
66
|
+
this.setState({
|
|
67
|
+
showRetry: false,
|
|
68
|
+
firstProcess: processState.WAITING,
|
|
69
|
+
secondProcess: processState.DEFAULT
|
|
70
|
+
});
|
|
71
|
+
this.detectLedger();
|
|
72
|
+
};
|
|
73
|
+
onContinueClick = () => {
|
|
74
|
+
const {
|
|
75
|
+
changeStep
|
|
76
|
+
} = this.props;
|
|
77
|
+
changeStep();
|
|
78
|
+
};
|
|
79
|
+
setStateDelayed = (newState, time) => {
|
|
80
|
+
this.timeout = setTimeout(() => {
|
|
81
|
+
this.setState(newState);
|
|
82
|
+
}, time);
|
|
83
|
+
};
|
|
84
|
+
getProcessProps = stateName => stateName ? {
|
|
85
|
+
[stateName]: true
|
|
86
|
+
} : {};
|
|
87
|
+
render() {
|
|
88
|
+
const {
|
|
89
|
+
showRetry,
|
|
90
|
+
showContinue,
|
|
91
|
+
firstProcess
|
|
92
|
+
} = this.state;
|
|
93
|
+
return /*#__PURE__*/React.createElement(ModalWrapper, null, /*#__PURE__*/React.createElement(ComponentWrapper, null, /*#__PURE__*/React.createElement(SectionTitle, null, "Register Ethereum address")), /*#__PURE__*/React.createElement(ComponentScroll, null, /*#__PURE__*/React.createElement(ComponentWrapper, {
|
|
94
|
+
noPaddingVertical: true
|
|
95
|
+
}, /*#__PURE__*/React.createElement(Text, null, /*#__PURE__*/React.createElement("h3", null, "PLUG IN YOUR DEVICE"), /*#__PURE__*/React.createElement("p", null, "Psst... using a different hardware wallet? No dice. At the moment, we only support Ledger, but we're working on it."))), /*#__PURE__*/React.createElement(ComponentWrapper, {
|
|
96
|
+
noPaddingBottom: true
|
|
97
|
+
}, /*#__PURE__*/React.createElement(Process, this.getProcessProps(firstProcess), "1. PLUG IN YOUR DEVICE", /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("p", null, "Grab that USB cable and get your computer and cryptovault connected."), "2. ENTER YOUR PIN", /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("p", null, "Use the buttons on your device to enter and confirm your pin."), "3. SELECT ETHEREUM APP", /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("p", null, "Navigate to the Ethereum app on your Ledger and select it by pressing both buttons at once."))), /*#__PURE__*/React.createElement(Collapse, {
|
|
98
|
+
isOpened: showRetry
|
|
99
|
+
}, /*#__PURE__*/React.createElement(ComponentWrapper, {
|
|
100
|
+
center: true
|
|
101
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
102
|
+
minWidth: "240px",
|
|
103
|
+
onClick: this.onRetryClick
|
|
104
|
+
}, "Retry"))), /*#__PURE__*/React.createElement(Collapse, {
|
|
105
|
+
isOpened: showContinue
|
|
106
|
+
}, /*#__PURE__*/React.createElement(ComponentWrapper, {
|
|
107
|
+
center: true
|
|
108
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
109
|
+
minWidth: "240px",
|
|
110
|
+
onClick: this.onContinueClick
|
|
111
|
+
}, "Next")))));
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
EthConnectLedger.propTypes = {
|
|
115
|
+
changeStep: PropTypes.func.isRequired
|
|
116
|
+
};
|
|
117
|
+
export default EthConnectLedger;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import Text from 'components/Text/Text.styles';
|
|
4
|
+
import Button from 'components/Button/Button.styles';
|
|
5
|
+
// import FAQ from "components/FAQ/FAQ";
|
|
6
|
+
import SectionTitle from 'components/SectionTitle/SectionTitle.styles';
|
|
7
|
+
import ComponentWrapper from 'components/ComponentWrapper/ComponentWrapper.styles';
|
|
8
|
+
import ComponentScroll from 'components/ComponentScroll/ComponentScroll';
|
|
9
|
+
import { ModalWrapper } from 'components/Modal/Modal.styles';
|
|
10
|
+
import { isMetamaskInstalled } from 'api/StokrWeb3';
|
|
11
|
+
const EthConnectMetamask = ({
|
|
12
|
+
changeStep
|
|
13
|
+
}) => /*#__PURE__*/React.createElement(ModalWrapper, null, /*#__PURE__*/React.createElement(ComponentWrapper, null, /*#__PURE__*/React.createElement(SectionTitle, null, "Register Ethereum address")), /*#__PURE__*/React.createElement(ComponentScroll, null, /*#__PURE__*/React.createElement(ComponentWrapper, {
|
|
14
|
+
noPaddingVertical: true
|
|
15
|
+
}, /*#__PURE__*/React.createElement(Text, null, /*#__PURE__*/React.createElement("h3", null, "Connect to metamask"), /*#__PURE__*/React.createElement("p", null, 'Ensure your MetaMask extension is enabled in your browser. Then click ‘Connect to Metamask’. In the pop up that is presented please give STOKR permission to view your current account address.'))), /*#__PURE__*/React.createElement(ComponentWrapper, {
|
|
16
|
+
center: true
|
|
17
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
18
|
+
minWidth: "240px",
|
|
19
|
+
onClick: changeStep,
|
|
20
|
+
disabled: !isMetamaskInstalled()
|
|
21
|
+
}, "Connect"))));
|
|
22
|
+
EthConnectMetamask.propTypes = {
|
|
23
|
+
changeStep: PropTypes.func.isRequired
|
|
24
|
+
};
|
|
25
|
+
export default EthConnectMetamask;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import FAQ from 'components/FAQ/FAQ';
|
|
4
|
+
import Text from 'components/Text/Text.styles';
|
|
5
|
+
import Button from 'components/Button/Button.styles';
|
|
6
|
+
import SectionTitle from 'components/SectionTitle/SectionTitle.styles';
|
|
7
|
+
import ComponentWrapper from 'components/ComponentWrapper/ComponentWrapper.styles';
|
|
8
|
+
import ComponentScroll from 'components/ComponentScroll/ComponentScroll';
|
|
9
|
+
import { ModalWrapper } from 'components/Modal/Modal.styles';
|
|
10
|
+
const EthFinish = ({
|
|
11
|
+
handleFinish,
|
|
12
|
+
addressToRegister,
|
|
13
|
+
nameToRegister
|
|
14
|
+
}) => /*#__PURE__*/React.createElement(ModalWrapper, null, /*#__PURE__*/React.createElement(ComponentWrapper, null, /*#__PURE__*/React.createElement(SectionTitle, null, "SUCCESS. YOU CONNECTED YOUR ETHEREUM ADDRESS")), /*#__PURE__*/React.createElement(ComponentScroll, null, /*#__PURE__*/React.createElement(ComponentWrapper, {
|
|
15
|
+
noPaddingVertical: true
|
|
16
|
+
}, /*#__PURE__*/React.createElement(Text, null, /*#__PURE__*/React.createElement("p", null, `The address ${addressToRegister} (${nameToRegister}) is being linked to your STOKR account and will be ready to use soon. You can register more addresses at any time from your dashboard.`))), /*#__PURE__*/React.createElement(ComponentWrapper, {
|
|
17
|
+
center: true
|
|
18
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
19
|
+
minWidth: "240px",
|
|
20
|
+
onClick: handleFinish
|
|
21
|
+
}, "Finish")), /*#__PURE__*/React.createElement(ComponentWrapper, {
|
|
22
|
+
noPaddingBottom: true
|
|
23
|
+
}, /*#__PURE__*/React.createElement(SectionTitle, null, "Frequently Asked Questions")), /*#__PURE__*/React.createElement(ComponentWrapper, null, /*#__PURE__*/React.createElement(FAQ, {
|
|
24
|
+
items: [{
|
|
25
|
+
title: 'Why is it pending?',
|
|
26
|
+
content: 'We need to make sure that your Ethereum address has not been linked to illicit activities.'
|
|
27
|
+
}]
|
|
28
|
+
}))));
|
|
29
|
+
EthFinish.propTypes = {
|
|
30
|
+
handleFinish: PropTypes.func.isRequired
|
|
31
|
+
};
|
|
32
|
+
export default EthFinish;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import Text from 'components/Text/Text.styles';
|
|
4
|
+
import Button from 'components/Button/Button.styles';
|
|
5
|
+
import FAQ from 'components/FAQ/FAQ';
|
|
6
|
+
import SectionTitle from 'components/SectionTitle/SectionTitle.styles';
|
|
7
|
+
import ComponentWrapper from 'components/ComponentWrapper/ComponentWrapper.styles';
|
|
8
|
+
import ComponentScroll from 'components/ComponentScroll/ComponentScroll';
|
|
9
|
+
import DoubleButton from 'components/DoubleButton/DoubleButton.styles';
|
|
10
|
+
import { ModalWrapper } from 'components/Modal/Modal.styles';
|
|
11
|
+
//import { supportsU2F, isMetamaskInstalled } from 'api/StokrWeb3'
|
|
12
|
+
|
|
13
|
+
const isMetamaskInstalled = () => {
|
|
14
|
+
return false;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
//import { graphql } from "gatsby";
|
|
18
|
+
|
|
19
|
+
const EthIntro = ({
|
|
20
|
+
data,
|
|
21
|
+
setWallet,
|
|
22
|
+
changeStep
|
|
23
|
+
}) => {
|
|
24
|
+
const [showRefreshButton, setShowRefreshButton] = useState(false);
|
|
25
|
+
return /*#__PURE__*/React.createElement(ModalWrapper, null, /*#__PURE__*/React.createElement(ComponentWrapper, null, /*#__PURE__*/React.createElement(SectionTitle, null, "Register Ethereum address")), /*#__PURE__*/React.createElement(ComponentScroll, null, /*#__PURE__*/React.createElement(ComponentWrapper, {
|
|
26
|
+
noPaddingVertical: true
|
|
27
|
+
}, /*#__PURE__*/React.createElement(Text, null, /*#__PURE__*/React.createElement("h3", null, "Choose your wallet"), /*#__PURE__*/React.createElement("p", null, 'In the next couple of steps we’ll guide you through registering an Ethereum address from your Ledger or MetaMask wallet.'), /*#__PURE__*/React.createElement("p", null, 'Before chosing your wallet please make sure you are using the right browser and have the right plug-ins installed. Please have a look at the FAQs below for more information.'))), /*#__PURE__*/React.createElement(ComponentWrapper, null, /*#__PURE__*/React.createElement(DoubleButton, null, /*#__PURE__*/React.createElement(Button, {
|
|
28
|
+
onClick: () => {
|
|
29
|
+
setWallet('ledger');
|
|
30
|
+
changeStep();
|
|
31
|
+
}
|
|
32
|
+
//disabled={!supportsU2F()}
|
|
33
|
+
}, "Ledger"), showRefreshButton ? /*#__PURE__*/React.createElement(Button, {
|
|
34
|
+
onClick: () => {
|
|
35
|
+
window.location.reload();
|
|
36
|
+
}
|
|
37
|
+
}, "Refresh") : /*#__PURE__*/React.createElement(Button, {
|
|
38
|
+
onClick: () => {
|
|
39
|
+
if (isMetamaskInstalled()) {
|
|
40
|
+
setWallet('metamask');
|
|
41
|
+
changeStep();
|
|
42
|
+
} else {
|
|
43
|
+
window.open('https://metamask.io', '_blank');
|
|
44
|
+
setShowRefreshButton(true);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
// disabled={!isMetamaskInstalled()}
|
|
48
|
+
}, isMetamaskInstalled() ? 'Metamask' : 'Get Metamask'))), /*#__PURE__*/React.createElement(ComponentWrapper, {
|
|
49
|
+
noPaddingBottom: true
|
|
50
|
+
}, /*#__PURE__*/React.createElement(SectionTitle, null, "Frequently Asked Questions")), /*#__PURE__*/React.createElement(ComponentWrapper, null, /*#__PURE__*/React.createElement(FAQ, {
|
|
51
|
+
items: [{
|
|
52
|
+
title: 'Which wallet should I use?',
|
|
53
|
+
content: 'Metamask is a software wallet in the form of a browser extension that can be installed on a compatible browser on the spot. Hardware wallets like Ledger are considered more secure for being physical devices that store your private key(s) offline.'
|
|
54
|
+
}, {
|
|
55
|
+
title: "I don't have an Ethereum wallet, what now?",
|
|
56
|
+
content: 'You can install the MetaMask wallet and create an Ethereum address in minutes. Just go to metamask.io and download the browser extension to set-up your wallet. (Chrome, Firefox, Opera or Brave browser required). Afterwards, you will need to refresh this page to proceed. '
|
|
57
|
+
}, {
|
|
58
|
+
title: 'What is a wallet?',
|
|
59
|
+
content: 'A wallet is a hardware device or browser interface to manage and protect your private key and as a result the transactions you are making on the blockchain. '
|
|
60
|
+
}]
|
|
61
|
+
}))));
|
|
62
|
+
};
|
|
63
|
+
EthIntro.propTypes = {
|
|
64
|
+
setWallet: PropTypes.func.isRequired,
|
|
65
|
+
changeStep: PropTypes.func.isRequired
|
|
66
|
+
};
|
|
67
|
+
export default EthIntro;
|
|
68
|
+
|
|
69
|
+
/*
|
|
70
|
+
export const query = graphql`
|
|
71
|
+
query CheckQuery {
|
|
72
|
+
check {
|
|
73
|
+
supportsU2F
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
`;
|
|
77
|
+
*/
|