├── .babelrc
├── .commitlintrc
├── .editorconfig
├── .eslintignore
├── .eslintrc.js
├── .gitattributes
├── .github
├── ISSUE_TEMPLATE
│ ├── bug_report.md
│ └── feature_request.md
├── PULL_REQUEST_TEMPLATE.md
└── config.yml
├── .gitignore
├── .huskyrc
├── .lintstagedrc
├── .nvmrc
├── .prettierignore
├── .prettierrc
├── .renovaterc.json
├── .storybook
├── main.js
├── manager.js
├── patchedReactRedux.js
├── preview-head.html
├── preview.js
└── webpack.config.js
├── .stylelintignore
├── .stylelintrc
├── .svgrrc
├── .testcafe-electron-rc
├── .travis.yml
├── .vscode
└── settings.json
├── LICENSE
├── README.md
├── appveyor.yml
├── babel.config.js
├── config
├── custom-environment-variables.json
├── default.js
├── development.js
├── e2e.js
├── production.js
├── storybook.js
└── test.js
├── crowdin.yml
├── docs
├── ADVANCED.md
├── CONFIG.md
├── CONTRIBUTING.md
├── DEBUGGING.md
├── RELEASING.md
├── SIGNATURES.md
└── TROUBLESHOOTING.md
├── electron
├── about
│ ├── index.js
│ ├── preload.js
│ └── public
│ │ ├── about.html
│ │ ├── renderer.js
│ │ └── styles
│ │ └── ui.css
├── controller.js
├── lnurl
│ ├── index.js
│ └── service.js
├── main.js
├── menuBuilder.js
├── migrations
│ ├── delete-tmp-wallets.js
│ └── purge-local-wallets.js
├── migrator.js
├── pdfGenerator
│ ├── invoice.js
│ └── service.js
├── preload.js
├── secureStorage
│ ├── index.js
│ ├── ipcCRUD.js
│ └── service.js
├── updater.js
├── utils
│ └── fetchSettings.js
└── walletBackup
│ ├── base
│ └── TokenBasedBackupService.js
│ ├── dropbox
│ ├── db.js
│ ├── dbApi.js
│ └── index.js
│ ├── gdrive
│ ├── gdrive.js
│ ├── gdriveApi.js
│ └── index.js
│ ├── local
│ └── index.js
│ ├── service.js
│ └── serviceFactory.js
├── fonts
├── roboto-light.woff2
└── roboto-regular.woff2
├── i18n
├── index.js
├── intl.js
└── translation.js
├── icons
├── angle-down.svg
├── angle-left.svg
├── angle-right.svg
├── angle-up.svg
├── arrow-down.svg
├── arrow-left.svg
├── arrow-right.svg
├── arrow-up.svg
├── autopay-check.svg
├── autopay.svg
├── backup-local.svg
├── badge-app-store.svg
├── badge-google-play.svg
├── big-arrow-right.svg
├── bitcoin.svg
├── bolt-onboarding.svg
├── btcpay.svg
├── chain-link.svg
├── check-circle.svg
├── check.svg
├── circle.svg
├── clock.svg
├── close.svg
├── cloud-lightning.svg
├── cloudbolt.svg
├── connect-onboarding.svg
├── copy.svg
├── delete.svg
├── download.svg
├── dropbox.svg
├── error.svg
├── external-link.svg
├── eye-off.svg
├── eye.svg
├── filter.svg
├── folder-open.svg
├── github.svg
├── google-drive.svg
├── import-onboarding.svg
├── layout-cards.svg
├── layout-list.svg
├── lightning-bolt.svg
├── lightning-channel.svg
├── lightning.svg
├── litecoin.svg
├── lock-safe.svg
├── logo.png
├── logout.svg
├── medium.svg
├── minus-circle.svg
├── onchain.svg
├── open-source.svg
├── padlock.svg
├── peace.svg
├── plus-circle.svg
├── plus-onboarding.svg
├── plus.svg
├── qrcode.svg
├── receive.svg
├── refresh.svg
├── search.svg
├── send.svg
├── settings.svg
├── slack.svg
├── spinner.svg
├── success.svg
├── twitter.svg
├── user-circle.svg
├── user.svg
├── warning.svg
├── x.svg
├── zap-logo-full.svg
├── zap-logo.svg
├── zap-solid.svg
└── zap.svg
├── package.json
├── renderer
├── app.html
├── components
│ ├── Activity
│ │ ├── Activity.js
│ │ ├── ActivityActions
│ │ │ ├── ActivityActions.js
│ │ │ ├── ActivityFilter.js
│ │ │ ├── ActivityRefresh.js
│ │ │ ├── ActivitySearch.js
│ │ │ ├── index.js
│ │ │ └── messages.js
│ │ ├── ActivityListItem.js
│ │ ├── ActivityModal
│ │ │ ├── ActivityModal.js
│ │ │ └── index.js
│ │ ├── ErrorDetailsDialog.js
│ │ ├── ErrorLink.js
│ │ ├── Invoice
│ │ │ ├── Invoice.js
│ │ │ ├── index.js
│ │ │ └── messages.js
│ │ ├── InvoiceModal
│ │ │ ├── InvoiceModal.js
│ │ │ ├── index.js
│ │ │ └── messages.js
│ │ ├── List.js
│ │ ├── Payment
│ │ │ ├── Payment.js
│ │ │ ├── index.js
│ │ │ └── messages.js
│ │ ├── PaymentModal
│ │ │ ├── Htlc.js
│ │ │ ├── HtlcHops.js
│ │ │ ├── PaymentModal.js
│ │ │ ├── Route.js
│ │ │ ├── index.js
│ │ │ └── messages.js
│ │ ├── Row.js
│ │ ├── Transaction
│ │ │ ├── Transaction.js
│ │ │ ├── index.js
│ │ │ └── messages.js
│ │ ├── TransactionModal
│ │ │ ├── TransactionModal.js
│ │ │ ├── index.js
│ │ │ └── messages.js
│ │ ├── index.js
│ │ └── messages.js
│ ├── App
│ │ ├── App.js
│ │ └── index.js
│ ├── Autopay
│ │ ├── Autopay.js
│ │ ├── AutopayActions.js
│ │ ├── AutopayAddButton.js
│ │ ├── AutopayCardView.js
│ │ ├── AutopayCreateForm.js
│ │ ├── AutopayCreateModal.js
│ │ ├── AutopayCreateSettings.js
│ │ ├── AutopayCreateSuccess.js
│ │ ├── AutopayGrid.js
│ │ ├── AutopayHeader.js
│ │ ├── AutopayHeading.js
│ │ ├── AutopayLimitBadge.js
│ │ ├── AutopayList.js
│ │ ├── AutopayMerchantList.js
│ │ ├── AutopayModalBody.js
│ │ ├── AutopaySearch.js
│ │ ├── AutopaySearchNoResults.js
│ │ ├── AutopayStatus.js
│ │ ├── index.js
│ │ └── messages.js
│ ├── Channels
│ │ ├── ChannelBackButton.js
│ │ ├── ChannelBalance.js
│ │ ├── ChannelCapacity.js
│ │ ├── ChannelCardList.js
│ │ ├── ChannelCardListItem.js
│ │ ├── ChannelCloseDialog.js
│ │ ├── ChannelCount.js
│ │ ├── ChannelCreate.js
│ │ ├── ChannelCreateForm.js
│ │ ├── ChannelCreateHeader.js
│ │ ├── ChannelCreateSummary.js
│ │ ├── ChannelData.js
│ │ ├── ChannelDetail.js
│ │ ├── ChannelFilter.js
│ │ ├── ChannelFooter.js
│ │ ├── ChannelHeader.js
│ │ ├── ChannelMoreButton.js
│ │ ├── ChannelNodeSearch.js
│ │ ├── ChannelSearch.js
│ │ ├── ChannelSort.js
│ │ ├── ChannelSortDirectionButton.js
│ │ ├── ChannelStatus.js
│ │ ├── ChannelSummaryList.js
│ │ ├── ChannelSummaryListItem.js
│ │ ├── Channels.js
│ │ ├── ChannelsActions.js
│ │ ├── ChannelsCapacity.js
│ │ ├── ChannelsCapacityDonut.js
│ │ ├── ChannelsHeader.js
│ │ ├── ChannelsInfo.js
│ │ ├── ChannelsMenu
│ │ │ ├── ChannelsMenu.js
│ │ │ ├── ChannelsMenuHeader.js
│ │ │ ├── ChannelsMenuSummary.js
│ │ │ ├── index.js
│ │ │ └── messages.js
│ │ ├── ChannelsRefresh.js
│ │ ├── ChannelsSummaryDonut.js
│ │ ├── ChannelsViewButtons.js
│ │ ├── ChannelsViewSwitcher.js
│ │ ├── NodeCardList.js
│ │ ├── NodeCardView.js
│ │ ├── constants.js
│ │ ├── index.js
│ │ └── messages.js
│ ├── Dialog
│ │ ├── DialogAppCrashed.js
│ │ ├── DialogLndCrashed.js
│ │ ├── index.js
│ │ └── messages.js
│ ├── ErrorBoundary
│ │ └── AppErrorBoundary.js
│ ├── Form
│ │ ├── Checkbox.js
│ │ ├── CryptoAmountInput.js
│ │ ├── CurrencyFieldGroup.js
│ │ ├── FiatAmountInput.js
│ │ ├── Field.js
│ │ ├── FieldLabel.js
│ │ ├── Form.js
│ │ ├── Input.js
│ │ ├── InputContainer.js
│ │ ├── IntegerInput.js
│ │ ├── Label.js
│ │ ├── LightningInvoiceInput.js
│ │ ├── LndConnectionStringEditor.js
│ │ ├── LndConnectionStringInput.js
│ │ ├── NodePubkeyInput.js
│ │ ├── OpenDialogButton.js
│ │ ├── OpenDialogInput.js
│ │ ├── PasswordInput.js
│ │ ├── PositiveIntegerField.js
│ │ ├── Radio.js
│ │ ├── RadioCard.js
│ │ ├── RadioGroup.js
│ │ ├── Range.js
│ │ ├── RowLabel.js
│ │ ├── SearchInput.js
│ │ ├── Select.js
│ │ ├── TextArea.js
│ │ ├── Toggle.js
│ │ ├── TransactionFeeInput.js
│ │ ├── constants.js
│ │ ├── index.js
│ │ ├── messages.js
│ │ └── util.js
│ ├── GlobalNotification
│ │ ├── GlobalNotification.js
│ │ └── index.js
│ ├── Home
│ │ ├── AutopilotAllocation.js
│ │ ├── CreateWalletButton.js
│ │ ├── DeleteWalletDialog.js
│ │ ├── Home.js
│ │ ├── NoWallets.js
│ │ ├── WalletHeader.js
│ │ ├── WalletLauncher.js
│ │ ├── WalletSettingsFormLocal.js
│ │ ├── WalletSettingsFormRemote.js
│ │ ├── WalletUnlocker.js
│ │ ├── WalletsMenu.js
│ │ ├── index.js
│ │ └── messages.js
│ ├── Icon
│ │ ├── .eslintrc
│ │ ├── AngleDown.js
│ │ ├── AngleLeft.js
│ │ ├── AngleRight.js
│ │ ├── AngleUp.js
│ │ ├── ArrowDown.js
│ │ ├── ArrowLeft.js
│ │ ├── ArrowRight.js
│ │ ├── ArrowUp.js
│ │ ├── Autopay.js
│ │ ├── AutopayCheck.js
│ │ ├── BackupLocal.js
│ │ ├── BadgeAppStore.js
│ │ ├── BadgeGooglePlay.js
│ │ ├── BigArrowRight.js
│ │ ├── Bitcoin.js
│ │ ├── BoltOnboarding.js
│ │ ├── Btcpay.js
│ │ ├── ChainLink.js
│ │ ├── Check.js
│ │ ├── CheckCircle.js
│ │ ├── Circle.js
│ │ ├── Clock.js
│ │ ├── Close.js
│ │ ├── CloudLightning.js
│ │ ├── ConnectOnboarding.js
│ │ ├── Copy.js
│ │ ├── Delete.js
│ │ ├── Download.js
│ │ ├── Dropbox.js
│ │ ├── Error.js
│ │ ├── ExternalLink.js
│ │ ├── Eye.js
│ │ ├── EyeOff.js
│ │ ├── Filter.js
│ │ ├── FolderOpen.js
│ │ ├── Github.js
│ │ ├── GoogleDrive.js
│ │ ├── ImportOnboarding.js
│ │ ├── LayoutCards.js
│ │ ├── LayoutList.js
│ │ ├── Lightning.js
│ │ ├── LightningBolt.js
│ │ ├── LightningChannel.js
│ │ ├── LockSafe.js
│ │ ├── Logout.js
│ │ ├── Medium.js
│ │ ├── MinusCircle.js
│ │ ├── Onchain.js
│ │ ├── OpenSource.js
│ │ ├── Padlock.js
│ │ ├── Peace.js
│ │ ├── Plus.js
│ │ ├── PlusCircle.js
│ │ ├── PlusOnboarding.js
│ │ ├── Qrcode.js
│ │ ├── Receive.js
│ │ ├── Refresh.js
│ │ ├── Search.js
│ │ ├── Send.js
│ │ ├── Settings.js
│ │ ├── Slack.js
│ │ ├── Spinner.js
│ │ ├── Success.js
│ │ ├── Twitter.js
│ │ ├── User.js
│ │ ├── UserCircle.js
│ │ ├── Warning.js
│ │ ├── X.js
│ │ ├── Zap.js
│ │ ├── ZapLogo.js
│ │ ├── ZapLogoFull.js
│ │ └── ZapSolid.js
│ ├── Lnurl
│ │ ├── LnurlAuthPrompt.js
│ │ ├── LnurlChannelPrompt.js
│ │ ├── LnurlWithdrawPrompt.js
│ │ ├── index.js
│ │ └── messages.js
│ ├── Loading
│ │ ├── Loading.js
│ │ ├── LoadingApp.js
│ │ ├── LoadingBolt.js
│ │ ├── LoadingLaunchpad.js
│ │ ├── Placeholder.js
│ │ ├── Transition.js
│ │ ├── index.js
│ │ └── messages.js
│ ├── Login
│ │ ├── Login.js
│ │ ├── LoginNotAllowed.js
│ │ ├── index.js
│ │ └── messages.js
│ ├── ModalStack.js
│ ├── Onboarding
│ │ ├── Steps
│ │ │ ├── Autopilot.js
│ │ │ ├── BackupSetup.js
│ │ │ ├── BackupSetupLocal.js
│ │ │ ├── ConnectionConfirm.js
│ │ │ ├── ConnectionDetails.js
│ │ │ ├── ConnectionDetailsContext.js
│ │ │ ├── ConnectionDetailsManual.js
│ │ │ ├── ConnectionDetailsString.js
│ │ │ ├── ConnectionDetailsTabs.js
│ │ │ ├── ConnectionType.js
│ │ │ ├── Login.js
│ │ │ ├── Name.js
│ │ │ ├── Network.js
│ │ │ ├── Password.js
│ │ │ ├── Recover.js
│ │ │ ├── SeedConfirm.js
│ │ │ ├── SeedView.js
│ │ │ ├── WalletCreate.js
│ │ │ ├── WalletRecover.js
│ │ │ ├── components
│ │ │ │ ├── BackupTypeItem.js
│ │ │ │ ├── ConnectionTypeItem.js
│ │ │ │ ├── Container.js
│ │ │ │ ├── ErrorDialog.js
│ │ │ │ ├── SeedWordInput.js
│ │ │ │ ├── SeedWordList.js
│ │ │ │ ├── SkipBackupsDialog.js
│ │ │ │ ├── messages.js
│ │ │ │ └── settings.js
│ │ │ ├── constants.js
│ │ │ ├── index.js
│ │ │ └── messages.js
│ │ └── messages.js
│ ├── Pay
│ │ ├── Pay.js
│ │ ├── PayAddressField.js
│ │ ├── PayAmountFields.js
│ │ ├── PayButtons.js
│ │ ├── PayHeader.js
│ │ ├── PayHelpText.js
│ │ ├── PayPanelBody.js
│ │ ├── PayPanelFooter.js
│ │ ├── PayPanelHeader.js
│ │ ├── PaySummary.js
│ │ ├── PaySummaryLightning.js
│ │ ├── PaySummaryOnChain.js
│ │ ├── constants.js
│ │ ├── index.js
│ │ ├── messages.js
│ │ └── utils.js
│ ├── Profile
│ │ ├── ProfileMenu
│ │ │ ├── ProfileMenu.js
│ │ │ ├── index.js
│ │ │ └── messages.js
│ │ ├── ProfilePage
│ │ │ ├── ProfilePage.js
│ │ │ ├── index.js
│ │ │ └── messages.js
│ │ ├── ProfilePaneConnect
│ │ │ ├── ProfilePaneConnect.js
│ │ │ ├── index.js
│ │ │ └── messages.js
│ │ ├── ProfilePaneNodeInfo
│ │ │ ├── ProfilePaneNodeInfo.js
│ │ │ ├── index.js
│ │ │ └── messages.js
│ │ ├── ProfilePaneSignMessage
│ │ │ ├── ProfilePaneSignMessage.js
│ │ │ ├── index.js
│ │ │ └── messages.js
│ │ ├── ProfilePaneVerifyMessage
│ │ │ ├── ProfilePaneVerifyMessage.js
│ │ │ ├── index.js
│ │ │ └── messages.js
│ │ ├── constants.js
│ │ └── index.js
│ ├── Request
│ │ ├── Request.js
│ │ ├── RequestSettlePrompt.js
│ │ ├── RequestSummary.js
│ │ ├── index.js
│ │ └── messages.js
│ ├── Settings
│ │ ├── Security
│ │ │ ├── ChangePasswordDialog.js
│ │ │ ├── PasswordPromptDialog.js
│ │ │ ├── PasswordState.js
│ │ │ ├── SetPasswordDialog.js
│ │ │ └── messages.js
│ │ ├── SettingsFieldsGeneral.js
│ │ ├── SettingsFieldsSecurity.js
│ │ ├── SettingsFieldsWallet.js
│ │ ├── SettingsForm.js
│ │ ├── SettingsMenu
│ │ │ ├── SettingsMenu.js
│ │ │ ├── index.js
│ │ │ └── messages.js
│ │ ├── SettingsPage.js
│ │ ├── index.js
│ │ └── messages.js
│ ├── Syncing
│ │ ├── Address.js
│ │ ├── NewWalletHeader.js
│ │ ├── OldWalletHeader.js
│ │ ├── Progress.js
│ │ ├── Syncing.js
│ │ ├── Tutorials.js
│ │ ├── index.js
│ │ └── messages.js
│ ├── TabControl
│ │ ├── PersistentTabControl.js
│ │ └── Tab.js
│ ├── UI
│ │ ├── ActionBar.js
│ │ ├── ActionButton.js
│ │ ├── BackgroundPrimary.js
│ │ ├── BackgroundSecondary.js
│ │ ├── BackgroundTertiary.js
│ │ ├── Bar.js
│ │ ├── Button.js
│ │ ├── ButtonCreate.js
│ │ ├── Card.js
│ │ ├── CenteredContent.js
│ │ ├── ClippedText.js
│ │ ├── CloseButton.js
│ │ ├── CopyBox.js
│ │ ├── CopyButton.js
│ │ ├── Countdown.js
│ │ ├── DataRow.js
│ │ ├── Dialog.js
│ │ ├── DialogOverlay.js
│ │ ├── Donut.js
│ │ ├── Dropdown
│ │ │ ├── Dropdown.js
│ │ │ ├── IconDropdownButton.js
│ │ │ └── index.js
│ │ ├── Dropmenu.js
│ │ ├── GlobalStyle.js
│ │ ├── Header.js
│ │ ├── Heading.js
│ │ ├── Link.js
│ │ ├── MainContent.js
│ │ ├── Menu.js
│ │ ├── MenuItem.js
│ │ ├── Message.js
│ │ ├── Modal.js
│ │ ├── Notification.js
│ │ ├── Page.js
│ │ ├── Panel.js
│ │ ├── ProgressBar.js
│ │ ├── QRCode.js
│ │ ├── Sidebar.js
│ │ ├── Span.js
│ │ ├── Spinner.js
│ │ ├── StatusIndicator.js
│ │ ├── SwitchButton.js
│ │ ├── Tab.js
│ │ ├── Tabs.js
│ │ ├── Text.js
│ │ ├── Titlebar.js
│ │ ├── Tooltip.js
│ │ ├── Value.js
│ │ ├── Wizard.js
│ │ ├── index.js
│ │ └── messages.js
│ ├── Util
│ │ ├── Truncate.js
│ │ ├── WalletName.js
│ │ └── index.js
│ └── Wallet
│ │ ├── ReceiveModal
│ │ ├── ReceiveModal.js
│ │ ├── index.js
│ │ └── messages.js
│ │ ├── Wallet.js
│ │ ├── WalletBalance.js
│ │ ├── WalletButtons.js
│ │ ├── WalletLogo.js
│ │ ├── WalletMenu.js
│ │ ├── index.js
│ │ └── messages.js
├── containers
│ ├── Activity
│ │ ├── Activity.js
│ │ ├── ActivityActions.js
│ │ ├── ActivityModal.js
│ │ ├── Invoice.js
│ │ ├── Payment.js
│ │ ├── Transaction.js
│ │ └── index.js
│ ├── App
│ │ ├── App.js
│ │ ├── ErrorBoundary.js
│ │ ├── ModalStack.js
│ │ └── index.js
│ ├── Autopay.js
│ ├── Autopay
│ │ ├── AutopayCreateModal.js
│ │ ├── AutopayList.js
│ │ ├── AutopayMerchantList.js
│ │ └── AutopaySearch.js
│ ├── Channels.js
│ ├── Channels
│ │ ├── ChannelCloseDialog.js
│ │ ├── ChannelCreate.js
│ │ ├── ChannelCreateForm.js
│ │ ├── ChannelDetail.js
│ │ ├── ChannelDetailModal.js
│ │ ├── ChannelNodeSearch.js
│ │ ├── ChannelsHeader.js
│ │ ├── ChannelsMenu.js
│ │ └── NodeCardList.js
│ ├── Dialog
│ │ ├── DialogLndCrashed.js
│ │ └── index.js
│ ├── Form
│ │ ├── CurrencyFieldGroup.js
│ │ └── index.js
│ ├── Home
│ │ ├── DeleteWalletDialog.js
│ │ ├── Home.js
│ │ └── index.js
│ ├── Initializer.js
│ ├── Lnurl
│ │ ├── LnurlAuthPrompt.js
│ │ ├── LnurlChannelPrompt.js
│ │ └── LnurlWithdrawPrompt.js
│ ├── Loading
│ │ ├── Loading.js
│ │ └── index.js
│ ├── Login
│ │ ├── Login.js
│ │ └── index.js
│ ├── Logout.js
│ ├── Onboarding
│ │ ├── Onboarding.js
│ │ └── Steps
│ │ │ ├── Autopilot.js
│ │ │ ├── BackupSetup.js
│ │ │ ├── BackupSetupLocal.js
│ │ │ ├── ConnectionConfirm.js
│ │ │ ├── ConnectionDetails.js
│ │ │ ├── ConnectionDetailsManual.js
│ │ │ ├── ConnectionDetailsString.js
│ │ │ ├── ConnectionType.js
│ │ │ ├── Login.js
│ │ │ ├── Name.js
│ │ │ ├── Network.js
│ │ │ ├── Password.js
│ │ │ ├── Recover.js
│ │ │ ├── SeedConfirm.js
│ │ │ ├── SeedView.js
│ │ │ ├── WalletCreate.js
│ │ │ ├── WalletRecover.js
│ │ │ └── index.js
│ ├── Pay.js
│ ├── Pay
│ │ ├── PaySummaryLightning.js
│ │ └── PaySummaryOnChain.js
│ ├── Profile
│ │ ├── ProfilePage.js
│ │ ├── ProfilePaneConnect.js
│ │ ├── ProfilePaneNodeInfo.js
│ │ ├── ProfilePaneSignMessage.js
│ │ └── ProfilePaneVerifyMessage.js
│ ├── Request.js
│ ├── Root.js
│ ├── RootModalStack.js
│ ├── Settings
│ │ ├── ChangePasswordDialog.js
│ │ ├── PasswordPromptDialog.js
│ │ ├── PasswordSetDialog.js
│ │ ├── SettingsFieldsSecurity.js
│ │ ├── SettingsForm.js
│ │ ├── SettingsMenu.js
│ │ └── SettingsPage.js
│ ├── Syncing.js
│ ├── UI
│ │ ├── CopyButton.js
│ │ ├── CryptoSelector.js
│ │ ├── CryptoValue.js
│ │ ├── CryptoValueSelector.js
│ │ ├── FiatSelector.js
│ │ ├── FiatValue.js
│ │ ├── FormattedDateTime.js
│ │ ├── index.js
│ │ └── messages.js
│ └── Wallet
│ │ ├── ReceiveModal.js
│ │ ├── Wallet.js
│ │ ├── WalletStarter.js
│ │ └── index.js
├── empty.html
├── hocs
│ ├── index.js
│ ├── withEllipsis.js
│ ├── withInputValidation.js
│ ├── withLoading.js
│ ├── withNumberInputMask.js
│ ├── withNumberValidation.js
│ └── withOpenDialog.js
├── hooks
│ ├── index.js
│ ├── useAutoFocus.js
│ ├── useCloseOnUnmount.js
│ ├── useComponentSize.js
│ ├── useDebounce.js
│ ├── useFormError.js
│ ├── useIntlMap.js
│ ├── useMaxScreenHeight.js
│ ├── useOnClickOutside.js
│ ├── useOnKeydown.js
│ ├── usePrevious.js
│ ├── useScroll.js
│ ├── useScrollDrag.js
│ ├── useTimeout.js
│ └── useWindowDimensions.js
├── index.js
├── reducers
│ ├── account
│ │ ├── constants.js
│ │ ├── index.js
│ │ ├── messages.js
│ │ ├── reducer.js
│ │ └── selectors.js
│ ├── activity
│ │ ├── constants.js
│ │ ├── index.js
│ │ ├── messages.js
│ │ ├── reducer.js
│ │ ├── selectors.js
│ │ └── utils.js
│ ├── address
│ │ ├── constants.js
│ │ ├── index.js
│ │ ├── reducer.js
│ │ └── selectors.js
│ ├── app.js
│ ├── autopay.js
│ ├── autopilot.js
│ ├── autoupdate.js
│ ├── backup.js
│ ├── balance
│ │ ├── constants.js
│ │ ├── index.js
│ │ ├── reducer.js
│ │ └── selectors.js
│ ├── channels
│ │ ├── constants.js
│ │ ├── index.js
│ │ ├── messages.js
│ │ ├── reducer.js
│ │ ├── selectors.js
│ │ └── utils.js
│ ├── contactsform.js
│ ├── index.js
│ ├── info
│ │ ├── constants.js
│ │ ├── index.js
│ │ ├── reducer.js
│ │ └── selectors.js
│ ├── invoice
│ │ ├── constants.js
│ │ ├── index.js
│ │ ├── messages.js
│ │ ├── reducer.js
│ │ ├── selectors.js
│ │ └── utils.js
│ ├── ipc.js
│ ├── lnd.js
│ ├── lnurl
│ │ ├── constants.js
│ │ ├── index.js
│ │ ├── ipc.js
│ │ ├── messages.js
│ │ ├── reducer.js
│ │ └── selectors.js
│ ├── locale
│ │ ├── index.js
│ │ ├── ipc.js
│ │ ├── reducer.js
│ │ └── selectors.js
│ ├── messages
│ │ ├── index.js
│ │ └── messages.js
│ ├── modal
│ │ ├── constants.js
│ │ ├── index.js
│ │ ├── reducer.js
│ │ └── selectors.js
│ ├── network
│ │ ├── constants.js
│ │ ├── index.js
│ │ ├── reducer.js
│ │ ├── selectors.js
│ │ └── utils.js
│ ├── neutrino.js
│ ├── notification
│ │ ├── constants.js
│ │ ├── index.js
│ │ ├── reducer.js
│ │ └── selectors.js
│ ├── onboarding.js
│ ├── pay
│ │ ├── constants.js
│ │ ├── index.js
│ │ ├── ipc.js
│ │ ├── reducer.js
│ │ └── selectors.js
│ ├── payment
│ │ ├── constants.js
│ │ ├── index.js
│ │ ├── messages.js
│ │ ├── reducer.js
│ │ ├── selectors.js
│ │ └── utils.js
│ ├── peers.js
│ ├── settings
│ │ ├── constants.js
│ │ ├── index.js
│ │ ├── messages.js
│ │ ├── reducer.js
│ │ └── selectors.js
│ ├── settingsmenu.js
│ ├── theme
│ │ ├── constants.js
│ │ ├── index.js
│ │ ├── reducer.js
│ │ └── selectors.js
│ ├── ticker
│ │ ├── constants.js
│ │ ├── index.js
│ │ ├── reducer.js
│ │ └── selectors.js
│ ├── transaction
│ │ ├── constants.js
│ │ ├── index.js
│ │ ├── messages.js
│ │ ├── reducer.js
│ │ ├── selectors.js
│ │ └── utils.js
│ ├── utils.js
│ └── wallet
│ │ ├── constants.js
│ │ ├── index.js
│ │ ├── reducer.js
│ │ └── selectors.js
├── store
│ ├── configureStore.dev.js
│ ├── configureStore.js
│ ├── configureStore.prod.js
│ ├── db.js
│ ├── dbVersions.js
│ ├── middleware
│ │ ├── debounceMiddleware.js
│ │ ├── index.js
│ │ └── userTimingMiddleware.js
│ └── schema
│ │ ├── node.js
│ │ ├── setting.js
│ │ └── wallet.js
├── themes
│ ├── autopay
│ │ └── index.js
│ ├── base.js
│ ├── dark
│ │ ├── colors.js
│ │ └── index.js
│ ├── index.js
│ ├── light
│ │ ├── colors.js
│ │ ├── index.js
│ │ └── shadows.js
│ └── util
│ │ ├── createThemeVariant.js
│ │ ├── extractSpaceProps.js
│ │ └── index.js
└── workers
│ ├── grpc.worker.js
│ ├── index.js
│ ├── neutrino.worker.js
│ └── proxymise.js
├── resources
├── icon.icns
├── icon.ico
├── icon.png
├── linux
│ ├── 128x128.png
│ ├── 16x16.png
│ ├── 24x24.png
│ ├── 256x256.png
│ ├── 32x32.png
│ ├── 48x48.png
│ ├── 512x512.png
│ └── 64x64.png
└── mac
│ └── entitlements.mac.inherit.plist
├── scripts
├── afterSignHook.js
├── fetch-lnd-for-packaging.js
├── genIcons.js
├── genIconsStory.js
├── lnd-release
│ ├── .goreleaser.yml
│ ├── README.md
│ └── canary.sh
└── signedchecksum.sh
├── services
├── bitcoind
│ └── index.js
├── grpc
│ ├── grpc.js
│ ├── helpers.js
│ ├── lightning.methods.js
│ ├── lightning.subscriptions.js
│ ├── router.methods.js
│ └── router.subscriptions.js
└── neutrino
│ ├── index.js
│ └── neutrino.js
├── stories
├── .eslintrc
├── Provider.js
├── _general
│ ├── _welcome.stories.js
│ ├── color.stories.js
│ ├── icons.stories.js
│ └── typography.stories.js
├── components
│ ├── actionbar.stories.js
│ ├── background.stories.js
│ ├── bar.stories.js
│ ├── button.stories.js
│ ├── card.stories.js
│ ├── countdown.stories.js
│ ├── dialog.stories.js
│ ├── donut.stories.js
│ ├── dropdown.stories.js
│ ├── dropmenu.stories.js
│ ├── header.stories.js
│ ├── link.stories.js
│ ├── loadingbolt.stories.js
│ ├── menu.stories.js
│ ├── message.stories.js
│ ├── modal.stories.js
│ ├── notification.stories.js
│ ├── progressbar.stories.js
│ ├── qrcode.stories.js
│ ├── spinner.stories.js
│ ├── statusindicator.stories.js
│ ├── switchbutton.stories.js
│ └── tabs.stories.js
├── containers
│ ├── activity.stories.js
│ ├── channels
│ │ ├── channel-balance.stories.js
│ │ ├── channel-capacity.stories.js
│ │ ├── channel-card-list-item.stories.js
│ │ ├── channel-card-list.stories.js
│ │ ├── channel-count.stories.js
│ │ ├── channel-create-form.stories.js
│ │ ├── channel-create-summary.stories.js
│ │ ├── channel-status.stories.js
│ │ ├── channel-summary-list-item.stories.js
│ │ ├── channel-summary-list.stories.js
│ │ ├── channels-header.stories.js
│ │ ├── channels-menu.stories.js
│ │ ├── channels.stories.js
│ │ ├── node-card-list.stories.js
│ │ └── node-card-view.stories.js
│ ├── home.stories.js
│ ├── home
│ │ ├── WalletHeader.stories.js
│ │ └── WalletName.stories.js
│ ├── login.stories.js
│ ├── onboarding
│ │ └── onboarding.component.stories.js
│ ├── pay.stories.js
│ ├── pay
│ │ └── pay.component.stories.js
│ ├── profilepage.stories.js
│ ├── request.stories.js
│ ├── request
│ │ └── request.component.stories.js
│ ├── settingsmenu.stories.js
│ ├── settingspage.stories.js
│ ├── syncing.stories.js
│ └── wallet.stories.js
├── dialogs
│ ├── app-crashed.stories.js
│ ├── channel-close.stories.js
│ ├── delete-wallet.stories.js
│ ├── lnd-crashed.stories.js
│ ├── lnurl-withdrawal-prompt.stories.js
│ ├── password-change.stories.js
│ ├── password-prompt.stories.js
│ ├── password-set.stories.js
│ ├── payment-error-details.stories.js
│ ├── skip-backup.stories.js
│ ├── wallet-create-error.stories.js
│ └── wallet-recover-error.stories.js
├── forms
│ └── form.stories.js
├── helpers.js
├── icons
│ └── icon.stories.js
└── layouts
│ ├── page.stories.js
│ └── panel.stories.js
├── test
├── .eslintrc
├── e2e
│ ├── .eslintrc
│ ├── app.spec.js
│ ├── basic-ui.spec.js
│ ├── fixtures
│ │ ├── readonly.macaroon
│ │ └── tls.cert
│ ├── onboarding-connect-btcpay.spec.js
│ ├── onboarding-connect-lndconnect.spec.js
│ ├── onboarding-create.spec.js
│ ├── onboarding-import.spec.js
│ ├── pages
│ │ ├── loading.js
│ │ ├── onboarding.js
│ │ ├── syncing.js
│ │ └── wallet.js
│ └── utils
│ │ └── helpers.js
└── unit
│ ├── __helpers__
│ ├── intl.js
│ ├── renderWithTheme.js
│ ├── setup.js
│ └── snapshotDiff.js
│ ├── __mocks__
│ ├── comlinkjs.js
│ ├── dexie.js
│ ├── dns.js
│ ├── electron.js
│ ├── fileMock.js
│ ├── grpc.js
│ ├── keytar.js
│ └── react-spring
│ │ └── renderprops.js
│ ├── components
│ ├── Form
│ │ ├── Checkbox.spec.js
│ │ ├── Form.spec.js
│ │ ├── Input.spec.js
│ │ ├── LightningInvoiceInput.spec.js
│ │ ├── NodePubkeyInput.spec.js
│ │ ├── PasswordInput.spec.js
│ │ ├── Radio.spec.js
│ │ ├── Range.spec.js
│ │ ├── Select.spec.js
│ │ ├── TextArea.spec.js
│ │ ├── Toggle.spec.js
│ │ └── __snapshots__
│ │ │ ├── Checkbox.spec.js.snap
│ │ │ ├── Form.spec.js.snap
│ │ │ ├── Input.spec.js.snap
│ │ │ ├── LightningInvoiceInput.spec.js.snap
│ │ │ ├── NodePubkeyInput.spec.js.snap
│ │ │ ├── PasswordInput.spec.js.snap
│ │ │ ├── Radio.spec.js.snap
│ │ │ ├── Range.spec.js.snap
│ │ │ ├── Select.spec.js.snap
│ │ │ ├── TextArea.spec.js.snap
│ │ │ └── Toggle.spec.js.snap
│ ├── Home
│ │ ├── CreateWalletButton.spec.js
│ │ ├── NoWallets.spec.js
│ │ ├── WalletHeader.spec.js
│ │ └── __snapshots__
│ │ │ ├── CreateWalletButton.spec.js.snap
│ │ │ ├── NoWallets.spec.js.snap
│ │ │ └── WalletHeader.spec.js.snap
│ ├── LoadingBolt.spec.js
│ ├── Pay
│ │ ├── PayAddressField.spec.js
│ │ ├── PayAmountFields.spec.js
│ │ ├── PayButtons.spec.js
│ │ ├── PayHeader.spec.js
│ │ ├── PayHelpText.spec.js
│ │ ├── PayPanelBody.spec.js
│ │ ├── PayPanelFooter.spec.js
│ │ ├── PayPanelHeader.spec.js
│ │ ├── PaySummary.spec.js
│ │ ├── PaySummaryLightning.spec.js
│ │ ├── PaySummaryOnchain.spec.js
│ │ ├── PaySummaryRow.spec.js
│ │ └── __snapshots__
│ │ │ ├── PayAddressField.spec.js.snap
│ │ │ ├── PayAmountFields.spec.js.snap
│ │ │ ├── PayButtons.spec.js.snap
│ │ │ ├── PayHeader.spec.js.snap
│ │ │ ├── PayHelpText.spec.js.snap
│ │ │ ├── PayPanelBody.spec.js.snap
│ │ │ ├── PayPanelFooter.spec.js.snap
│ │ │ ├── PayPanelHeader.spec.js.snap
│ │ │ ├── PaySummary.spec.js.snap
│ │ │ ├── PaySummaryLightning.spec.js.snap
│ │ │ ├── PaySummaryOnchain.spec.js.snap
│ │ │ └── PaySummaryRow.spec.js.snap
│ ├── UI
│ │ ├── ActionBar.spec.js
│ │ ├── BackgroundDark.spec.js
│ │ ├── BackgroundLight.spec.js
│ │ ├── BackgroundLightest.spec.js
│ │ ├── BackgroundPrimary.spec.js
│ │ ├── Bar.spec.js
│ │ ├── Button.spec.js
│ │ ├── Card.spec.js
│ │ ├── Countdown.spec.js
│ │ ├── Dialog.spec.js
│ │ ├── Dropdown.spec.js
│ │ ├── Header.spec.js
│ │ ├── Heading.spec.js
│ │ ├── Link.spec.js
│ │ ├── MainContent.spec.js
│ │ ├── Message.spec.js
│ │ ├── Modal.spec.js
│ │ ├── Notification.spec.js
│ │ ├── Page.spec.js
│ │ ├── Panel.spec.js
│ │ ├── ProgressBar.spec.js
│ │ ├── QRCode.spec.js
│ │ ├── Sidebar.spec.js
│ │ ├── Spinner.spec.js
│ │ ├── StatusIndicator.spec.js
│ │ ├── Text.spec.js
│ │ ├── Truncate.spec.js
│ │ └── __snapshots__
│ │ │ ├── ActionBar.spec.js.snap
│ │ │ ├── BackgroundDark.spec.js.snap
│ │ │ ├── BackgroundLight.spec.js.snap
│ │ │ ├── BackgroundLightest.spec.js.snap
│ │ │ ├── BackgroundPrimary.spec.js.snap
│ │ │ ├── Bar.spec.js.snap
│ │ │ ├── Button.spec.js.snap
│ │ │ ├── Card.spec.js.snap
│ │ │ ├── Countdown.spec.js.snap
│ │ │ ├── Dialog.spec.js.snap
│ │ │ ├── Dropdown.spec.js.snap
│ │ │ ├── Header.spec.js.snap
│ │ │ ├── Heading.spec.js.snap
│ │ │ ├── Link.spec.js.snap
│ │ │ ├── MainContent.spec.js.snap
│ │ │ ├── Message.spec.js.snap
│ │ │ ├── Modal.spec.js.snap
│ │ │ ├── Notification.spec.js.snap
│ │ │ ├── Page.spec.js.snap
│ │ │ ├── Panel.spec.js.snap
│ │ │ ├── ProgressBar.spec.js.snap
│ │ │ ├── QRCode.spec.js.snap
│ │ │ ├── Sidebar.spec.js.snap
│ │ │ ├── Spinner.spec.js.snap
│ │ │ ├── StatusIndicator.spec.js.snap
│ │ │ ├── Text.spec.js.snap
│ │ │ └── Truncate.spec.js.snap
│ └── Util
│ │ ├── WalletName.spec.js
│ │ └── __snapshots__
│ │ └── WalletName.spec.js.snap
│ ├── lnd
│ ├── lnd-config.spec.js
│ └── neutrino.spec.js
│ ├── reducers
│ ├── __snapshots__
│ │ ├── account.spec.js.snap
│ │ ├── activity.spec.js.snap
│ │ ├── address.spec.js.snap
│ │ ├── app.spec.js.snap
│ │ ├── autopay.spec.js.snap
│ │ ├── autopilot.spec.js.snap
│ │ ├── backup.spec.js.snap
│ │ ├── balance.spec.js.snap
│ │ ├── channels.spec.js.snap
│ │ ├── contactsform.spec.js.snap
│ │ ├── info.spec.js.snap
│ │ ├── invoice.spec.js.snap
│ │ ├── lnd.spec.js.snap
│ │ ├── modal.spec.js.snap
│ │ ├── network.spec.js.snap
│ │ ├── neutrino.spec.js.snap
│ │ ├── notification.spec.js.snap
│ │ ├── onboarding.spec.js.snap
│ │ ├── pay.spec.js.snap
│ │ ├── payment.spec.js.snap
│ │ ├── peers.spec.js.snap
│ │ ├── settings.spec.js.snap
│ │ ├── settingsmenu.spec.js.snap
│ │ ├── ticker.spec.js.snap
│ │ ├── transaction.spec.js.snap
│ │ └── wallet.spec.js.snap
│ ├── account.spec.js
│ ├── activity.spec.js
│ ├── address.spec.js
│ ├── app.spec.js
│ ├── autopay.spec.js
│ ├── autopilot.spec.js
│ ├── backup.spec.js
│ ├── balance.spec.js
│ ├── channels.spec.js
│ ├── contactsform.spec.js
│ ├── info.spec.js
│ ├── invoice.spec.js
│ ├── lnd.spec.js
│ ├── modal.spec.js
│ ├── network.spec.js
│ ├── neutrino.spec.js
│ ├── notification.spec.js
│ ├── onboarding.spec.js
│ ├── pay.spec.js
│ ├── payment.spec.js
│ ├── peers.spec.js
│ ├── settings.spec.js
│ ├── settingsmenu.spec.js
│ ├── ticker.spec.js
│ ├── transaction.spec.js
│ └── wallet.spec.js
│ └── utils
│ ├── btc.spec.js
│ ├── byteutils.spec.js
│ ├── chainify.spec.js
│ ├── crypto.spec.js
│ ├── debouncedFuncQueue.spec.js
│ ├── difference.spec.js
│ ├── events.spec.js
│ ├── isStableVersion.spec.js
│ ├── isSubDir.spec.js
│ ├── lnurl.spec.js
│ ├── pagination.test.js
│ ├── parseSeed.spec.js
│ ├── parseUrlFragments.spec.js
│ ├── rateProvider.spec.js
│ ├── scheduler.spec.js
│ ├── secureStorage.spec.js
│ ├── sha256.spec.js
│ ├── singleton.spec.js
│ ├── splitHostname.spec.js
│ ├── userFriendlyErrors.spec.js
│ └── validateHost.spec.js
├── translations
├── af-ZA.json
├── ar-SA.json
├── bg-BG.json
├── ca-ES.json
├── cs-CZ.json
├── da-DK.json
├── de-DE.json
├── el-GR.json
├── en.json
├── es-ES.json
├── fi-FI.json
├── fr-FR.json
├── ga-IE.json
├── he-IL.json
├── hi-IN.json
├── hr-HR.json
├── hu-HU.json
├── it-IT.json
├── ja-JP.json
├── ko-KR.json
├── nl-NL.json
├── no-NO.json
├── pl-PL.json
├── pt-BR.json
├── pt-PT.json
├── ro-RO.json
├── ru-RU.json
├── sr-SP.json
├── sv-SE.json
├── tr-TR.json
├── uk-UA.json
├── vi-VN.json
├── zh-CN.json
└── zh-TW.json
├── tsconfig.json
├── utils
├── .eslintrc.js
├── api.js
├── appRootPath.js
├── blockExplorer.js
├── btc.js
├── btcpayserver.js
├── byteutils.js
├── chainify.js
├── coin.js
├── connectionString.js
├── createReducer.js
├── crypto.js
├── db.js
├── debouncedFuncQueue.js
├── delay.js
├── difference.js
├── dirExists.js
├── error.js
├── events
│ ├── eventDefinition.js
│ ├── events.js
│ └── index.js
├── featureFlag.js
├── fee.js
├── fetchBlockHeight.js
├── fileExists.js
├── genId.js
├── getDisplayName.js
├── getLndListen.js
├── getPackageDetails.js
├── github.js
├── isBase64url.js
├── isObject.js
├── isStableVersion.js
├── isSubDir.js
├── lndBinaryName.js
├── lndBinaryPath.js
├── lndConfig.js
├── lndGrpcProtoDir.js
├── lnurl
│ └── index.js
├── localWallets.js
├── log.js
├── notifications.js
├── pagination.js
├── parseSeed.js
├── parseUrlFragments.js
├── promiseTimeout.js
├── promisifiedCall.js
├── rateProvider
│ ├── index.js
│ ├── providers.js
│ ├── requestTicker.js
│ └── requestTickerWithFallback.js
├── sanitize.js
├── scheduler.js
├── secureStorage.js
├── sha256.js
├── singleton.js
├── splitHostname.js
├── streamify.js
├── truncate.js
├── truncateNodePubkey.js
├── userFriendlyErrors.js
├── validateHost.js
└── waitForIpc.js
├── webpack
├── dev
│ ├── common
│ │ ├── devserver.js
│ │ └── plugins.js
│ ├── main.config.js
│ ├── preload.config.js
│ ├── renderer.config.js
│ └── workers.config.js
├── prod
│ ├── common
│ │ └── plugins.js
│ ├── main.config.js
│ ├── preload.config.js
│ ├── renderer.config.js
│ └── workers.config.js
├── webpack.config.base.js
├── webpack.config.dll.js
├── webpack.config.e2e.js
├── webpack.config.eslint.js
├── webpack.config.main.js
├── webpack.config.prod.js
└── webpack.config.renderer.js
└── yarn.lock
/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "plugins": [
3 | [
4 | "module-resolver",
5 | {
6 | "root": ["./renderer"],
7 | "alias": {
8 | "^@zap/(.+)": "./\\1"
9 | }
10 | }
11 | ]
12 | ]
13 | }
14 |
--------------------------------------------------------------------------------
/.commitlintrc:
--------------------------------------------------------------------------------
1 | {
2 | "extends": ["@commitlint/config-conventional"]
3 | }
4 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | indent_style = space
5 | indent_size = 2
6 | end_of_line = lf
7 | charset = utf-8
8 | trim_trailing_whitespace = true
9 | insert_final_newline = true
10 |
11 | [*.{json,js,jsx,html,css,yml}]
12 | indent_style = space
13 | indent_size = 2
14 |
15 | [.eslintrc]
16 | indent_style = space
17 | indent_size = 2
18 |
19 | [*.md]
20 | trim_trailing_whitespace = false
21 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | * text eol=lf
2 | *.png binary
3 | *.ico binary
4 | *.icns binary
5 | *.woff2 binary
6 | *.macaroon binary
7 | resources/bin/* binary
8 | resources/bin/* -text
9 |
--------------------------------------------------------------------------------
/.huskyrc:
--------------------------------------------------------------------------------
1 | {
2 | "hooks": {
3 | "commit-msg": "commitlint --env HUSKY_GIT_PARAMS",
4 | "pre-push": "npm run lint"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/.lintstagedrc:
--------------------------------------------------------------------------------
1 | {
2 | "linters": {
3 | "*.{js,json,md}": ["npm run lint-fix-base", "git add"],
4 | "*.js": ["npm run lint-styles-fix-base", "git add"]
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/.nvmrc:
--------------------------------------------------------------------------------
1 | 16
2 |
--------------------------------------------------------------------------------
/.prettierignore:
--------------------------------------------------------------------------------
1 | # App source
2 | package.json
3 | package-lock.json
4 | .git
5 | .babelrc
6 | node_modules
7 | coverage
8 |
9 | # App packaged
10 | release
11 | dist
12 | dll
13 |
14 | # Storybook
15 | storybook-static
16 |
--------------------------------------------------------------------------------
/.prettierrc:
--------------------------------------------------------------------------------
1 | "@ln-zap/prettier-config"
2 |
--------------------------------------------------------------------------------
/.renovaterc.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": ["config:js-app", "group:linters", "group:definitelyTyped"],
3 | "baseBranches": ["next"],
4 | "labels": ["dependencies"]
5 | }
6 |
--------------------------------------------------------------------------------
/.storybook/main.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | stories: ['../**/*.stories.js'],
3 | addons: [
4 | '@storybook/addon-actions',
5 | '@storybook/addon-links',
6 | '@storybook/addon-knobs',
7 | 'storybook-addon-intl',
8 | 'storybook-styled-components',
9 | ],
10 | }
11 |
--------------------------------------------------------------------------------
/.storybook/manager.js:
--------------------------------------------------------------------------------
1 | import { addons } from '@storybook/addons'
2 | import { themes } from '@storybook/theming'
3 |
4 | addons.setConfig({
5 | brandTitle: 'Zap',
6 | brandUrl: 'https://ln-zap.github.io/zap-desktop',
7 | theme: themes.dark,
8 | hierarchySeparator: /\./,
9 | })
10 |
--------------------------------------------------------------------------------
/.stylelintignore:
--------------------------------------------------------------------------------
1 | # Storybook
2 | storybook-static
3 |
--------------------------------------------------------------------------------
/.stylelintrc:
--------------------------------------------------------------------------------
1 | {
2 | "processors": [
3 | ["stylelint-processor-styled-components", {
4 | "parserPlugins": [
5 | "jsx",
6 | "classProperties",
7 | "exportDefaultFrom"
8 | ]
9 | }]
10 | ],
11 | "extends": [
12 | "stylelint-config-recommended",
13 | "stylelint-config-styled-components"
14 | ],
15 | "rules": {
16 | "no-descending-specificity": null,
17 | "no-empty-source": null
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/.svgrrc:
--------------------------------------------------------------------------------
1 | {
2 | "icon": true,
3 | "replaceAttrValues": {
4 | "#FFF": "currentColor",
5 | "#FFFFFF": "currentColor",
6 | "#F5A623": "currentColor",
7 | "#010002": "currentColor",
8 | "#E63939": "currentColor",
9 | "#39E673": "currentColor"
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/.testcafe-electron-rc:
--------------------------------------------------------------------------------
1 | {
2 | "mainWindowUrl": "./dist/index.html",
3 | "appPath": "."
4 | }
5 |
--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "javascript.validate.enable": true,
3 | "search.exclude": {
4 | ".git": true,
5 | ".eslintcache": true,
6 | "bower_components": true,
7 | "dist": true,
8 | "dll": true,
9 | "release": true,
10 | "node_modules": true,
11 | "npm-debug.log.*": true,
12 | "test/**/__snapshots__": true,
13 | "yarn.lock": true
14 | },
15 | "editor.codeActionsOnSave": {
16 | "source.fixAll.eslint": true
17 | },
18 | "eslint.validate": ["javascript"]
19 | }
20 |
--------------------------------------------------------------------------------
/config/development.js:
--------------------------------------------------------------------------------
1 | module.exports = {}
2 |
--------------------------------------------------------------------------------
/config/e2e.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | secureStorage: {
3 | namespace: 'ln-zap-e2e',
4 | },
5 | }
6 |
--------------------------------------------------------------------------------
/config/production.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | lnd: {
3 | rpc: {
4 | host: 'localhost',
5 | port: 11009,
6 | },
7 | rest: {
8 | host: 'localhost',
9 | port: 8180,
10 | },
11 | p2p: {
12 | host: '', // disable p2p interface
13 | port: 9735,
14 | },
15 | },
16 | }
17 |
--------------------------------------------------------------------------------
/config/storybook.js:
--------------------------------------------------------------------------------
1 | module.exports = {}
2 |
--------------------------------------------------------------------------------
/config/test.js:
--------------------------------------------------------------------------------
1 | module.exports = {}
2 |
--------------------------------------------------------------------------------
/crowdin.yml:
--------------------------------------------------------------------------------
1 | commit_message: '[ci skip]'
2 | files:
3 | - source: /translations/en.json
4 | translation: /translations/%locale%.json
5 | update_option: update_without_changes
6 |
--------------------------------------------------------------------------------
/electron/about/preload.js:
--------------------------------------------------------------------------------
1 | window.ipcRenderer = require('electron').ipcRenderer
2 |
--------------------------------------------------------------------------------
/electron/lnurl/index.js:
--------------------------------------------------------------------------------
1 | import lnurlService from './service'
2 |
3 | export default lnurlService
4 |
--------------------------------------------------------------------------------
/electron/migrations/purge-local-wallets.js:
--------------------------------------------------------------------------------
1 | import config from 'config'
2 | import { purgeAllLocalWallets } from '@zap/utils/localWallets'
3 |
4 | /**
5 | * migration - Migration script to purge all local wallets, causing a resync of the blockchain data.
6 | *
7 | * @returns {undefined}
8 | */
9 | const migration = async () => {
10 | const { chains, networks } = config
11 | await purgeAllLocalWallets(chains, networks)
12 | }
13 |
14 | export default migration
15 |
--------------------------------------------------------------------------------
/electron/secureStorage/index.js:
--------------------------------------------------------------------------------
1 | import storage from './service'
2 |
3 | export createCRUD from './ipcCRUD'
4 | export default storage
5 |
--------------------------------------------------------------------------------
/electron/secureStorage/service.js:
--------------------------------------------------------------------------------
1 | import config from 'config'
2 | import createStorage from '@zap/utils/secureStorage'
3 | import createCRUD from './ipcCRUD'
4 |
5 | /**
6 | * createStorageService - Create secure storage service.
7 | *
8 | * @param {object} mainWindow Browser window
9 | */
10 | export default function createStorageService(mainWindow) {
11 | const storage = createStorage(config.secureStorage.namespace)
12 | // helper func to send messages to the renderer process
13 | const send = (msg, params) => mainWindow.webContents.send(msg, params)
14 | createCRUD(storage, 'app-password', 'password', send)
15 | }
16 |
--------------------------------------------------------------------------------
/fonts/roboto-light.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LN-Zap/zap-desktop/d44d45c6050538a6e4db95b7f69facf210b8db95/fonts/roboto-light.woff2
--------------------------------------------------------------------------------
/fonts/roboto-regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LN-Zap/zap-desktop/d44d45c6050538a6e4db95b7f69facf210b8db95/fonts/roboto-regular.woff2
--------------------------------------------------------------------------------
/icons/angle-down.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/icons/angle-left.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/icons/angle-right.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/icons/angle-up.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/icons/arrow-down.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/icons/arrow-left.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/icons/arrow-up.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/icons/autopay-check.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/icons/backup-local.svg:
--------------------------------------------------------------------------------
1 |
8 |
--------------------------------------------------------------------------------
/icons/bolt-onboarding.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/icons/chain-link.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/icons/check-circle.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/icons/check.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/icons/circle.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/icons/clock.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/icons/close.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/icons/cloud-lightning.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/icons/connect-onboarding.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/icons/copy.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/icons/delete.svg:
--------------------------------------------------------------------------------
1 |
10 |
--------------------------------------------------------------------------------
/icons/download.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/icons/error.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/icons/external-link.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/icons/eye-off.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/icons/eye.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/icons/filter.svg:
--------------------------------------------------------------------------------
1 |
9 |
--------------------------------------------------------------------------------
/icons/import-onboarding.svg:
--------------------------------------------------------------------------------
1 |
8 |
--------------------------------------------------------------------------------
/icons/layout-cards.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/icons/layout-list.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/icons/lightning-bolt.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/icons/lightning-channel.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/icons/lightning.svg:
--------------------------------------------------------------------------------
1 |
13 |
--------------------------------------------------------------------------------
/icons/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LN-Zap/zap-desktop/d44d45c6050538a6e4db95b7f69facf210b8db95/icons/logo.png
--------------------------------------------------------------------------------
/icons/logout.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/icons/medium.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/icons/minus-circle.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/icons/padlock.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/icons/plus-circle.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/icons/plus-onboarding.svg:
--------------------------------------------------------------------------------
1 |
9 |
--------------------------------------------------------------------------------
/icons/plus.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/icons/receive.svg:
--------------------------------------------------------------------------------
1 |
14 |
--------------------------------------------------------------------------------
/icons/refresh.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/icons/search.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/icons/send.svg:
--------------------------------------------------------------------------------
1 |
14 |
--------------------------------------------------------------------------------
/icons/spinner.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/icons/success.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/icons/user-circle.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/icons/user.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/icons/warning.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/icons/x.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/icons/zap-solid.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/icons/zap.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/renderer/app.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Zap
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/renderer/components/Activity/ActivityActions/index.js:
--------------------------------------------------------------------------------
1 | import ActivityActions from './ActivityActions'
2 |
3 | export default ActivityActions
4 | export ActivityFilter from './ActivityFilter'
5 | export ActivityRefresh from './ActivityRefresh'
6 | export ActivitySearch from './ActivitySearch'
7 |
--------------------------------------------------------------------------------
/renderer/components/Activity/ActivityActions/messages.js:
--------------------------------------------------------------------------------
1 | import { defineMessages } from 'react-intl'
2 |
3 | /* eslint-disable max-len */
4 | export default defineMessages({
5 | search_placeholder: 'Search Activity',
6 | refresh_button_hint: 'Refresh activity list',
7 | actiity_filter_sent: 'Sent',
8 | actiity_filter_received: 'Received',
9 | actiity_filter_pending: 'Pending',
10 | actiity_filter_expired: 'Expired',
11 | actiity_filter_internal: 'Internal',
12 | activity_filter_hint: 'Activity list filters',
13 | })
14 |
--------------------------------------------------------------------------------
/renderer/components/Activity/ActivityModal/index.js:
--------------------------------------------------------------------------------
1 | export ActivityModal from './ActivityModal'
2 |
--------------------------------------------------------------------------------
/renderer/components/Activity/ErrorLink.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import styled from 'styled-components'
3 | import { Message } from 'components/UI'
4 |
5 | const ErrorLinkContainer = styled(Message)`
6 | &:hover {
7 | cursor: pointer;
8 | }
9 | `
10 |
11 | const ErrorLink = props =>
12 |
13 | export default ErrorLink
14 |
--------------------------------------------------------------------------------
/renderer/components/Activity/Invoice/index.js:
--------------------------------------------------------------------------------
1 | import Invoice from './Invoice'
2 |
3 | export default Invoice
4 |
--------------------------------------------------------------------------------
/renderer/components/Activity/Invoice/messages.js:
--------------------------------------------------------------------------------
1 | import { defineMessages } from 'react-intl'
2 |
3 | /* eslint-disable max-len */
4 | export default defineMessages({
5 | received: 'Received payment',
6 | requested: 'Requested payment',
7 | type_paid: 'Lightning invoice (paid)',
8 | type_unpaid: 'Lightning invoice (unpaid)',
9 | amount: 'Invoice amount',
10 | })
11 |
--------------------------------------------------------------------------------
/renderer/components/Activity/InvoiceModal/index.js:
--------------------------------------------------------------------------------
1 | export InvoiceModal from './InvoiceModal'
2 |
--------------------------------------------------------------------------------
/renderer/components/Activity/InvoiceModal/messages.js:
--------------------------------------------------------------------------------
1 | import { defineMessages } from 'react-intl'
2 |
3 | /* eslint-disable max-len */
4 | export default defineMessages({
5 | title_received: 'Received',
6 | title_requested: 'Requested',
7 | subtitle: 'Lightning Payment',
8 | pay_req: 'Payment Request',
9 | memo: 'Memo',
10 | amount: 'Amount',
11 | date_requested: 'Date Requested',
12 | status: 'Status',
13 | not_paid: 'Not Paid',
14 | paid: 'Paid',
15 | current_value: 'Current value',
16 | })
17 |
--------------------------------------------------------------------------------
/renderer/components/Activity/List.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { List } from 'react-virtualized'
3 | import { space } from 'styled-system'
4 | import styled from 'styled-components'
5 |
6 | const ROW_HEIGHT = 53
7 |
8 | const StyledList = styled(List)`
9 | ${space}
10 | outline: none;
11 | padding-left: 12px;
12 | `
13 |
14 | const ActivityList = React.forwardRef((props, ref) => (
15 |
16 | ))
17 |
18 | ActivityList.displayName = 'ActivityList'
19 |
20 | export default ActivityList
21 |
--------------------------------------------------------------------------------
/renderer/components/Activity/Payment/index.js:
--------------------------------------------------------------------------------
1 | import Payment from './Payment'
2 |
3 | export default Payment
4 |
--------------------------------------------------------------------------------
/renderer/components/Activity/Payment/messages.js:
--------------------------------------------------------------------------------
1 | import { defineMessages } from 'react-intl'
2 |
3 | /* eslint-disable max-len */
4 | export default defineMessages({
5 | amount: 'Payment amount',
6 | fee: 'Payment fee',
7 | type: 'Lightning payment',
8 | status_processing: 'Processing your payment…',
9 | status_success: 'Your payment was successful.',
10 | status_error: 'There was a problem sending your payment. Click for more details.',
11 | })
12 |
--------------------------------------------------------------------------------
/renderer/components/Activity/PaymentModal/index.js:
--------------------------------------------------------------------------------
1 | export PaymentModal from './PaymentModal'
2 | export Route from './Route'
3 | export Htlc from './Htlc'
4 | export HtlcHops from './HtlcHops'
5 |
--------------------------------------------------------------------------------
/renderer/components/Activity/PaymentModal/messages.js:
--------------------------------------------------------------------------------
1 | import { defineMessages } from 'react-intl'
2 |
3 | export default defineMessages({
4 | title_sent: 'Sent',
5 | subtitle: 'Lightning Payment',
6 | amount: 'Amount',
7 | destination: 'Destination',
8 | date_sent: 'Date sent',
9 | current_value: 'Current value',
10 | preimage: 'Payment preimage',
11 | memo: 'Memo',
12 | htlc_title: 'Routing',
13 | htlc_hop_fee: '{hopFee} {cryptoUnitName} fee',
14 | htlc_hop_no_fee: 'No fee',
15 | })
16 |
--------------------------------------------------------------------------------
/renderer/components/Activity/Transaction/index.js:
--------------------------------------------------------------------------------
1 | import Transaction from './Transaction'
2 |
3 | export default Transaction
4 |
--------------------------------------------------------------------------------
/renderer/components/Activity/TransactionModal/index.js:
--------------------------------------------------------------------------------
1 | export TransactionModal from './TransactionModal'
2 |
--------------------------------------------------------------------------------
/renderer/components/Activity/index.js:
--------------------------------------------------------------------------------
1 | import Activity from './Activity'
2 |
3 | export default Activity
4 |
--------------------------------------------------------------------------------
/renderer/components/Activity/messages.js:
--------------------------------------------------------------------------------
1 | import { defineMessages } from 'react-intl'
2 |
3 | /* eslint-disable max-len */
4 | export default defineMessages({
5 | all: 'All',
6 | sent: 'Sent',
7 | requested: 'Received',
8 | pending: 'Pending',
9 | expired: 'Expired',
10 | internal: 'Internal',
11 | error_dialog_header: 'Transaction error details',
12 | error_dialog_copy: 'Copy',
13 | error_copied: 'Error details have been copied to your clipboard',
14 | })
15 |
--------------------------------------------------------------------------------
/renderer/components/App/index.js:
--------------------------------------------------------------------------------
1 | import App from './App'
2 |
3 | export default App
4 |
--------------------------------------------------------------------------------
/renderer/components/Autopay/AutopayActions.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { Box } from 'rebass/styled-components'
3 | import AutopaySearch from 'containers/Autopay/AutopaySearch'
4 |
5 | const AutopayActions = props => (
6 |
7 |
8 |
9 | )
10 |
11 | export default AutopayActions
12 |
--------------------------------------------------------------------------------
/renderer/components/Autopay/AutopayHeader.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { Box } from 'rebass/styled-components'
3 | import AutopayHeading from './AutopayHeading'
4 |
5 | const AutopayHeader = props => (
6 |
7 |
8 |
9 | )
10 |
11 | export default AutopayHeader
12 |
--------------------------------------------------------------------------------
/renderer/components/Autopay/AutopaySearchNoResults.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { FormattedMessage } from 'react-intl'
3 | import { Text } from 'components/UI'
4 | import messages from './messages'
5 |
6 | const AutopaySearchNoResults = props => (
7 |
8 |
9 |
10 | )
11 |
12 | export default AutopaySearchNoResults
13 |
--------------------------------------------------------------------------------
/renderer/components/Autopay/index.js:
--------------------------------------------------------------------------------
1 | import Autopay from './Autopay'
2 |
3 | export default Autopay
4 | export AutopayActions from './AutopayActions'
5 | export AutopayCardView from './AutopayCardView'
6 | export AutopayHeader from './AutopayHeader'
7 | export AutopayHeading from './AutopayHeading'
8 | export AutopayList from './AutopayList'
9 | export AutopaySearch from './AutopaySearch'
10 | export AutopaySearchNoResults from './AutopaySearchNoResults'
11 |
--------------------------------------------------------------------------------
/renderer/components/Channels/ChannelCreateHeader.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { FormattedMessage } from 'react-intl'
3 | import { Box } from 'rebass/styled-components'
4 | import { Header } from 'components/UI'
5 | import LightningChannel from 'components/Icon/LightningChannel'
6 | import messages from './messages'
7 |
8 | const ChannelCreateHeader = props => (
9 |
10 | }
12 | title={}
13 | />
14 |
15 | )
16 |
17 | export default ChannelCreateHeader
18 |
--------------------------------------------------------------------------------
/renderer/components/Channels/ChannelMoreButton.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { FormattedMessage } from 'react-intl'
3 | import { Button } from 'components/UI'
4 | import messages from './messages'
5 |
6 | const ChannelMoreButton = props => (
7 |
10 | )
11 | export default ChannelMoreButton
12 |
--------------------------------------------------------------------------------
/renderer/components/Channels/ChannelsMenu/index.js:
--------------------------------------------------------------------------------
1 | import ChannelsMenu from './ChannelsMenu'
2 |
3 | export default ChannelsMenu
4 |
--------------------------------------------------------------------------------
/renderer/components/Channels/ChannelsMenu/messages.js:
--------------------------------------------------------------------------------
1 | import { defineMessages } from 'react-intl'
2 |
3 | /* eslint-disable max-len */
4 | export default defineMessages({
5 | title: 'Channels',
6 | menu_item_channels_title: 'Manage',
7 | menu_item_channels_description: 'View your channels',
8 | menu_item_channel_create_title: 'Create',
9 | menu_item_channel_create_description: 'Open new channels',
10 | summary_row_lightning_title: 'Lightning',
11 | summary_row_pending_title: 'Pending',
12 | summary_row_onchain_title: 'On-Chain',
13 | })
14 |
--------------------------------------------------------------------------------
/renderer/components/Channels/constants.js:
--------------------------------------------------------------------------------
1 | export const TRANSACTION_SPEED_SLOW = 'TRANSACTION_SPEED_SLOW'
2 | export const TRANSACTION_SPEED_MEDIUM = 'TRANSACTION_SPEED_MEDIUM'
3 | export const TRANSACTION_SPEED_FAST = 'TRANSACTION_SPEED_FAST'
4 | export const CHANNEL_LIST_VIEW_MODE_SUMMARY = 'summary'
5 | export const CHANNEL_LIST_VIEW_MODE_CARD = 'card'
6 | export const CHANNEL_DATA_VIEW_MODE_BASIC = 'CHANNEL_DATA_VIEW_MODE_BASIC'
7 | export const CHANNEL_DATA_VIEW_MODE_FULL = 'CHANNEL_DATA_VIEW_MODE_FULL'
8 |
--------------------------------------------------------------------------------
/renderer/components/Dialog/index.js:
--------------------------------------------------------------------------------
1 | export DialogAppCrashed from './DialogAppCrashed'
2 | export DialogLndCrashed from './DialogLndCrashed'
3 |
--------------------------------------------------------------------------------
/renderer/components/Form/OpenDialogButton.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { Box } from 'rebass/styled-components'
3 | import Copy from 'components/Icon/FolderOpen'
4 | import { Button } from 'components/UI'
5 |
6 | const OpenDialogButton = props => (
7 |
20 | )
21 |
22 | export default OpenDialogButton
23 |
--------------------------------------------------------------------------------
/renderer/components/Form/PositiveIntegerField.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import IntegerInput from './IntegerInput'
3 |
4 | const PositiveIntegerField = props => (
5 |
18 | )
19 |
20 | export default PositiveIntegerField
21 |
--------------------------------------------------------------------------------
/renderer/components/Form/SearchInput.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import styled from 'styled-components'
3 | import { themeGet } from '@styled-system/theme-get'
4 | import Input from './Input'
5 | import Search from 'components/Icon/Search'
6 |
7 | const Icon = styled(Search)`
8 | cursor: pointer;
9 | height: 16px;
10 | width: 16px;
11 | position: absolute;
12 | left: 16px;
13 | user-select: none;
14 | color: ${themeGet('colors.gray')};
15 | `
16 |
17 | const SearchInput = props => {
18 | return } />
19 | }
20 |
21 | export default SearchInput
22 |
--------------------------------------------------------------------------------
/renderer/components/Form/constants.js:
--------------------------------------------------------------------------------
1 | export const TRANSACTION_SPEED_SLOW = 'TRANSACTION_SPEED_SLOW'
2 | export const TRANSACTION_SPEED_MEDIUM = 'TRANSACTION_SPEED_MEDIUM'
3 | export const TRANSACTION_SPEED_FAST = 'TRANSACTION_SPEED_FAST'
4 |
--------------------------------------------------------------------------------
/renderer/components/GlobalNotification/index.js:
--------------------------------------------------------------------------------
1 | import GlobalNotification from './GlobalNotification'
2 |
3 | export default GlobalNotification
4 |
--------------------------------------------------------------------------------
/renderer/components/Home/WalletHeader.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import PropTypes from 'prop-types'
3 | import { Textfit } from 'react-textfit'
4 | import { Heading } from 'components/UI'
5 | import { WalletName } from 'components/Util'
6 |
7 | const WalletHeader = ({ wallet }) => (
8 |
9 |
10 |
11 |
12 |
13 | )
14 |
15 | WalletHeader.propTypes = {
16 | wallet: PropTypes.object.isRequired,
17 | }
18 |
19 | export default WalletHeader
20 |
--------------------------------------------------------------------------------
/renderer/components/Home/index.js:
--------------------------------------------------------------------------------
1 | import Home from './Home'
2 |
3 | export default Home
4 | export CreateWalletButton from './CreateWalletButton'
5 | export NoWallets from './NoWallets'
6 | export WalletsMenu from './WalletsMenu'
7 | export WalletLauncher from './WalletLauncher'
8 | export WalletUnlocker from './WalletUnlocker'
9 | export WalletSettingsFormLocal from './WalletSettingsFormLocal'
10 | export WalletSettingsFormRemote from './WalletSettingsFormRemote'
11 | export WalletHeader from './WalletHeader'
12 | export DeleteWalletDialog from './DeleteWalletDialog'
13 |
--------------------------------------------------------------------------------
/renderer/components/Icon/.eslintrc:
--------------------------------------------------------------------------------
1 | {
2 | "rules": {
3 | "max-len": 0
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/renderer/components/Icon/AngleDown.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | const SvgAngleDown = props => (
4 |
7 | )
8 |
9 | export default SvgAngleDown
10 |
--------------------------------------------------------------------------------
/renderer/components/Icon/AngleLeft.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | const SvgAngleLeft = props => (
4 |
7 | )
8 |
9 | export default SvgAngleLeft
10 |
--------------------------------------------------------------------------------
/renderer/components/Icon/AngleRight.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | const SvgAngleRight = props => (
4 |
7 | )
8 |
9 | export default SvgAngleRight
10 |
--------------------------------------------------------------------------------
/renderer/components/Icon/AngleUp.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | const SvgAngleUp = props => (
4 |
7 | )
8 |
9 | export default SvgAngleUp
10 |
--------------------------------------------------------------------------------
/renderer/components/Icon/ArrowDown.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | const SvgArrowDown = props => (
4 |
14 | )
15 |
16 | export default SvgArrowDown
17 |
--------------------------------------------------------------------------------
/renderer/components/Icon/ArrowLeft.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | const SvgArrowLeft = props => (
4 |
14 | )
15 |
16 | export default SvgArrowLeft
17 |
--------------------------------------------------------------------------------
/renderer/components/Icon/ArrowRight.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | const SvgArrowRight = props => (
4 |
15 | )
16 |
17 | export default SvgArrowRight
18 |
--------------------------------------------------------------------------------
/renderer/components/Icon/ArrowUp.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | const SvgArrowUp = props => (
4 |
14 | )
15 |
16 | export default SvgArrowUp
17 |
--------------------------------------------------------------------------------
/renderer/components/Icon/AutopayCheck.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | const SvgAutopayCheck = props => (
4 |
20 | )
21 |
22 | export default SvgAutopayCheck
23 |
--------------------------------------------------------------------------------
/renderer/components/Icon/BackupLocal.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | const SvgBackupLocal = props => (
4 |
11 | )
12 |
13 | export default SvgBackupLocal
14 |
--------------------------------------------------------------------------------
/renderer/components/Icon/BigArrowRight.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | const SvgBigArrowRight = props => (
4 |
15 | )
16 |
17 | export default SvgBigArrowRight
18 |
--------------------------------------------------------------------------------
/renderer/components/Icon/BoltOnboarding.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | const SvgBoltOnboarding = props => (
4 |
10 | )
11 |
12 | export default SvgBoltOnboarding
13 |
--------------------------------------------------------------------------------
/renderer/components/Icon/ChainLink.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | const SvgChainLink = props => (
4 |
19 | )
20 |
21 | export default SvgChainLink
22 |
--------------------------------------------------------------------------------
/renderer/components/Icon/Check.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | const SvgCheck = props => (
4 |
18 | )
19 |
20 | export default SvgCheck
21 |
--------------------------------------------------------------------------------
/renderer/components/Icon/CheckCircle.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | const SvgCheckCircle = props => (
4 |
19 | )
20 |
21 | export default SvgCheckCircle
22 |
--------------------------------------------------------------------------------
/renderer/components/Icon/Circle.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | const SvgCircle = props => (
4 |
7 | )
8 |
9 | export default SvgCircle
10 |
--------------------------------------------------------------------------------
/renderer/components/Icon/Clock.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | const SvgClock = props => (
4 |
19 | )
20 |
21 | export default SvgClock
22 |
--------------------------------------------------------------------------------
/renderer/components/Icon/Close.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | const SvgClose = props => (
4 |
10 | )
11 |
12 | export default SvgClose
13 |
--------------------------------------------------------------------------------
/renderer/components/Icon/CloudLightning.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | const SvgCloudLightning = props => (
4 |
19 | )
20 |
21 | export default SvgCloudLightning
22 |
--------------------------------------------------------------------------------
/renderer/components/Icon/ConnectOnboarding.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | const SvgConnectOnboarding = props => (
4 |
10 | )
11 |
12 | export default SvgConnectOnboarding
13 |
--------------------------------------------------------------------------------
/renderer/components/Icon/Copy.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | const SvgCopy = props => (
4 |
19 | )
20 |
21 | export default SvgCopy
22 |
--------------------------------------------------------------------------------
/renderer/components/Icon/Error.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | const SvgError = props => (
4 |
11 | )
12 |
13 | export default SvgError
14 |
--------------------------------------------------------------------------------
/renderer/components/Icon/ExternalLink.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | const SvgExternalLink = props => (
4 |
10 | )
11 |
12 | export default SvgExternalLink
13 |
--------------------------------------------------------------------------------
/renderer/components/Icon/Eye.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | const SvgEye = props => (
4 |
19 | )
20 |
21 | export default SvgEye
22 |
--------------------------------------------------------------------------------
/renderer/components/Icon/ImportOnboarding.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | const SvgImportOnboarding = props => (
4 |
14 | )
15 |
16 | export default SvgImportOnboarding
17 |
--------------------------------------------------------------------------------
/renderer/components/Icon/LayoutCards.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | const SvgLayoutCards = props => (
4 |
12 | )
13 |
14 | export default SvgLayoutCards
15 |
--------------------------------------------------------------------------------
/renderer/components/Icon/LayoutList.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | const SvgLayoutList = props => (
4 |
12 | )
13 |
14 | export default SvgLayoutList
15 |
--------------------------------------------------------------------------------
/renderer/components/Icon/LightningBolt.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | const SvgLightningBolt = props => (
4 |
14 | )
15 |
16 | export default SvgLightningBolt
17 |
--------------------------------------------------------------------------------
/renderer/components/Icon/LightningChannel.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | const SvgLightningChannel = props => (
4 |
13 | )
14 |
15 | export default SvgLightningChannel
16 |
--------------------------------------------------------------------------------
/renderer/components/Icon/MinusCircle.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | const SvgMinusCircle = props => (
4 |
15 | )
16 |
17 | export default SvgMinusCircle
18 |
--------------------------------------------------------------------------------
/renderer/components/Icon/Plus.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | const SvgPlus = props => (
4 |
18 | )
19 |
20 | export default SvgPlus
21 |
--------------------------------------------------------------------------------
/renderer/components/Icon/PlusCircle.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | const SvgPlusCircle = props => (
4 |
15 | )
16 |
17 | export default SvgPlusCircle
18 |
--------------------------------------------------------------------------------
/renderer/components/Icon/PlusOnboarding.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | const SvgPlusOnboarding = props => (
4 |
14 | )
15 |
16 | export default SvgPlusOnboarding
17 |
--------------------------------------------------------------------------------
/renderer/components/Icon/Search.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | const SvgSearch = props => (
4 |
19 | )
20 |
21 | export default SvgSearch
22 |
--------------------------------------------------------------------------------
/renderer/components/Icon/Spinner.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | const SvgSpinner = props => (
4 |
13 | )
14 |
15 | export default SvgSpinner
16 |
--------------------------------------------------------------------------------
/renderer/components/Icon/Success.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | const SvgSuccess = props => (
4 |
13 | )
14 |
15 | export default SvgSuccess
16 |
--------------------------------------------------------------------------------
/renderer/components/Icon/User.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | const SvgUser = props => (
4 |
19 | )
20 |
21 | export default SvgUser
22 |
--------------------------------------------------------------------------------
/renderer/components/Icon/UserCircle.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | const SvgUserCircle = props => (
4 |
17 | )
18 |
19 | export default SvgUserCircle
20 |
--------------------------------------------------------------------------------
/renderer/components/Icon/Warning.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | const SvgWarning = props => (
4 |
13 | )
14 |
15 | export default SvgWarning
16 |
--------------------------------------------------------------------------------
/renderer/components/Icon/X.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | const SvgX = props => (
4 |
21 | )
22 |
23 | export default SvgX
24 |
--------------------------------------------------------------------------------
/renderer/components/Icon/Zap.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | const SvgZap = props => (
4 |
11 | )
12 |
13 | export default SvgZap
14 |
--------------------------------------------------------------------------------
/renderer/components/Icon/ZapSolid.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | const SvgZapSolid = props => (
4 |
11 | )
12 |
13 | export default SvgZapSolid
14 |
--------------------------------------------------------------------------------
/renderer/components/Lnurl/index.js:
--------------------------------------------------------------------------------
1 | export LnurlAuthPrompt from './LnurlAuthPrompt'
2 | export LnurlChannelPrompt from './LnurlChannelPrompt'
3 | export LnurlWithdrawPrompt from './LnurlWithdrawPrompt'
4 |
--------------------------------------------------------------------------------
/renderer/components/Loading/index.js:
--------------------------------------------------------------------------------
1 | import LoadingBolt from './Loading'
2 |
3 | export default LoadingBolt
4 |
--------------------------------------------------------------------------------
/renderer/components/Loading/messages.js:
--------------------------------------------------------------------------------
1 | import { defineMessages } from 'react-intl'
2 |
3 | /* eslint-disable max-len */
4 | export default defineMessages({
5 | loading: 'Loading',
6 | starting_lnd: 'Starting LND',
7 | connecting_to_lnd: 'Connecting to LND gRPC interface',
8 | starting_wallet_unlocker: 'Starting wallet unlocker',
9 | connecting_to_unlocker: 'Connecting to unlocker interface',
10 | starting_neutrino: 'Starting Neutrino',
11 | fetching_tickers: 'Fetching tickers',
12 | starting_tor_proxy: 'Starting Tor proxy',
13 | })
14 |
--------------------------------------------------------------------------------
/renderer/components/Login/index.js:
--------------------------------------------------------------------------------
1 | import Login from './Login'
2 |
3 | export LoginNotAllowed from './LoginNotAllowed'
4 | export default Login
5 |
--------------------------------------------------------------------------------
/renderer/components/Login/messages.js:
--------------------------------------------------------------------------------
1 | import { defineMessages } from 'react-intl'
2 |
3 | /* eslint-disable max-len */
4 | export default defineMessages({
5 | intro: 'Enter your password to continue.',
6 | header: 'Secure storage is not available',
7 | error_desc_win32: `Windows Credential Manager is not available. It is required to start Zap wallet.`,
8 | error_desc_linux: `Gnome Keyring is not available. It might not be installed or the process is not running. Please ensure it's installed and running and restart the app`,
9 | error_desc_darwin: `Mac OS Keychain is not available. It is required to start Zap wallet.`,
10 | })
11 |
--------------------------------------------------------------------------------
/renderer/components/Onboarding/Steps/ConnectionDetailsContext.js:
--------------------------------------------------------------------------------
1 | import { createContext } from 'react'
2 |
3 | const ConnectionDetailsContext = createContext({
4 | openModal: () => {},
5 | })
6 |
7 | export default ConnectionDetailsContext
8 |
--------------------------------------------------------------------------------
/renderer/components/Onboarding/Steps/components/Container.js:
--------------------------------------------------------------------------------
1 | import styled from 'styled-components'
2 | import { Flex } from 'rebass/styled-components'
3 |
4 | const Container = styled(Flex)`
5 | position: absolute;
6 | top: 0;
7 | bottom: 0;
8 | `
9 |
10 | export default Container
11 |
--------------------------------------------------------------------------------
/renderer/components/Onboarding/Steps/components/settings.js:
--------------------------------------------------------------------------------
1 | export const BACKUP_FORM_WIDTH = 630
2 | export const BACKUP_FORM_HEIGHT = 470
3 |
--------------------------------------------------------------------------------
/renderer/components/Onboarding/Steps/constants.js:
--------------------------------------------------------------------------------
1 | export const FORM_TYPE_MANUAL = 'FORM_TYPE_MANUAL'
2 | export const FORM_TYPE_CONNECTION_STRING = 'FORM_TYPE_CONNECTION_STRING'
3 |
--------------------------------------------------------------------------------
/renderer/components/Onboarding/messages.js:
--------------------------------------------------------------------------------
1 | import { defineMessages } from 'react-intl'
2 |
3 | /* eslint-disable max-len */
4 | export default defineMessages({
5 | next: 'Next',
6 | skip: 'Skip',
7 | previous: 'Back',
8 | start_over: 'Start over',
9 | })
10 |
--------------------------------------------------------------------------------
/renderer/components/Pay/constants.js:
--------------------------------------------------------------------------------
1 | export const PAY_FORM_STEPS = { address: 'address', amount: 'amount', summary: 'summary' }
2 | export const PAY_HEADER_TYPES = { onchain: 'onchain', offchain: 'offchain' }
3 | export const PAYMENT_TYPES = Object.freeze({
4 | onchain: 'onchain',
5 | bolt11: 'bolt11',
6 | none: 'none',
7 | pubkey: 'pubkey',
8 | })
9 | export const TRANSACTION_SPEED_SLOW = 'TRANSACTION_SPEED_SLOW'
10 | export const TRANSACTION_SPEED_MEDIUM = 'TRANSACTION_SPEED_MEDIUM'
11 | export const TRANSACTION_SPEED_FAST = 'TRANSACTION_SPEED_FAST'
12 |
--------------------------------------------------------------------------------
/renderer/components/Pay/index.js:
--------------------------------------------------------------------------------
1 | export Pay from './Pay'
2 | export PayAddressField from './PayAddressField'
3 | export PayAmountFields from './PayAmountFields'
4 | export PayButtons from './PayButtons'
5 | export PayHeader from './PayHeader'
6 | export PayHelpText from './PayHelpText'
7 | export PayPanelBody from './PayPanelBody'
8 | export PayPanelFooter from './PayPanelFooter'
9 | export PayPanelHeader from './PayPanelHeader'
10 | export PaySummary from './PaySummary'
11 | export PaySummaryLightning from './PaySummaryLightning'
12 | export PaySummaryOnChain from './PaySummaryOnChain'
13 |
--------------------------------------------------------------------------------
/renderer/components/Profile/ProfileMenu/index.js:
--------------------------------------------------------------------------------
1 | import ProfileMenu from './ProfileMenu'
2 |
3 | export default ProfileMenu
4 |
--------------------------------------------------------------------------------
/renderer/components/Profile/ProfileMenu/messages.js:
--------------------------------------------------------------------------------
1 | import { defineMessages } from 'react-intl'
2 |
3 | /* eslint-disable max-len */
4 | export default defineMessages({
5 | profile_pane_nodeinfo_title: 'Node Info',
6 | profile_pane_connect_title: 'Connect',
7 | sign_message_title: 'Sign Message',
8 | verify_message_title: 'Verify Message',
9 | })
10 |
--------------------------------------------------------------------------------
/renderer/components/Profile/ProfilePage/index.js:
--------------------------------------------------------------------------------
1 | import ProfilePage from './ProfilePage'
2 |
3 | export default ProfilePage
4 |
--------------------------------------------------------------------------------
/renderer/components/Profile/ProfilePage/messages.js:
--------------------------------------------------------------------------------
1 | import { defineMessages } from 'react-intl'
2 |
3 | /* eslint-disable max-len */
4 | export default defineMessages({
5 | profile_page_title: 'Profile',
6 | profile_pane_nodeinfo_title: 'Node Info',
7 | profile_pane_connect_title: 'Connect',
8 | })
9 |
--------------------------------------------------------------------------------
/renderer/components/Profile/ProfilePaneConnect/index.js:
--------------------------------------------------------------------------------
1 | import ProfilePaneConnect from './ProfilePaneConnect'
2 |
3 | export default ProfilePaneConnect
4 |
--------------------------------------------------------------------------------
/renderer/components/Profile/ProfilePaneNodeInfo/index.js:
--------------------------------------------------------------------------------
1 | import ProfilePaneNodeInfo from './ProfilePaneNodeInfo'
2 |
3 | export default ProfilePaneNodeInfo
4 |
--------------------------------------------------------------------------------
/renderer/components/Profile/ProfilePaneSignMessage/index.js:
--------------------------------------------------------------------------------
1 | import ProfilePaneSignMessage from './ProfilePaneSignMessage'
2 |
3 | export default ProfilePaneSignMessage
4 |
--------------------------------------------------------------------------------
/renderer/components/Profile/ProfilePaneVerifyMessage/index.js:
--------------------------------------------------------------------------------
1 | import ProfilePaneVerifyMessage from './ProfilePaneVerifyMessage'
2 |
3 | export default ProfilePaneVerifyMessage
4 |
--------------------------------------------------------------------------------
/renderer/components/Profile/constants.js:
--------------------------------------------------------------------------------
1 | export const PANE_NODEINFO = 'nodeinfo'
2 | export const PANE_LNDCONNECT = 'lndconnect'
3 | export const PANE_SIGNMESSAGE = 'signmessage'
4 | export const PANE_VERIFYMESSAGE = 'verifymessage'
5 | export const DEFAULT_PANE = PANE_NODEINFO
6 |
--------------------------------------------------------------------------------
/renderer/components/Profile/index.js:
--------------------------------------------------------------------------------
1 | export ProfileMenu from './ProfileMenu'
2 | export ProfilePage from './ProfilePage'
3 | export ProfilePaneConnect from './ProfilePaneConnect'
4 | export ProfilePaneNodeInfo from './ProfilePaneNodeInfo'
5 |
--------------------------------------------------------------------------------
/renderer/components/Request/index.js:
--------------------------------------------------------------------------------
1 | export Request from './Request'
2 | export RequestSummary from './RequestSummary'
3 |
--------------------------------------------------------------------------------
/renderer/components/Settings/SettingsMenu/index.js:
--------------------------------------------------------------------------------
1 | import SettingsMenu from './SettingsMenu'
2 |
3 | export default SettingsMenu
4 |
--------------------------------------------------------------------------------
/renderer/components/Settings/SettingsMenu/messages.js:
--------------------------------------------------------------------------------
1 | import { defineMessages } from 'react-intl'
2 |
3 | /* eslint-disable max-len */
4 | export default defineMessages({
5 | disconnect_title: 'Disconnect',
6 | logout_title: 'Logout',
7 | settings_title: 'Preferences',
8 | profile_title: 'Profile',
9 | theme_title: 'Theme',
10 | theme_option_dark: 'Dark',
11 | theme_option_light: 'Light',
12 | locale_title: 'Language',
13 | currency_title: 'Currency',
14 | })
15 |
--------------------------------------------------------------------------------
/renderer/components/Settings/index.js:
--------------------------------------------------------------------------------
1 | export SettingsMenu from './SettingsMenu'
2 | export SettingsForm from './SettingsForm'
3 | export SettingsFieldsWallet from './SettingsFieldsWallet'
4 | export SettingsFieldsGeneral from './SettingsFieldsGeneral'
5 | export SettingsFieldsSecurity from './SettingsFieldsSecurity'
6 | export SettingsPage from './SettingsPage'
7 |
--------------------------------------------------------------------------------
/renderer/components/Syncing/OldWalletHeader.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { FormattedMessage } from 'react-intl'
3 | import { Header } from 'components/UI'
4 | import messages from './messages'
5 |
6 | const OldWalletHeader = () => (
7 | }
9 | title={}
10 | />
11 | )
12 |
13 | export default OldWalletHeader
14 |
--------------------------------------------------------------------------------
/renderer/components/Syncing/index.js:
--------------------------------------------------------------------------------
1 | import Syncing from './Syncing'
2 |
3 | export default Syncing
4 | export Address from './Address'
5 | export NewWalletHeader from './NewWalletHeader'
6 | export OldWalletHeader from './OldWalletHeader'
7 | export Progress from './Progress'
8 | export Tutorials from './Tutorials'
9 |
--------------------------------------------------------------------------------
/renderer/components/TabControl/Tab.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import PropTypes from 'prop-types'
3 |
4 | // don't update a tab if it's currently hidden
5 | const shouldUpdate = (prevProps, nextProps) => !nextProps.isActive
6 |
7 | const Tab = React.memo(({ children }) => <>{children}>, shouldUpdate)
8 | Tab.displayName = 'Tab'
9 |
10 | Tab.propTypes = {
11 | children: PropTypes.node.isRequired,
12 | }
13 |
14 | export default Tab
15 |
--------------------------------------------------------------------------------
/renderer/components/UI/BackgroundPrimary.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { Flex } from 'rebass/styled-components'
3 |
4 | /**
5 | * @name BackgroundPrimary
6 | * @example
7 | *
8 | */
9 | class BackgroundPrimary extends React.Component {
10 | render() {
11 | return
12 | }
13 | }
14 |
15 | export default BackgroundPrimary
16 |
--------------------------------------------------------------------------------
/renderer/components/UI/BackgroundSecondary.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { Box } from 'rebass/styled-components'
3 |
4 | /**
5 | * @name BackgroundSecondary
6 | * @example
7 | *
8 | */
9 | class BackgroundSecondary extends React.Component {
10 | render() {
11 | return
12 | }
13 | }
14 |
15 | export default BackgroundSecondary
16 |
--------------------------------------------------------------------------------
/renderer/components/UI/BackgroundTertiary.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { Box } from 'rebass/styled-components'
3 |
4 | /**
5 | * @name BackgroundTertiary
6 | * @example
7 | *
8 | */
9 | class BackgroundTertiary extends React.Component {
10 | render() {
11 | return
12 | }
13 | }
14 |
15 | export default BackgroundTertiary
16 |
--------------------------------------------------------------------------------
/renderer/components/UI/Bar.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import PropTypes from 'prop-types'
3 | import { Box } from 'rebass/styled-components'
4 |
5 | const Bar = ({ sx, variant, ...rest }) => {
6 | return (
7 |
18 | )
19 | }
20 |
21 | Bar.propTypes = {
22 | sx: PropTypes.object,
23 | variant: PropTypes.string,
24 | }
25 |
26 | Bar.defaultProps = {
27 | variant: 'normal',
28 | }
29 |
30 | export default Bar
31 |
--------------------------------------------------------------------------------
/renderer/components/UI/Card.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import PropTypes from 'prop-types'
3 | import { Card as BaseCard } from 'rebass/styled-components'
4 |
5 | const Card = React.forwardRef(({ sx, ...rest }, ref) => {
6 | return (
7 |
20 | )
21 | })
22 |
23 | Card.propTypes = {
24 | sx: PropTypes.object,
25 | }
26 |
27 | Card.displayName = 'Card'
28 |
29 | export default Card
30 |
--------------------------------------------------------------------------------
/renderer/components/UI/CenteredContent.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { Flex } from 'rebass/styled-components'
3 |
4 | const CenteredContent = props => (
5 |
13 | )
14 |
15 | export default CenteredContent
16 |
--------------------------------------------------------------------------------
/renderer/components/UI/ClippedText.js:
--------------------------------------------------------------------------------
1 | import styled from 'styled-components'
2 | import Text from 'components/UI/Text'
3 |
4 | const ClippedText = styled(Text)`
5 | overflow: hidden;
6 | white-space: nowrap;
7 | text-overflow: ellipsis;
8 | `
9 |
10 | export default ClippedText
11 |
--------------------------------------------------------------------------------
/renderer/components/UI/DialogOverlay.js:
--------------------------------------------------------------------------------
1 | import styled from 'styled-components'
2 | import { themeGet } from '@styled-system/theme-get'
3 | import { Flex } from 'rebass/styled-components'
4 |
5 | const Overlay = styled(Flex)`
6 | position: ${props => (props.position ? props.position : 'absolute')};
7 | z-index: 99998;
8 | background-color: ${themeGet('colors.primaryColor')}CC;
9 | top: 0;
10 | bottom: 0;
11 | left: 0;
12 | right: 0;
13 | `
14 |
15 | export default Overlay
16 |
--------------------------------------------------------------------------------
/renderer/components/UI/Dropdown/index.js:
--------------------------------------------------------------------------------
1 | import Dropdown from './Dropdown'
2 |
3 | export { DropdownButton } from './Dropdown'
4 | export default Dropdown
5 |
--------------------------------------------------------------------------------
/renderer/components/UI/Link.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import Text from './Text'
3 |
4 | const Link = props =>
5 |
6 | export default Link
7 |
--------------------------------------------------------------------------------
/renderer/components/UI/MainContent.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { Box } from 'rebass/styled-components'
3 |
4 | const MainContent = props => (
5 |
15 | )
16 |
17 | export default MainContent
18 |
--------------------------------------------------------------------------------
/renderer/components/UI/MenuItem.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import Button from 'components/UI/Button'
3 |
4 | const MenuItem = props => (
5 |
6 | )
7 |
8 | export default MenuItem
9 |
--------------------------------------------------------------------------------
/renderer/components/UI/Panel.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { Box, Flex } from 'rebass/styled-components'
3 |
4 | const PanelHeader = props =>
5 |
6 | const PanelBody = props =>
7 |
8 | const PanelFooter = props =>
9 |
10 | const Panel = props =>
11 |
12 | Panel.Header = PanelHeader
13 | Panel.Body = PanelBody
14 | Panel.Footer = PanelFooter
15 |
16 | export default Panel
17 | export { PanelHeader, PanelBody, PanelFooter }
18 |
--------------------------------------------------------------------------------
/renderer/components/UI/Span.js:
--------------------------------------------------------------------------------
1 | import styled from 'styled-components'
2 | import { space, layout, color, typography, compose } from 'styled-system'
3 |
4 | const Span = styled('span')(compose(space, layout, color, typography))
5 |
6 | export default Span
7 |
--------------------------------------------------------------------------------
/renderer/components/UI/StatusIndicator.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import PropTypes from 'prop-types'
3 | import { Box } from 'rebass/styled-components'
4 | import Circle from 'components/Icon/Circle'
5 | import Spinner from './Spinner'
6 |
7 | const StatusIndicator = ({ variant, ...rest }) => (
8 |
9 | {['loading'].includes(variant) ? (
10 |
11 | ) : (
12 |
13 | )}
14 |
15 | )
16 | StatusIndicator.propTypes = {
17 | variant: PropTypes.string,
18 | }
19 |
20 | export default StatusIndicator
21 |
--------------------------------------------------------------------------------
/renderer/components/UI/Text.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { Text as BaseText } from 'rebass/styled-components'
3 |
4 | const Text = props =>
5 |
6 | export default Text
7 |
--------------------------------------------------------------------------------
/renderer/components/UI/Titlebar.js:
--------------------------------------------------------------------------------
1 | import styled from 'styled-components'
2 |
3 | /**
4 | * @name Titlebar
5 | * @example
6 | *
7 | */
8 | const Titlebar = styled.div`
9 | height: 20px;
10 | width: 100%;
11 | position: absolute;
12 | user-select: none;
13 | -webkit-app-region: drag;
14 | `
15 |
16 | export default Titlebar
17 |
--------------------------------------------------------------------------------
/renderer/components/UI/messages.js:
--------------------------------------------------------------------------------
1 | import { defineMessages } from 'react-intl'
2 |
3 | /* eslint-disable max-len */
4 | export default defineMessages({
5 | copy_to_clipboard: 'Copy to clipboard',
6 | expires: 'Expires',
7 | expired: 'Expired',
8 | })
9 |
--------------------------------------------------------------------------------
/renderer/components/Util/index.js:
--------------------------------------------------------------------------------
1 | export Truncate from './Truncate'
2 | export WalletName from './WalletName'
3 |
--------------------------------------------------------------------------------
/renderer/components/Wallet/ReceiveModal/index.js:
--------------------------------------------------------------------------------
1 | import ReceiveModal from './ReceiveModal'
2 |
3 | export default ReceiveModal
4 |
--------------------------------------------------------------------------------
/renderer/components/Wallet/ReceiveModal/messages.js:
--------------------------------------------------------------------------------
1 | import { defineMessages } from 'react-intl'
2 |
3 | export default defineMessages({
4 | receive_subtitle: 'Your {cryptoAddressName} address',
5 | wallet_address: '{chain} Address',
6 | copy_address: 'Copy address',
7 | address_copied_notification_description: 'Address has been copied to your clipboard',
8 | })
9 |
--------------------------------------------------------------------------------
/renderer/components/Wallet/index.js:
--------------------------------------------------------------------------------
1 | import Wallet from './Wallet'
2 |
3 | export default Wallet
4 |
--------------------------------------------------------------------------------
/renderer/components/Wallet/messages.js:
--------------------------------------------------------------------------------
1 | import { defineMessages } from 'react-intl'
2 |
3 | /* eslint-disable max-len */
4 | export default defineMessages({
5 | pay: 'Pay',
6 | request: 'Receive',
7 | menu_item_autopay: 'Autopay',
8 | qrcode_tooltip: 'Deposit Bitcoin',
9 | })
10 |
--------------------------------------------------------------------------------
/renderer/containers/Activity/Invoice.js:
--------------------------------------------------------------------------------
1 | import { connect } from 'react-redux'
2 | import { tickerSelectors } from 'reducers/ticker'
3 | import { showActivityModal } from 'reducers/activity'
4 | import Invoice from 'components/Activity/Invoice'
5 |
6 | const mapDispatchToProps = {
7 | showActivityModal,
8 | }
9 |
10 | const mapStateToProps = state => ({
11 | cryptoUnitName: tickerSelectors.cryptoUnitName(state),
12 | })
13 |
14 | export default connect(mapStateToProps, mapDispatchToProps)(Invoice)
15 |
--------------------------------------------------------------------------------
/renderer/containers/Activity/index.js:
--------------------------------------------------------------------------------
1 | import Activity from './Activity'
2 |
3 | export default Activity
4 | export ActivityActions from './ActivityActions'
5 | export ActivityModal from './ActivityModal'
6 | export Invoice from './Invoice'
7 | export Payment from './Payment'
8 | export Transaction from './Transaction'
9 |
--------------------------------------------------------------------------------
/renderer/containers/App/index.js:
--------------------------------------------------------------------------------
1 | import App from './App'
2 |
3 | export default App
4 |
--------------------------------------------------------------------------------
/renderer/containers/Autopay.js:
--------------------------------------------------------------------------------
1 | import { connect } from 'react-redux'
2 | import Autopay from 'components/Autopay'
3 |
4 | const mapStateToProps = () => ({})
5 |
6 | const mapDispatchToProps = {}
7 |
8 | export default connect(mapStateToProps, mapDispatchToProps)(Autopay)
9 |
--------------------------------------------------------------------------------
/renderer/containers/Autopay/AutopayList.js:
--------------------------------------------------------------------------------
1 | import { connect } from 'react-redux'
2 | import AutopayList from 'components/Autopay/AutopayList'
3 | import { openAutopayCreateModal, autopaySelectors } from 'reducers/autopay'
4 |
5 | const mapStateToProps = state => ({
6 | merchants: autopaySelectors.autopayListAsArray(state),
7 | })
8 |
9 | const mapDispatchToProps = dispatch => {
10 | return {
11 | openAutopayCreateModal(merchantId) {
12 | dispatch(openAutopayCreateModal(merchantId, true))
13 | },
14 | }
15 | }
16 |
17 | export default connect(mapStateToProps, mapDispatchToProps)(AutopayList)
18 |
--------------------------------------------------------------------------------
/renderer/containers/Autopay/AutopayMerchantList.js:
--------------------------------------------------------------------------------
1 | import { connect } from 'react-redux'
2 | import AutopayMerchantList from 'components/Autopay/AutopayMerchantList'
3 | import { openAutopayCreateModal, autopaySelectors } from 'reducers/autopay'
4 |
5 | const mapStateToProps = state => ({
6 | merchants: autopaySelectors.filteredMerchants(state),
7 | })
8 |
9 | const mapDispatchToProps = {
10 | openAutopayCreateModal,
11 | }
12 |
13 | export default connect(mapStateToProps, mapDispatchToProps)(AutopayMerchantList)
14 |
--------------------------------------------------------------------------------
/renderer/containers/Autopay/AutopaySearch.js:
--------------------------------------------------------------------------------
1 | import { connect } from 'react-redux'
2 | import AutopaySearch from 'components/Autopay/AutopaySearch'
3 | import { updateAutopaySearchQuery, autopaySelectors } from 'reducers/autopay'
4 |
5 | const mapStateToProps = state => ({
6 | searchQuery: autopaySelectors.searchQuery(state),
7 | })
8 |
9 | const mapDispatchToProps = {
10 | updateAutopaySearchQuery,
11 | }
12 |
13 | export default connect(mapStateToProps, mapDispatchToProps)(AutopaySearch)
14 |
--------------------------------------------------------------------------------
/renderer/containers/Channels/ChannelNodeSearch.js:
--------------------------------------------------------------------------------
1 | import { connect } from 'react-redux'
2 | import ChannelNodeSearch from 'components/Channels/ChannelNodeSearch'
3 | import { updateContactFormSearchQuery, contactFormSelectors } from 'reducers/contactsform'
4 |
5 | const mapStateToProps = state => ({
6 | searchQuery: state.contactsform.searchQuery,
7 | filteredNetworkNodes: contactFormSelectors.filteredNetworkNodes(state),
8 | })
9 |
10 | const mapDispatchToProps = {
11 | updateContactFormSearchQuery,
12 | }
13 |
14 | export default connect(mapStateToProps, mapDispatchToProps)(ChannelNodeSearch)
15 |
--------------------------------------------------------------------------------
/renderer/containers/Channels/NodeCardList.js:
--------------------------------------------------------------------------------
1 | import { connect } from 'react-redux'
2 | import { updateContactFormSearchQuery, contactFormSelectors } from 'reducers/contactsform'
3 | import NodeCardList from 'components/Channels/NodeCardList'
4 |
5 | const mapStateToProps = state => ({
6 | nodes: contactFormSelectors.suggestedNodes(state),
7 | })
8 |
9 | const mapDispatchToProps = {
10 | updateContactFormSearchQuery,
11 | }
12 |
13 | export default connect(mapStateToProps, mapDispatchToProps)(NodeCardList)
14 |
--------------------------------------------------------------------------------
/renderer/containers/Dialog/DialogLndCrashed.js:
--------------------------------------------------------------------------------
1 | import { connect } from 'react-redux'
2 | import { DialogLndCrashed } from 'components/Dialog'
3 | import { neutrinoReset, neutrinoSelectors } from 'reducers/neutrino'
4 |
5 | const mapStateToProps = state => ({
6 | isOpen: neutrinoSelectors.isNeutrinoCrashed(state),
7 | lndCrashReason: neutrinoSelectors.neutrinoCrashReason(state),
8 | })
9 |
10 | const mapDispatchToProps = {
11 | onCancel: neutrinoReset,
12 | }
13 |
14 | export default connect(mapStateToProps, mapDispatchToProps)(DialogLndCrashed)
15 |
--------------------------------------------------------------------------------
/renderer/containers/Dialog/index.js:
--------------------------------------------------------------------------------
1 | export DialogLndCrashed from './DialogLndCrashed'
2 |
--------------------------------------------------------------------------------
/renderer/containers/Form/index.js:
--------------------------------------------------------------------------------
1 | export CurrencyFieldGroup from './CurrencyFieldGroup'
2 |
--------------------------------------------------------------------------------
/renderer/containers/Home/index.js:
--------------------------------------------------------------------------------
1 | import Home from './Home'
2 |
3 | export default Home
4 |
--------------------------------------------------------------------------------
/renderer/containers/Lnurl/LnurlAuthPrompt.js:
--------------------------------------------------------------------------------
1 | import { connect } from 'react-redux'
2 | import { finishLnurlAuth, lnurlSelectors, clearLnurlAuth, declineLnurlAuth } from 'reducers/lnurl'
3 | import { LnurlAuthPrompt } from 'components/Lnurl'
4 |
5 | const mapStateToProps = state => ({
6 | params: lnurlSelectors.lnurlAuthParams(state),
7 | })
8 |
9 | const mapDispatchToProps = {
10 | onOk: finishLnurlAuth,
11 | onCancel: declineLnurlAuth,
12 | onClose: clearLnurlAuth,
13 | }
14 |
15 | export default connect(mapStateToProps, mapDispatchToProps)(LnurlAuthPrompt)
16 |
--------------------------------------------------------------------------------
/renderer/containers/Lnurl/LnurlChannelPrompt.js:
--------------------------------------------------------------------------------
1 | import { connect } from 'react-redux'
2 | import {
3 | lnurlSelectors,
4 | finishLnurlChannel,
5 | clearLnurlChannel,
6 | declineLnurlChannel,
7 | } from 'reducers/lnurl'
8 | import { LnurlChannelPrompt } from 'components/Lnurl'
9 |
10 | const mapStateToProps = state => ({
11 | params: lnurlSelectors.lnurlChannelParams(state),
12 | })
13 |
14 | const mapDispatchToProps = {
15 | onOk: finishLnurlChannel,
16 | onCancel: declineLnurlChannel,
17 | onClose: clearLnurlChannel,
18 | }
19 |
20 | export default connect(mapStateToProps, mapDispatchToProps)(LnurlChannelPrompt)
21 |
--------------------------------------------------------------------------------
/renderer/containers/Lnurl/LnurlWithdrawPrompt.js:
--------------------------------------------------------------------------------
1 | import { connect } from 'react-redux'
2 | import {
3 | finishLnurlWithdraw,
4 | clearLnurlWithdraw,
5 | declineLnurlWithdraw,
6 | lnurlSelectors,
7 | } from 'reducers/lnurl'
8 | import { LnurlWithdrawPrompt } from 'components/Lnurl'
9 |
10 | const mapStateToProps = state => ({
11 | params: lnurlSelectors.lnurlWithdrawParams(state),
12 | })
13 |
14 | const mapDispatchToProps = {
15 | onOk: finishLnurlWithdraw,
16 | onCancel: declineLnurlWithdraw,
17 | onClose: clearLnurlWithdraw,
18 | }
19 |
20 | export default connect(mapStateToProps, mapDispatchToProps)(LnurlWithdrawPrompt)
21 |
--------------------------------------------------------------------------------
/renderer/containers/Loading/index.js:
--------------------------------------------------------------------------------
1 | import Loading from './Loading'
2 |
3 | export default Loading
4 |
--------------------------------------------------------------------------------
/renderer/containers/Login/index.js:
--------------------------------------------------------------------------------
1 | import Login from './Login'
2 |
3 | export default Login
4 |
--------------------------------------------------------------------------------
/renderer/containers/Onboarding/Steps/Autopilot.js:
--------------------------------------------------------------------------------
1 | import { connect } from 'react-redux'
2 | import { Autopilot } from 'components/Onboarding/Steps'
3 | import { setAutopilot } from 'reducers/onboarding'
4 |
5 | const mapStateToProps = state => ({
6 | autopilot: state.onboarding.autopilot,
7 | })
8 |
9 | const mapDispatchToProps = {
10 | setAutopilot,
11 | }
12 |
13 | export default connect(mapStateToProps, mapDispatchToProps)(Autopilot)
14 |
--------------------------------------------------------------------------------
/renderer/containers/Onboarding/Steps/BackupSetupLocal.js:
--------------------------------------------------------------------------------
1 | import { connect } from 'react-redux'
2 | import { BackupSetupLocal } from 'components/Onboarding/Steps'
3 | import { setBackupPathLocal } from 'reducers/backup'
4 |
5 | const mapDispatchToProps = {
6 | setBackupPathLocal,
7 | }
8 |
9 | export default connect(null, mapDispatchToProps)(BackupSetupLocal)
10 |
--------------------------------------------------------------------------------
/renderer/containers/Onboarding/Steps/ConnectionType.js:
--------------------------------------------------------------------------------
1 | import { connect } from 'react-redux'
2 | import { ConnectionType } from 'components/Onboarding/Steps'
3 | import { setConnectionType, resetOnboarding } from 'reducers/onboarding'
4 | import { stopLnd } from 'reducers/lnd'
5 |
6 | const mapStateToProps = state => ({
7 | lndConnect: state.onboarding.lndConnect,
8 | connectionType: state.onboarding.connectionType,
9 | })
10 |
11 | const mapDispatchToProps = {
12 | stopLnd,
13 | setConnectionType,
14 | resetOnboarding,
15 | }
16 |
17 | export default connect(mapStateToProps, mapDispatchToProps)(ConnectionType)
18 |
--------------------------------------------------------------------------------
/renderer/containers/Onboarding/Steps/Login.js:
--------------------------------------------------------------------------------
1 | import { connect } from 'react-redux'
2 | import { Login } from 'components/Onboarding/Steps'
3 | import { setUnlockWalletError, unlockWallet } from 'reducers/lnd'
4 |
5 | const mapStateToProps = state => ({
6 | unlockWalletError: state.lnd.unlockWalletError,
7 | })
8 |
9 | const mapDispatchToProps = {
10 | setUnlockWalletError,
11 | unlockWallet,
12 | }
13 |
14 | export default connect(mapStateToProps, mapDispatchToProps)(Login)
15 |
--------------------------------------------------------------------------------
/renderer/containers/Onboarding/Steps/Name.js:
--------------------------------------------------------------------------------
1 | import { connect } from 'react-redux'
2 | import { Name } from 'components/Onboarding/Steps'
3 | import { setName } from 'reducers/onboarding'
4 |
5 | const mapStateToProps = state => ({
6 | name: state.onboarding.name,
7 | })
8 |
9 | const mapDispatchToProps = {
10 | setName,
11 | }
12 |
13 | export default connect(mapStateToProps, mapDispatchToProps)(Name)
14 |
--------------------------------------------------------------------------------
/renderer/containers/Onboarding/Steps/Network.js:
--------------------------------------------------------------------------------
1 | import { connect } from 'react-redux'
2 | import { Network } from 'components/Onboarding/Steps'
3 | import { setNetwork } from 'reducers/onboarding'
4 |
5 | const mapStateToProps = state => ({
6 | network: state.onboarding.network,
7 | })
8 |
9 | const mapDispatchToProps = {
10 | setNetwork,
11 | }
12 |
13 | export default connect(mapStateToProps, mapDispatchToProps)(Network)
14 |
--------------------------------------------------------------------------------
/renderer/containers/Onboarding/Steps/Password.js:
--------------------------------------------------------------------------------
1 | import { connect } from 'react-redux'
2 | import { Password } from 'components/Onboarding/Steps'
3 | import { setPassword } from 'reducers/onboarding'
4 |
5 | const mapDispatchToProps = {
6 | setPassword,
7 | }
8 |
9 | export default connect(null, mapDispatchToProps)(Password)
10 |
--------------------------------------------------------------------------------
/renderer/containers/Onboarding/Steps/Recover.js:
--------------------------------------------------------------------------------
1 | import { connect } from 'react-redux'
2 | import { Recover } from 'components/Onboarding/Steps'
3 | import { setSeed } from 'reducers/onboarding'
4 |
5 | const mapDispatchToProps = {
6 | setSeed,
7 | }
8 |
9 | export default connect(null, mapDispatchToProps)(Recover)
10 |
--------------------------------------------------------------------------------
/renderer/containers/Onboarding/Steps/SeedConfirm.js:
--------------------------------------------------------------------------------
1 | import { connect } from 'react-redux'
2 | import { SeedConfirm } from 'components/Onboarding/Steps'
3 |
4 | const mapStateToProps = state => ({
5 | seed: state.onboarding.seed,
6 | })
7 |
8 | export default connect(
9 | mapStateToProps,
10 | {} // avoid passing dispatch
11 | )(SeedConfirm)
12 |
--------------------------------------------------------------------------------
/renderer/containers/Onboarding/Steps/SeedView.js:
--------------------------------------------------------------------------------
1 | import { connect } from 'react-redux'
2 | import { SeedView } from 'components/Onboarding/Steps'
3 | import { fetchSeed } from 'reducers/lnd'
4 |
5 | const mapStateToProps = state => ({
6 | seed: state.onboarding.seed,
7 | isFetchingSeed: state.lnd.isFetchingSeed,
8 | })
9 |
10 | const mapDispatchToProps = {
11 | fetchSeed,
12 | }
13 |
14 | export default connect(mapStateToProps, mapDispatchToProps)(SeedView)
15 |
--------------------------------------------------------------------------------
/renderer/containers/Onboarding/Steps/WalletCreate.js:
--------------------------------------------------------------------------------
1 | import { connect } from 'react-redux'
2 | import { WalletCreate } from 'components/Onboarding/Steps'
3 | import { createWallet, clearCreateWalletError } from 'reducers/lnd'
4 |
5 | const mapStateToProps = state => ({
6 | createWalletError: state.lnd.createWalletError,
7 | isCreatingWallet: state.lnd.isCreatingWallet,
8 | })
9 |
10 | const mapDispatchToProps = {
11 | createWallet,
12 | clearCreateWalletError,
13 | }
14 |
15 | export default connect(mapStateToProps, mapDispatchToProps)(WalletCreate)
16 |
--------------------------------------------------------------------------------
/renderer/containers/Profile/ProfilePage.js:
--------------------------------------------------------------------------------
1 | import { connect } from 'react-redux'
2 | import { walletSelectors } from 'reducers/wallet'
3 | import ProfilePage from 'components/Profile/ProfilePage'
4 |
5 | const mapStateToProps = state => ({
6 | activeWalletSettings: walletSelectors.activeWalletSettings(state),
7 | })
8 |
9 | export default connect(mapStateToProps)(ProfilePage)
10 |
--------------------------------------------------------------------------------
/renderer/containers/Profile/ProfilePaneConnect.js:
--------------------------------------------------------------------------------
1 | import { connect } from 'react-redux'
2 | import { showNotification } from 'reducers/notification'
3 | import { walletSelectors } from 'reducers/wallet'
4 | import ProfilePaneConnect from 'components/Profile/ProfilePaneConnect'
5 |
6 | const mapStateToProps = state => ({
7 | lndconnectQRCode: walletSelectors.lndconnectQRCode(state),
8 | })
9 |
10 | const mapDispatchToProps = {
11 | showNotification,
12 | }
13 |
14 | export default connect(mapStateToProps, mapDispatchToProps)(ProfilePaneConnect)
15 |
--------------------------------------------------------------------------------
/renderer/containers/Profile/ProfilePaneSignMessage.js:
--------------------------------------------------------------------------------
1 | import { connect } from 'react-redux'
2 | import { showNotification } from 'reducers/notification'
3 | import { signMessage } from 'reducers/lnd'
4 | import ProfilePaneSignMessage from 'components/Profile/ProfilePaneSignMessage'
5 |
6 | const mapDispatchToProps = {
7 | showNotification,
8 | signMessage,
9 | }
10 |
11 | export default connect(null, mapDispatchToProps)(ProfilePaneSignMessage)
12 |
--------------------------------------------------------------------------------
/renderer/containers/Profile/ProfilePaneVerifyMessage.js:
--------------------------------------------------------------------------------
1 | import { connect } from 'react-redux'
2 | import { showNotification } from 'reducers/notification'
3 | import { verifyMessage } from 'reducers/lnd'
4 | import ProfilePaneVerifyMessage from 'components/Profile/ProfilePaneVerifyMessage'
5 |
6 | const mapDispatchToProps = {
7 | showNotification,
8 | verifyMessage,
9 | }
10 |
11 | export default connect(null, mapDispatchToProps)(ProfilePaneVerifyMessage)
12 |
--------------------------------------------------------------------------------
/renderer/containers/Settings/PasswordSetDialog.js:
--------------------------------------------------------------------------------
1 | import { connect } from 'react-redux'
2 | import SetPasswordDialog from 'components/Settings/Security/SetPasswordDialog'
3 | import { enablePassword as onOk, PASSWORD_SET_DIALOG_ID, clearLoginError } from 'reducers/account'
4 | import { closeDialog } from 'reducers/modal'
5 |
6 | const onCancel = () => closeDialog(PASSWORD_SET_DIALOG_ID)
7 |
8 | const mapDispatchToProps = {
9 | onOk,
10 | onCancel,
11 | clearLoginError,
12 | }
13 |
14 | export default connect(null, mapDispatchToProps)(SetPasswordDialog)
15 |
--------------------------------------------------------------------------------
/renderer/containers/UI/CryptoSelector.js:
--------------------------------------------------------------------------------
1 | import { connect } from 'react-redux'
2 | import Dropdown from 'components/UI/Dropdown'
3 | import { tickerSelectors, setCryptoUnit } from 'reducers/ticker'
4 |
5 | const mapStateToProps = state => ({
6 | activeKey: tickerSelectors.cryptoUnit(state),
7 | items: tickerSelectors.cryptoUnits(state),
8 | valueField: 'name',
9 | })
10 |
11 | const mapDispatchToProps = {
12 | onChange: setCryptoUnit,
13 | }
14 |
15 | export default connect(mapStateToProps, mapDispatchToProps)(Dropdown)
16 |
--------------------------------------------------------------------------------
/renderer/containers/UI/FiatSelector.js:
--------------------------------------------------------------------------------
1 | import { connect } from 'react-redux'
2 | import { Dropdown } from 'components/UI'
3 | import { setFiatTicker, tickerSelectors } from 'reducers/ticker'
4 |
5 | const mapStateToProps = state => ({
6 | activeKey: tickerSelectors.fiatTicker(state),
7 | items: tickerSelectors.fiatTickers(state),
8 | })
9 |
10 | const mapDispatchToProps = {
11 | onChange: setFiatTicker,
12 | }
13 |
14 | export default connect(mapStateToProps, mapDispatchToProps)(Dropdown)
15 |
--------------------------------------------------------------------------------
/renderer/containers/UI/index.js:
--------------------------------------------------------------------------------
1 | export CopyButton from './CopyButton'
2 | export CryptoSelector from './CryptoSelector'
3 | export CryptoValue from './CryptoValue'
4 | export FormattedDateTime from './FormattedDateTime'
5 | export FiatSelector from './FiatSelector'
6 | export FiatValue from './FiatValue'
7 | export CryptoValueSelector from './CryptoValueSelector'
8 |
--------------------------------------------------------------------------------
/renderer/containers/UI/messages.js:
--------------------------------------------------------------------------------
1 | import { defineMessages } from 'react-intl'
2 |
3 | export default defineMessages({
4 | copied_to_clipbpard: '{name} has been copied to your clipboard',
5 | })
6 |
--------------------------------------------------------------------------------
/renderer/containers/Wallet/index.js:
--------------------------------------------------------------------------------
1 | import Wallet from './Wallet'
2 |
3 | export default Wallet
4 | export WalletStarter from './WalletStarter'
5 |
--------------------------------------------------------------------------------
/renderer/empty.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | This empty html page is used for internal purposes. See fetchSettings() main.js
4 |
5 |
--------------------------------------------------------------------------------
/renderer/hocs/index.js:
--------------------------------------------------------------------------------
1 | export withEllipsis from './withEllipsis'
2 | export withLoading from './withLoading'
3 | export withNumberInputMask from './withNumberInputMask'
4 | export WithOpenDialog from './withOpenDialog'
5 | export withInputValidation from './withInputValidation'
6 | export withNumberValidation from './withNumberValidation'
7 |
--------------------------------------------------------------------------------
/renderer/hooks/useDebounce.js:
--------------------------------------------------------------------------------
1 | import debounce from 'lodash/debounce'
2 | import { useEffect, useRef } from 'react'
3 |
4 | /**
5 | * useDebounce - React hook that calls a debounced version of a @func when @value is changed.
6 | *
7 | * @param {Function} func Function to debounce
8 | * @param {any} value Value to call function with
9 | * @param {[number]} timeout Timeout
10 | */
11 | export default function useDebounce(func, value, timeout = 300) {
12 | const debouncedFunc = useRef(debounce(func, timeout))
13 |
14 | useEffect(() => {
15 | debouncedFunc.current(value)
16 | }, [value])
17 | }
18 |
--------------------------------------------------------------------------------
/renderer/hooks/usePrevious.js:
--------------------------------------------------------------------------------
1 | import { useEffect, useRef } from 'react'
2 |
3 | /**
4 | * usePrevious - Caches specified value. This hooks is used to store previous prop
5 | * value so it can be compared against the most recent one.
6 | *
7 | * @exports
8 | * @param {*} value next value
9 | * @returns {*} currently stored value
10 | */
11 | export default function usePrevious(value) {
12 | const ref = useRef()
13 | useEffect(() => {
14 | ref.current = value
15 | })
16 | return ref.current
17 | }
18 |
--------------------------------------------------------------------------------
/renderer/reducers/account/index.js:
--------------------------------------------------------------------------------
1 | import accountReducer from './reducer'
2 |
3 | export default accountReducer
4 | export accountSelectors from './selectors'
5 | export * from './constants'
6 | export * from './reducer'
7 |
--------------------------------------------------------------------------------
/renderer/reducers/account/messages.js:
--------------------------------------------------------------------------------
1 | import { defineMessages } from 'react-intl'
2 |
3 | // use pattern [reducer]_message
4 |
5 | /* eslint-disable max-len */
6 | export default defineMessages({
7 | account_invalid_password: 'Invalid password',
8 | account_password_disabled: 'Password protection has been disabled',
9 | account_password_enabled: 'Password protection has been enabled',
10 | account_password_updated: 'Your password has been successfully updated',
11 | })
12 |
--------------------------------------------------------------------------------
/renderer/reducers/activity/index.js:
--------------------------------------------------------------------------------
1 | import activityReducer from './reducer'
2 |
3 | export default activityReducer
4 | export activitySelectors from './selectors'
5 | export * from './constants'
6 | export * from './reducer'
7 | export * from './utils'
8 |
--------------------------------------------------------------------------------
/renderer/reducers/activity/messages.js:
--------------------------------------------------------------------------------
1 | import { defineMessages } from 'react-intl'
2 |
3 | // use pattern [reducer]_message
4 |
5 | /* eslint-disable max-len */
6 | export default defineMessages({
7 | activity_invoice_download_error: 'An error has occurred',
8 | activity_invoice_download_success: 'Download Complete',
9 | })
10 |
--------------------------------------------------------------------------------
/renderer/reducers/address/constants.js:
--------------------------------------------------------------------------------
1 | export const FETCH_ADDRESSES = 'FETCH_ADDRESSES'
2 | export const FETCH_ADDRESSES_SUCCESS = 'FETCH_ADDRESSES_SUCCESS'
3 | export const FETCH_ADDRESSES_FAILURE = 'FETCH_ADDRESSES_FAILURE'
4 | export const NEW_ADDRESS = 'NEW_ADDRESS'
5 | export const NEW_ADDRESS_SUCCESS = 'NEW_ADDRESS_SUCCESS'
6 | export const NEW_ADDRESS_FAILURE = 'NEW_ADDRESS_FAILURE'
7 |
--------------------------------------------------------------------------------
/renderer/reducers/address/index.js:
--------------------------------------------------------------------------------
1 | import addressReducer from './reducer'
2 |
3 | export default addressReducer
4 | export addressSelectors from './selectors'
5 | export * from './constants'
6 | export * from './reducer'
7 |
--------------------------------------------------------------------------------
/renderer/reducers/balance/constants.js:
--------------------------------------------------------------------------------
1 | export const FETCH_BALANCE = 'FETCH_BALANCE'
2 | export const FETCH_BALANCE_SUCCESS = 'FETCH_BALANCE_SUCCESS'
3 | export const FETCH_BALANCE_FAILURE = 'FETCH_BALANCE_FAILURE'
4 |
--------------------------------------------------------------------------------
/renderer/reducers/balance/index.js:
--------------------------------------------------------------------------------
1 | import balanceReducer from './reducer'
2 |
3 | export default balanceReducer
4 | export balanceSelectors from './selectors'
5 | export * from './constants'
6 | export * from './reducer'
7 |
--------------------------------------------------------------------------------
/renderer/reducers/channels/index.js:
--------------------------------------------------------------------------------
1 | import channelsReducer from './reducer'
2 |
3 | export default channelsReducer
4 | export channelsSelectors from './selectors'
5 | export * from './constants'
6 | export * from './reducer'
7 | export * from './utils'
8 |
--------------------------------------------------------------------------------
/renderer/reducers/channels/messages.js:
--------------------------------------------------------------------------------
1 | import { defineMessages } from 'react-intl'
2 |
3 | // use pattern [reducer]_message
4 |
5 | /* eslint-disable max-len */
6 | export default defineMessages({
7 | channels_open_warning: 'Channel opening initiated',
8 | })
9 |
--------------------------------------------------------------------------------
/renderer/reducers/info/constants.js:
--------------------------------------------------------------------------------
1 | export const GET_INFO = 'GET_INFO'
2 | export const RECEIVE_INFO = 'RECEIVE_INFO'
3 | export const SET_HAS_SYNCED = 'SET_HAS_SYNCED'
4 |
--------------------------------------------------------------------------------
/renderer/reducers/info/index.js:
--------------------------------------------------------------------------------
1 | import infoReducer from './reducer'
2 |
3 | export default infoReducer
4 | export infoSelectors from './selectors'
5 | export * from './constants'
6 | export * from './reducer'
7 |
--------------------------------------------------------------------------------
/renderer/reducers/invoice/index.js:
--------------------------------------------------------------------------------
1 | import invoiceReducer from './reducer'
2 |
3 | export default invoiceReducer
4 | export invoiceSelectors from './selectors'
5 | export * from './constants'
6 | export * from './reducer'
7 | export * from './utils'
8 |
--------------------------------------------------------------------------------
/renderer/reducers/invoice/messages.js:
--------------------------------------------------------------------------------
1 | import { defineMessages } from 'react-intl'
2 |
3 | // use pattern [reducer]_message
4 |
5 | /* eslint-disable max-len */
6 | export default defineMessages({
7 | invoice_receive_title: `You've been Zapped`,
8 | invoice_receive_body: 'Congrats, someone just paid an invoice of yours',
9 | invoice_keysend_receive_body: 'Congrats, someone just paid you',
10 | })
11 |
--------------------------------------------------------------------------------
/renderer/reducers/lnurl/constants.js:
--------------------------------------------------------------------------------
1 | export const SET_LNURL_AUTH_PARAMS = 'SET_LNURL_AUTH_PARAMS'
2 | export const CLEAR_LNURL_AUTH = 'CLEAR_LNURL_AUTH'
3 |
4 | export const SET_LNURL_CHANNEL_PARAMS = 'SET_LNURL_CHANNEL_PARAMS'
5 | export const CLEAR_LNURL_CHANNEL = 'CLEAR_LNURL_CHANNEL'
6 |
7 | export const SET_LNURL_WITHDRAW_PARAMS = 'SET_LNURL_WITHDRAW_PARAMS'
8 | export const CLEAR_LNURL_WITHDRAW = 'CLEAR_LNURL_WITHDRAW'
9 |
--------------------------------------------------------------------------------
/renderer/reducers/lnurl/index.js:
--------------------------------------------------------------------------------
1 | import lnurlReducer from './reducer'
2 |
3 | export default lnurlReducer
4 | export lnurlSelectors from './selectors'
5 | export * from './constants'
6 | export * from './reducer'
7 | export * from './ipc'
8 |
--------------------------------------------------------------------------------
/renderer/reducers/locale/index.js:
--------------------------------------------------------------------------------
1 | import localeReducer from './reducer'
2 |
3 | export default localeReducer
4 | export localeSelectors from './selectors'
5 | export * from './reducer'
6 | export * from './ipc'
7 |
--------------------------------------------------------------------------------
/renderer/reducers/locale/ipc.js:
--------------------------------------------------------------------------------
1 | import { setLocale } from './reducer'
2 |
3 | /**
4 | * receiveLocale - Receive locate to set from the main process.
5 | *
6 | * @param {object} event Event
7 | * @param {string} locale Locale
8 | * @returns {(dispatch:Function) => void} Thunk
9 | */
10 | export const receiveLocale = (event, locale) => dispatch => {
11 | dispatch(setLocale(locale))
12 | }
13 |
--------------------------------------------------------------------------------
/renderer/reducers/locale/selectors.js:
--------------------------------------------------------------------------------
1 | const currentLocale = state => state.intl.locale
2 |
3 | export default {
4 | currentLocale,
5 | }
6 |
--------------------------------------------------------------------------------
/renderer/reducers/messages/index.js:
--------------------------------------------------------------------------------
1 | import messages from './messages'
2 |
3 | export default messages
4 |
--------------------------------------------------------------------------------
/renderer/reducers/modal/constants.js:
--------------------------------------------------------------------------------
1 | export const OPEN_MODAL = 'OPEN_MODAL'
2 | export const CLOSE_MODAL = 'CLOSE_MODAL'
3 | export const CLOSE_ALL_MODALS = 'CLOSE_ALL_MODALS'
4 | export const SET_MODALS = 'SET_MODALS'
5 | export const SET_TOP_MODAL = 'SET_TOP_MODAL'
6 | export const OPEN_DIALOG = 'SHOW_DIALOG'
7 | export const CLOSE_DIALOG = 'CLOSE_DIALOG'
8 |
--------------------------------------------------------------------------------
/renderer/reducers/modal/index.js:
--------------------------------------------------------------------------------
1 | import modalReducer from './reducer'
2 |
3 | export default modalReducer
4 | export modalSelectors from './selectors'
5 | export * from './constants'
6 | export * from './reducer'
7 |
--------------------------------------------------------------------------------
/renderer/reducers/modal/selectors.js:
--------------------------------------------------------------------------------
1 | const getModalState = state => state.modal.modals
2 |
3 | const isDialogOpen = (state, id) => Boolean(state.modal.dialogs[id])
4 |
5 | export default {
6 | getModalState,
7 | isDialogOpen,
8 | }
9 |
--------------------------------------------------------------------------------
/renderer/reducers/network/constants.js:
--------------------------------------------------------------------------------
1 | export const GET_DESCRIBE_NETWORK = 'GET_DESCRIBE_NETWORK'
2 | export const RECEIVE_DESCRIBE_NETWORK = 'RECEIVE_DESCRIBE_NETWORK'
3 | export const UPDATE_NODE_DATA = 'UPDATE_NODE_DATA'
4 |
--------------------------------------------------------------------------------
/renderer/reducers/network/index.js:
--------------------------------------------------------------------------------
1 | import networkReducer from './reducer'
2 |
3 | export default networkReducer
4 | export networkSelectors from './selectors'
5 | export * from './constants'
6 | export * from './reducer'
7 | export * from './utils'
8 |
--------------------------------------------------------------------------------
/renderer/reducers/network/selectors.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @typedef {import('../index').State} State
3 | * @typedef {import('./reducer').Node} Node
4 | */
5 |
6 | /**
7 | * nodesSelector - List of nodes on the network.
8 | *
9 | * @param {State} state Redux state
10 | * @returns {Node[]} List of nodes
11 | */
12 | const nodes = state => state.network.nodes
13 |
14 | export default {
15 | nodes,
16 | }
17 |
--------------------------------------------------------------------------------
/renderer/reducers/notification/constants.js:
--------------------------------------------------------------------------------
1 | export const NOTIFICATION_TIMEOUT_SHORT = 3000
2 | export const NOTIFICATION_TIMEOUT_LONG = 8000
3 | export const ENQUEUE_NOTIFICATION = 'ENQUEUE_NOTIFICATION'
4 | export const REMOVE_NOTIFICATION = 'REMOVE_NOTIFICATION'
5 | export const UPDATE_NOTIFICATION = 'UPDATE_NOTIFICATION'
6 |
--------------------------------------------------------------------------------
/renderer/reducers/notification/index.js:
--------------------------------------------------------------------------------
1 | import notificationReducer from './reducer'
2 |
3 | export default notificationReducer
4 | export notificationSelectors from './selectors'
5 | export * from './constants'
6 | export * from './reducer'
7 |
--------------------------------------------------------------------------------
/renderer/reducers/notification/selectors.js:
--------------------------------------------------------------------------------
1 | const notificationState = state => state.notification.notifications
2 |
3 | export default {
4 | notificationState,
5 | }
6 |
--------------------------------------------------------------------------------
/renderer/reducers/pay/constants.js:
--------------------------------------------------------------------------------
1 | export const QUERY_FEES = 'QUERY_FEES'
2 | export const QUERY_FEES_SUCCESS = 'QUERY_FEES_SUCCESS'
3 | export const QUERY_FEES_FAILURE = 'QUERY_FEES_FAILURE'
4 | export const QUERY_ROUTES = 'QUERY_ROUTES'
5 | export const QUERY_ROUTES_SUCCESS = 'QUERY_ROUTES_SUCCESS'
6 | export const QUERY_ROUTES_FAILURE = 'QUERY_ROUTES_FAILURE'
7 | export const SET_REDIRECT_PAY_REQ = 'SET_REDIRECT_PAY_REQ'
8 |
--------------------------------------------------------------------------------
/renderer/reducers/pay/index.js:
--------------------------------------------------------------------------------
1 | import payReducer from './reducer'
2 |
3 | export default payReducer
4 | export paySelectors from './selectors'
5 | export * from './constants'
6 | export * from './reducer'
7 | export * from './ipc'
8 |
--------------------------------------------------------------------------------
/renderer/reducers/payment/index.js:
--------------------------------------------------------------------------------
1 | import paymentReducer from './reducer'
2 |
3 | export default paymentReducer
4 | export paymentSelectors from './selectors'
5 | export * from './constants'
6 | export * from './reducer'
7 | export * from './utils'
8 |
--------------------------------------------------------------------------------
/renderer/reducers/settings/constants.js:
--------------------------------------------------------------------------------
1 | export const INIT_SETTINGS = 'INIT_SETTINGS'
2 | export const INIT_SETTINGS_SUCCESS = 'INIT_SETTINGS_SUCCESS'
3 | export const INIT_SETTINGS_FAILURE = 'INIT_SETTINGS_FAILURE'
4 | export const SET_SETTING = 'SET_SETTING'
5 |
--------------------------------------------------------------------------------
/renderer/reducers/settings/index.js:
--------------------------------------------------------------------------------
1 | import settingsReducer from './reducer'
2 |
3 | export default settingsReducer
4 | export settingsSelectors from './selectors'
5 | export * from './constants'
6 | export * from './reducer'
7 |
--------------------------------------------------------------------------------
/renderer/reducers/settings/messages.js:
--------------------------------------------------------------------------------
1 | import { defineMessages } from 'react-intl'
2 |
3 | // use pattern [reducer]_message
4 |
5 | /* eslint-disable max-len */
6 | export default defineMessages({
7 | settings_init_error: 'Unable to load settings: {error}',
8 | })
9 |
--------------------------------------------------------------------------------
/renderer/reducers/theme/constants.js:
--------------------------------------------------------------------------------
1 | export const SET_THEME = 'SET_THEME'
2 |
--------------------------------------------------------------------------------
/renderer/reducers/theme/index.js:
--------------------------------------------------------------------------------
1 | import themeReducer from './reducer'
2 |
3 | export default themeReducer
4 | export themeSelectors from './selectors'
5 | export * from './constants'
6 | export * from './reducer'
7 |
--------------------------------------------------------------------------------
/renderer/reducers/ticker/constants.js:
--------------------------------------------------------------------------------
1 | export const GET_TICKERS = 'GET_TICKERS'
2 | export const RECIEVE_TICKERS = 'RECIEVE_TICKERS'
3 |
--------------------------------------------------------------------------------
/renderer/reducers/ticker/index.js:
--------------------------------------------------------------------------------
1 | import tickerReducer from './reducer'
2 |
3 | export default tickerReducer
4 | export tickerSelectors from './selectors'
5 | export * from './constants'
6 | export * from './reducer'
7 |
--------------------------------------------------------------------------------
/renderer/reducers/transaction/constants.js:
--------------------------------------------------------------------------------
1 | export const GET_TRANSACTIONS = 'GET_TRANSACTIONS'
2 | export const RECEIVE_TRANSACTIONS = 'RECEIVE_TRANSACTIONS'
3 | export const SEND_TRANSACTION = 'SEND_TRANSACTION'
4 | export const TRANSACTION_SUCCESSFUL = 'TRANSACTION_SUCCESSFUL'
5 | export const TRANSACTION_FAILED = 'TRANSACTION_FAILED'
6 | export const TRANSACTION_COMPLETE = 'TRANSACTION_COMPLETE'
7 |
--------------------------------------------------------------------------------
/renderer/reducers/transaction/index.js:
--------------------------------------------------------------------------------
1 | import transactionReducer from './reducer'
2 |
3 | export default transactionReducer
4 | export transactionSelectors from './selectors'
5 | export * from './constants'
6 | export * from './reducer'
7 | export * from './utils'
8 |
--------------------------------------------------------------------------------
/renderer/reducers/transaction/messages.js:
--------------------------------------------------------------------------------
1 | import { defineMessages } from 'react-intl'
2 |
3 | // use pattern [reducer]_message
4 |
5 | /* eslint-disable max-len */
6 | export default defineMessages({
7 | transaction_received_title: 'On-chain Transaction Received!',
8 | transaction_received_body: `Lucky you, you just received a new on-chain transaction. I'm jealous.`,
9 | transaction_sent_title: 'On-chain Transaction Sent!',
10 | transaction_sent_body: `Hate to see 'em go but love to watch 'em leave. Your on-chain transaction successfully sent.`,
11 | })
12 |
--------------------------------------------------------------------------------
/renderer/reducers/wallet/constants.js:
--------------------------------------------------------------------------------
1 | export const SET_WALLETS = 'SET_WALLETS'
2 | export const SET_WALLETS_LOADED = 'SET_WALLETS_LOADED'
3 | export const DELETE_WALLET = 'DELETE_WALLET'
4 | export const OPEN_DELETE_WALLET_DIALOG = 'OPEN_DELETE_WALLET_DIALOG'
5 | export const CLOSE_DELETE_WALLET_DIALOG = 'CLOSE_DELETE_WALLET_DIALOG'
6 | export const DELETE_WALLET_SUCCESS = 'DELETE_WALLET_SUCCESS'
7 | export const DELETE_WALLET_FAILURE = 'DELETE_WALLET_FAILURE'
8 | export const PUT_WALLET = 'PUT_WALLET'
9 | export const DELETE_WALLET_DIALOG_ID = 'DELETE_WALLET_DIALOG_ID'
10 |
--------------------------------------------------------------------------------
/renderer/reducers/wallet/index.js:
--------------------------------------------------------------------------------
1 | import walletReducer from './reducer'
2 |
3 | export default walletReducer
4 | export walletSelectors from './selectors'
5 | export * from './constants'
6 | export * from './reducer'
7 |
--------------------------------------------------------------------------------
/renderer/store/configureStore.js:
--------------------------------------------------------------------------------
1 | if (process.env.NODE_ENV === 'production') {
2 | module.exports = require('./configureStore.prod') // eslint-disable-line global-require
3 | } else {
4 | module.exports = require('./configureStore.dev') // eslint-disable-line global-require
5 | }
6 |
--------------------------------------------------------------------------------
/renderer/store/middleware/index.js:
--------------------------------------------------------------------------------
1 | export debounceMiddleware from './debounceMiddleware'
2 | export userTimingMiddleware from './userTimingMiddleware'
3 |
--------------------------------------------------------------------------------
/renderer/store/middleware/userTimingMiddleware.js:
--------------------------------------------------------------------------------
1 | /**
2 | * userTiming - Action profiling middleware.
3 | *
4 | * @returns {object} Modified action
5 | */
6 | const userTiming = () => next => action => {
7 | // user timing API is not available
8 | if (!performance || !performance.mark) {
9 | return next(action)
10 | }
11 |
12 | // measure redux action
13 | performance.mark(`${action.type}_START`)
14 | const result = next(action)
15 | performance.mark(`${action.type}_END`)
16 | performance.measure(`${action.type}`, `${action.type}_START`, `${action.type}_END`)
17 | return result
18 | }
19 |
20 | export default userTiming
21 |
--------------------------------------------------------------------------------
/renderer/store/schema/setting.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @class Setting
3 | * Setting helper class.
4 | */
5 | export default class Setting {
6 | static SCHEMA = {
7 | key: String,
8 | value: String,
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/renderer/themes/autopay/index.js:
--------------------------------------------------------------------------------
1 | import { createThemeVariant } from '../util'
2 | import { palette } from '../base'
3 |
4 | const customiseTheme = theme => {
5 | return createThemeVariant('autopay', {
6 | colors: {
7 | ...theme.colors,
8 | primaryAccent: palette.superBlue,
9 | },
10 | })
11 | }
12 |
13 | export default customiseTheme
14 |
--------------------------------------------------------------------------------
/renderer/themes/dark/index.js:
--------------------------------------------------------------------------------
1 | import { createThemeVariant } from '../util'
2 | import colors from './colors'
3 |
4 | export default createThemeVariant('dark', { colors })
5 |
--------------------------------------------------------------------------------
/renderer/themes/index.js:
--------------------------------------------------------------------------------
1 | import dark from './dark'
2 | import light from './light'
3 | import autopay from './autopay'
4 |
5 | export { dark }
6 | export { light }
7 | export { autopay }
8 |
9 | export default { dark, light, autopay }
10 |
--------------------------------------------------------------------------------
/renderer/themes/light/index.js:
--------------------------------------------------------------------------------
1 | import { createThemeVariant } from '../util'
2 | import colors from './colors'
3 | import shadows from './shadows'
4 |
5 | const theme = createThemeVariant('light', { colors, shadows })
6 |
7 | export default theme
8 |
--------------------------------------------------------------------------------
/renderer/themes/light/shadows.js:
--------------------------------------------------------------------------------
1 | export default {
2 | m: '0 2px 12px 0 rgba(0, 0, 0, 0.2)',
3 | }
4 |
--------------------------------------------------------------------------------
/renderer/themes/util/createThemeVariant.js:
--------------------------------------------------------------------------------
1 | import merge from 'lodash/merge'
2 | import base from '../base'
3 |
4 | const createThemeVariant = (name, overrides = {}) => {
5 | const { colors, ...rest } = overrides
6 |
7 | const theme = {
8 | name,
9 | ...base,
10 | colors,
11 | }
12 |
13 | return merge({}, theme, rest)
14 | }
15 |
16 | export default createThemeVariant
17 |
--------------------------------------------------------------------------------
/renderer/themes/util/index.js:
--------------------------------------------------------------------------------
1 | export createThemeVariant from './createThemeVariant'
2 | export extractSpaceProps from './extractSpaceProps'
3 |
--------------------------------------------------------------------------------
/renderer/workers/neutrino.worker.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable no-restricted-globals */
2 |
3 | import { expose } from 'comlink'
4 | import Neutrino from '@zap/services/neutrino'
5 |
6 | expose(Neutrino, self)
7 |
--------------------------------------------------------------------------------
/resources/icon.icns:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LN-Zap/zap-desktop/d44d45c6050538a6e4db95b7f69facf210b8db95/resources/icon.icns
--------------------------------------------------------------------------------
/resources/icon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LN-Zap/zap-desktop/d44d45c6050538a6e4db95b7f69facf210b8db95/resources/icon.ico
--------------------------------------------------------------------------------
/resources/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LN-Zap/zap-desktop/d44d45c6050538a6e4db95b7f69facf210b8db95/resources/icon.png
--------------------------------------------------------------------------------
/resources/linux/128x128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LN-Zap/zap-desktop/d44d45c6050538a6e4db95b7f69facf210b8db95/resources/linux/128x128.png
--------------------------------------------------------------------------------
/resources/linux/16x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LN-Zap/zap-desktop/d44d45c6050538a6e4db95b7f69facf210b8db95/resources/linux/16x16.png
--------------------------------------------------------------------------------
/resources/linux/24x24.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LN-Zap/zap-desktop/d44d45c6050538a6e4db95b7f69facf210b8db95/resources/linux/24x24.png
--------------------------------------------------------------------------------
/resources/linux/256x256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LN-Zap/zap-desktop/d44d45c6050538a6e4db95b7f69facf210b8db95/resources/linux/256x256.png
--------------------------------------------------------------------------------
/resources/linux/32x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LN-Zap/zap-desktop/d44d45c6050538a6e4db95b7f69facf210b8db95/resources/linux/32x32.png
--------------------------------------------------------------------------------
/resources/linux/48x48.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LN-Zap/zap-desktop/d44d45c6050538a6e4db95b7f69facf210b8db95/resources/linux/48x48.png
--------------------------------------------------------------------------------
/resources/linux/512x512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LN-Zap/zap-desktop/d44d45c6050538a6e4db95b7f69facf210b8db95/resources/linux/512x512.png
--------------------------------------------------------------------------------
/resources/linux/64x64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LN-Zap/zap-desktop/d44d45c6050538a6e4db95b7f69facf210b8db95/resources/linux/64x64.png
--------------------------------------------------------------------------------
/resources/mac/entitlements.mac.inherit.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.cs.allow-jit
6 |
7 | com.apple.security.cs.allow-unsigned-executable-memory
8 |
9 | com.apple.security.cs.allow-dyld-environment-variables
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/scripts/lnd-release/canary.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | git tag `git describe` || true
4 | GOVERSION=$(go version | awk '{print $3;}') goreleaser release --rm-dist --skip-validate
5 |
--------------------------------------------------------------------------------
/scripts/signedchecksum.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | set -euo pipefail
3 |
4 | run_dir=$(pwd)
5 | cd $(mktemp -d)
6 |
7 | echo "Downloading build artefacts to temporary directory:"
8 | pwd
9 |
10 | curl https://api.github.com/repos/LN-Zap/zap-desktop/releases/latest | jq '.assets[].browser_download_url' | xargs wget
11 |
12 | echo "Calculating checksums and signing the result..."
13 |
14 | export GPG_TTY=$(tty)
15 | shasum --algorithm 256 * | gpg --clearsign --local-user "Zap Solutions" > "$run_dir/SHASUMS256.txt.asc"
16 |
17 | echo "Created SHASUM256.txt.asc"
18 |
--------------------------------------------------------------------------------
/services/bitcoind/index.js:
--------------------------------------------------------------------------------
1 | // TODO: Bitcoind process controller code to go here.
2 |
--------------------------------------------------------------------------------
/services/grpc/helpers.js:
--------------------------------------------------------------------------------
1 | import { grpcLog } from '@zap/utils/log'
2 |
3 | /**
4 | * logGrpcCmd - Logs a service method invocation.
5 | *
6 | * @param {string} method Name of method to log
7 | * @param {any} payload Payload of method to log
8 | */
9 | export function logGrpcCmd(method, payload) {
10 | grpcLog.info(`Calling ${method} with payload: %o`, payload)
11 | }
12 |
--------------------------------------------------------------------------------
/services/neutrino/index.js:
--------------------------------------------------------------------------------
1 | import Neutrino from './neutrino'
2 |
3 | export default Neutrino
4 | export {
5 | NEUTRINO_CHAIN_SYNC_PENDING,
6 | NEUTRINO_CHAIN_SYNC_WAITING,
7 | NEUTRINO_CHAIN_SYNC_IN_PROGRESS,
8 | NEUTRINO_CHAIN_SYNC_COMPLETE,
9 | NEUTRINO_ERROR,
10 | NEUTRINO_EXIT,
11 | NEUTRINO_WALLET_UNLOCKER_GRPC_ACTIVE,
12 | NEUTRINO_LIGHTNING_GRPC_ACTIVE,
13 | NEUTRINO_GOT_CURRENT_BLOCK_HEIGHT,
14 | NEUTRINO_GOT_LND_BLOCK_HEIGHT,
15 | NEUTRINO_GOT_LND_CFILTER_HEIGHT,
16 | } from './neutrino'
17 |
--------------------------------------------------------------------------------
/stories/.eslintrc:
--------------------------------------------------------------------------------
1 | {
2 | "rules": {
3 | "react/display-name": 0,
4 | "no-console": 0,
5 | "no-alert": 0,
6 | "shopify/jsx-no-hardcoded-content": 0
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/stories/components/bar.stories.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { storiesOf } from '@storybook/react'
3 | import { Bar } from 'components/UI'
4 |
5 | storiesOf('Components', module).addWithChapters('Bar', {
6 | subtitle: 'For dividing sections.',
7 | info: `The Bar component is used to divide sections.`,
8 | chapters: [
9 | {
10 | sections: [
11 | {
12 | sectionFn: () => ,
13 | },
14 | {
15 | sectionFn: () => ,
16 | },
17 | ],
18 | },
19 | ],
20 | })
21 |
--------------------------------------------------------------------------------
/stories/components/link.stories.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { storiesOf } from '@storybook/react'
3 | import { Link } from 'components/UI'
4 |
5 | storiesOf('Components', module).addWithChapters('Link', {
6 | subtitle: 'For linking to content.',
7 | info: `The Link component is used to link to external content.`,
8 | chapters: [
9 | {
10 | sections: [
11 | {
12 | sectionFn: () => A link to something cool,
13 | },
14 | ],
15 | },
16 | ],
17 | })
18 |
--------------------------------------------------------------------------------
/stories/components/spinner.stories.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { storiesOf } from '@storybook/react'
3 | import { Spinner } from 'components/UI'
4 |
5 | storiesOf('Components', module).addWithChapters('Spinner', {
6 | subtitle: 'For letting the user know that something is happening.',
7 | chapters: [
8 | {
9 | sections: [
10 | {
11 | sectionFn: () => ,
12 | },
13 | ],
14 | },
15 | ],
16 | })
17 |
--------------------------------------------------------------------------------
/stories/containers/channels/channel-count.stories.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { storiesOf } from '@storybook/react'
3 | import { ChannelCount } from 'components/Channels'
4 | import { Provider } from '../../Provider'
5 |
6 | storiesOf('Containers.Channels', module)
7 | .addDecorator(story => )
8 | .addWithChapters('ChannelCount', {
9 | chapters: [
10 | {
11 | sections: [
12 | {
13 | sectionFn: () => {
14 | return
15 | },
16 | },
17 | ],
18 | },
19 | ],
20 | })
21 |
--------------------------------------------------------------------------------
/stories/containers/channels/channels-header.stories.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { storiesOf } from '@storybook/react'
3 | import ChannelsHeader from 'containers/Channels/ChannelsHeader'
4 | import { Provider } from '../../Provider'
5 |
6 | storiesOf('Containers.Channels', module)
7 | .addDecorator(story => )
8 | .addWithChapters('ChannelsHeader', {
9 | chapters: [
10 | {
11 | sections: [
12 | {
13 | sectionFn: () => ,
14 | },
15 | ],
16 | },
17 | ],
18 | })
19 |
--------------------------------------------------------------------------------
/stories/containers/login.stories.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { storiesOf } from '@storybook/react'
3 | import Login from 'containers/Login'
4 | import { LoginNotAllowed } from 'components/Login'
5 | import { Provider } from '../Provider'
6 | import { Window } from '../helpers'
7 |
8 | storiesOf('Containers.Login', module)
9 | .addDecorator(story => )
10 | .addDecorator(story => {story()})
11 | .add('Login', () => {
12 | return
13 | })
14 | .add('Login not allowed', () => {
15 | return
16 | })
17 |
--------------------------------------------------------------------------------
/stories/containers/pay.stories.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable max-len */
2 |
3 | import React from 'react'
4 | import { storiesOf } from '@storybook/react'
5 | import { Modal } from 'components/UI'
6 | import Pay from 'containers/Pay'
7 | import { Provider } from '../Provider'
8 | import { Window } from '../helpers'
9 |
10 | storiesOf('Containers.Pay', module)
11 | .addDecorator(story => )
12 | .addDecorator(story => {story()})
13 | .add('Pay', () => {
14 | return (
15 |
16 |
17 |
18 | )
19 | })
20 |
--------------------------------------------------------------------------------
/stories/containers/profilepage.stories.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { storiesOf } from '@storybook/react'
3 | import ProfilePage from 'containers/Profile/ProfilePage'
4 | import { Provider } from '../Provider'
5 | import { Window } from '../helpers'
6 |
7 | storiesOf('Containers.ProfilePage', module)
8 | .addParameters({ info: { disable: true } })
9 | .addDecorator(story => )
10 | .addDecorator(story => {story()})
11 | .add('ProfilePage', () => )
12 |
--------------------------------------------------------------------------------
/stories/containers/request.stories.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable max-len */
2 |
3 | import React from 'react'
4 | import { storiesOf } from '@storybook/react'
5 | import { Modal } from 'components/UI'
6 | import Request from 'containers/Request'
7 | import { Provider } from '../Provider'
8 | import { Window } from '../helpers'
9 |
10 | storiesOf('Containers.Request', module)
11 | .addDecorator(story => )
12 | .addDecorator(story => {story()})
13 | .add('Request', () => {
14 | return (
15 |
16 |
17 |
18 | )
19 | })
20 |
--------------------------------------------------------------------------------
/stories/containers/settingsmenu.stories.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { storiesOf } from '@storybook/react'
3 | import SettingsMenu from 'containers/Settings/SettingsMenu'
4 | import { Provider } from '../Provider'
5 | import { Window } from '../helpers'
6 |
7 | storiesOf('Containers.SettingsMenu', module)
8 | .addDecorator(story => {story()})
9 | .addDecorator(story => )
10 | .add('SettingsMenu', () => (
11 |
12 | ))
13 |
--------------------------------------------------------------------------------
/stories/containers/wallet.stories.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { storiesOf } from '@storybook/react'
3 | import { MainContent } from 'components/UI'
4 | import Wallet from 'containers/Wallet'
5 | import { Provider } from '../Provider'
6 | import { Window } from '../helpers'
7 |
8 | storiesOf('Containers.Wallet', module)
9 | .addDecorator(story => )
10 | .addDecorator(story => {story()})
11 | .add('Wallet', () => (
12 |
13 |
14 |
15 | ))
16 |
--------------------------------------------------------------------------------
/stories/dialogs/app-crashed.stories.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { storiesOf } from '@storybook/react'
3 | import { DialogAppCrashed } from 'components/Dialog'
4 | import { Window } from '../helpers'
5 |
6 | storiesOf('Dialogs', module)
7 | .addDecorator(story => {story()})
8 | .add('App Crashed', () => (
9 | {}}
13 | onSubmit={() => {}}
14 | />
15 | ))
16 |
--------------------------------------------------------------------------------
/stories/dialogs/channel-close.stories.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { storiesOf } from '@storybook/react'
3 | import { ChannelCloseDialog } from 'components/Channels'
4 | import { Window } from '../helpers'
5 |
6 | storiesOf('Dialogs', module)
7 | .addDecorator(story => {story()})
8 | .add('Channel Close', () => (
9 | {}} onClose={() => {}} />
10 | ))
11 |
--------------------------------------------------------------------------------
/stories/dialogs/delete-wallet.stories.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { storiesOf } from '@storybook/react'
3 | import { DeleteWalletDialog } from 'components/Home'
4 | import { Window } from '../helpers'
5 |
6 | storiesOf('Dialogs', module)
7 | .addDecorator(story => {story()})
8 | .add('Delete Wallet', () => (
9 | {}}
12 | onDelete={() => {}}
13 | walletDir="/path/to/wallet/would/show/here"
14 | />
15 | ))
16 |
--------------------------------------------------------------------------------
/stories/dialogs/lnd-crashed.stories.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { storiesOf } from '@storybook/react'
3 | import { DialogLndCrashed } from 'components/Dialog'
4 | import { Window } from '../helpers'
5 |
6 | storiesOf('Dialogs', module)
7 | .addDecorator(story => {story()})
8 | .add('Lnd Crashed', () => (
9 | {}}
17 | />
18 | ))
19 |
--------------------------------------------------------------------------------
/stories/dialogs/lnurl-withdrawal-prompt.stories.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { storiesOf } from '@storybook/react'
3 | import { LnurlWithdrawPrompt } from 'components/Lnurl'
4 | import { Window } from '../helpers'
5 |
6 | storiesOf('Dialogs', module)
7 | .addDecorator(story => {story()})
8 | .add('Lnurl withdraw confirmation', () => (
9 | {}}
11 | onSkip={() => {}}
12 | params={{ amount: 10000, service: 'http://zaphq.io' }}
13 | />
14 | ))
15 |
--------------------------------------------------------------------------------
/stories/dialogs/password-change.stories.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { storiesOf } from '@storybook/react'
3 | import ChangePasswordDialog from 'components/Settings/Security/ChangePasswordDialog'
4 | import { Window } from '../helpers'
5 |
6 | storiesOf('Dialogs', module)
7 | .addDecorator(story => {story()})
8 | .add('Password Change', () => )
9 |
--------------------------------------------------------------------------------
/stories/dialogs/password-prompt.stories.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { storiesOf } from '@storybook/react'
3 | import PasswordPromptDialog from 'components/Settings/Security/PasswordPromptDialog'
4 | import { Window } from '../helpers'
5 |
6 | storiesOf('Dialogs', module)
7 | .addDecorator(story => {story()})
8 | .add('Password Prompt', () => )
9 |
--------------------------------------------------------------------------------
/stories/dialogs/password-set.stories.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { storiesOf } from '@storybook/react'
3 | import SetPasswordDialog from 'components/Settings/Security/SetPasswordDialog'
4 | import { Window } from '../helpers'
5 |
6 | storiesOf('Dialogs', module)
7 | .addDecorator(story => {story()})
8 | .add('Password Set', () => )
9 |
--------------------------------------------------------------------------------
/stories/dialogs/payment-error-details.stories.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { storiesOf } from '@storybook/react'
3 | import ErrorDetailsDialog from 'components/Activity/ErrorDetailsDialog'
4 | import { Window } from '../helpers'
5 |
6 | storiesOf('Dialogs', module)
7 | .addDecorator(story => {story()})
8 | .add('Payment Error Details', () => (
9 | {}}
13 | onCopy={() => {}}
14 | />
15 | ))
16 |
--------------------------------------------------------------------------------
/stories/dialogs/skip-backup.stories.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { storiesOf } from '@storybook/react'
3 | import SkipBackupsDialog from 'components/Onboarding/Steps/components/SkipBackupsDialog'
4 | import { Window } from '../helpers'
5 |
6 | storiesOf('Dialogs', module)
7 | .addDecorator(story => {story()})
8 | .add('Skip Backups', () => (
9 | {}} onSkip={() => {}} />
10 | ))
11 |
--------------------------------------------------------------------------------
/stories/dialogs/wallet-create-error.stories.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { storiesOf } from '@storybook/react'
3 | import OnboardingErrorDialog from 'components/Onboarding/Steps/components/ErrorDialog'
4 | import { Window } from '../helpers'
5 |
6 | storiesOf('Dialogs', module)
7 | .addDecorator(story => {story()})
8 | .add('Wallet Create Error', () => (
9 | {}} />
10 | ))
11 |
--------------------------------------------------------------------------------
/stories/dialogs/wallet-recover-error.stories.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { storiesOf } from '@storybook/react'
3 | import OnboardingErrorDialog from 'components/Onboarding/Steps/components/ErrorDialog'
4 | import { Window } from '../helpers'
5 |
6 | storiesOf('Dialogs', module)
7 | .addDecorator(story => {story()})
8 | .add('Wallet Recover Error', () => (
9 | {}} />
10 | ))
11 |
--------------------------------------------------------------------------------
/test/.eslintrc:
--------------------------------------------------------------------------------
1 | {
2 | "env": {
3 | "jest/globals": true
4 | },
5 | "plugins": ["jest"],
6 | "extends": ["plugin:jest/recommended"],
7 | "rules": {
8 | "no-console": 0,
9 | "no-alert": 0,
10 | "jest/no-mocks-import": 0,
11 | "shopify/jsx-no-hardcoded-content": 0
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/test/e2e/.eslintrc:
--------------------------------------------------------------------------------
1 | {
2 | "rules": {
3 | "jest/no-test-callback": 0,
4 | "jest/expect-expect": 0
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/test/e2e/app.spec.js:
--------------------------------------------------------------------------------
1 | import { waitForReact } from 'testcafe-react-selectors'
2 | import { getBaseUrl, getPageTitle, assertNoConsoleErrors } from './utils/helpers'
3 | import Loading from './pages/loading'
4 |
5 | const loadingPage = new Loading()
6 |
7 | fixture('App')
8 | .page(getBaseUrl())
9 | .beforeEach(async () => {
10 | await waitForReact()
11 | })
12 | .afterEach(assertNoConsoleErrors)
13 |
14 | test('should open window and show loading screen', async t => {
15 | const { loadingBolt } = loadingPage
16 |
17 | await t
18 | .expect(getPageTitle())
19 | .eql('Zap')
20 | .expect(loadingBolt.exists)
21 | .ok()
22 | })
23 |
--------------------------------------------------------------------------------
/test/e2e/fixtures/readonly.macaroon:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LN-Zap/zap-desktop/d44d45c6050538a6e4db95b7f69facf210b8db95/test/e2e/fixtures/readonly.macaroon
--------------------------------------------------------------------------------
/test/e2e/pages/loading.js:
--------------------------------------------------------------------------------
1 | import { ReactSelector } from 'testcafe-react-selectors'
2 |
3 | class Syncing {
4 | loadingBolt = ReactSelector('LoadingBolt')
5 | }
6 |
7 | export default Syncing
8 |
--------------------------------------------------------------------------------
/test/e2e/pages/syncing.js:
--------------------------------------------------------------------------------
1 | import { ReactSelector } from 'testcafe-react-selectors'
2 |
3 | class Syncing {
4 | syncing = ReactSelector('Syncing')
5 | }
6 |
7 | export default Syncing
8 |
--------------------------------------------------------------------------------
/test/unit/__helpers__/intl.js:
--------------------------------------------------------------------------------
1 | import { createIntl, createIntlCache } from 'react-intl'
2 | import messages from '@zap/translations/en.json'
3 | // This is optional but highly recommended
4 | // since it prevents memory leak
5 | const cache = createIntlCache()
6 | const intl = createIntl(
7 | {
8 | locale: 'en',
9 | messages,
10 | },
11 | cache
12 | )
13 |
14 | export default intl
15 |
--------------------------------------------------------------------------------
/test/unit/__helpers__/renderWithTheme.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { ThemeProvider } from 'styled-components'
3 | import renderer from 'react-test-renderer'
4 | import { dark } from 'themes'
5 |
6 | export const renderWithTheme = component => {
7 | return renderer.create({component})
8 | }
9 |
--------------------------------------------------------------------------------
/test/unit/__helpers__/snapshotDiff.js:
--------------------------------------------------------------------------------
1 | import snapshotDiff from 'snapshot-diff'
2 |
3 | const snapDiff = (a, b, options) => {
4 | return snapshotDiff(a, b, { ...{ expand: true }, ...options })
5 | }
6 |
7 | export default snapDiff
8 |
--------------------------------------------------------------------------------
/test/unit/__mocks__/comlinkjs.js:
--------------------------------------------------------------------------------
1 | module.exports = {}
2 |
--------------------------------------------------------------------------------
/test/unit/__mocks__/dexie.js:
--------------------------------------------------------------------------------
1 | import Dexie from 'dexie'
2 |
3 | Dexie.dependencies.indexedDB = require('fake-indexeddb')
4 | Dexie.dependencies.IDBKeyRange = require('fake-indexeddb/lib/FDBKeyRange')
5 |
6 | module.exports = Dexie
7 |
--------------------------------------------------------------------------------
/test/unit/__mocks__/dns.js:
--------------------------------------------------------------------------------
1 | const dns = jest.genMockFromModule('dns')
2 |
3 | /**
4 | * lookup - Mock lookup.
5 | *
6 | * @param {string} hostname Hostname
7 | * @param {object} options Options
8 | * @param {Function} callback Callback
9 | */
10 | function lookup(hostname, options, callback = jest.fn()) {
11 | let cb = callback
12 | if (typeof options === 'function') {
13 | cb = options
14 | }
15 | process.nextTick(cb, null, hostname)
16 | }
17 |
18 | dns.lookup = lookup
19 |
20 | module.exports = dns
21 |
--------------------------------------------------------------------------------
/test/unit/__mocks__/electron.js:
--------------------------------------------------------------------------------
1 | const { normalize } = require('path')
2 | const EventEmitter = require('events')
3 |
4 | module.exports = {
5 | require: jest.fn(),
6 | match: jest.fn(),
7 | app: {
8 | getPath: name => normalize(`/tmp/zap-test/${name}`),
9 | getAppPath: () => normalize(`${__dirname}/../../`),
10 | getLocale: jest.fn(),
11 | },
12 | remote: {
13 | dialog: {
14 | showOpenDialog: jest.fn(),
15 | },
16 | app: {
17 | getLocale: jest.fn(),
18 | },
19 | },
20 | dialog: jest.fn(),
21 | BrowserWindow: jest.fn(),
22 | ipcMain: new EventEmitter(),
23 | }
24 |
--------------------------------------------------------------------------------
/test/unit/__mocks__/fileMock.js:
--------------------------------------------------------------------------------
1 | export default 'test-file-stub'
2 |
--------------------------------------------------------------------------------
/test/unit/__mocks__/grpc.js:
--------------------------------------------------------------------------------
1 | module.exports = {}
2 |
--------------------------------------------------------------------------------
/test/unit/__mocks__/keytar.js:
--------------------------------------------------------------------------------
1 | import get from 'lodash/get'
2 | import set from 'lodash/set'
3 |
4 | const db = {}
5 |
6 | export default {
7 | setPassword(service, account, password) {
8 | set(db, [service, account], password)
9 | return Promise.resolve()
10 | },
11 |
12 | getPassword(service, account) {
13 | return Promise.resolve(get(db, [service, account], null))
14 | },
15 |
16 | deletePassword(service, account) {
17 | set(db, [service, account], null)
18 | return Promise.resolve()
19 | },
20 | }
21 |
--------------------------------------------------------------------------------
/test/unit/__mocks__/react-spring/renderprops.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | animated: { div: jest.fn() },
3 | Transition: jest.fn(),
4 | }
5 |
--------------------------------------------------------------------------------
/test/unit/components/Form/Checkbox.spec.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { Form } from 'informed'
3 | import { renderWithTheme } from '@zap/test/unit/__helpers__/renderWithTheme'
4 | import { Checkbox } from 'components/Form'
5 |
6 | describe('component.UI.Checkbox', () => {
7 | it('should render correctly', () => {
8 | const tree = renderWithTheme(
9 |
13 | ).toJSON()
14 | expect(tree).toMatchSnapshot()
15 | })
16 | })
17 |
--------------------------------------------------------------------------------
/test/unit/components/Form/Form.spec.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { renderWithTheme } from '@zap/test/unit/__helpers__/renderWithTheme'
3 | import { Form } from 'components/Form'
4 |
5 | describe('component.UI.Form', () => {
6 | it('should render correctly', () => {
7 | const tree = renderWithTheme().toJSON()
8 | expect(tree).toMatchSnapshot()
9 | })
10 | })
11 |
--------------------------------------------------------------------------------
/test/unit/components/Form/Input.spec.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { Form } from 'informed'
3 | import { renderWithTheme } from '@zap/test/unit/__helpers__/renderWithTheme'
4 | import { Input } from 'components/Form'
5 |
6 | describe('component.UI.Input', () => {
7 | it('should render correctly', () => {
8 | const tree = renderWithTheme(
9 |
12 | ).toJSON()
13 | expect(tree).toMatchSnapshot()
14 | })
15 | })
16 |
--------------------------------------------------------------------------------
/test/unit/components/Form/NodePubkeyInput.spec.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { Form } from 'informed'
3 | import { IntlProvider } from 'react-intl'
4 | import { renderWithTheme } from '@zap/test/unit/__helpers__/renderWithTheme'
5 | import { NodePubkeyInput } from 'components/Form'
6 |
7 | describe('component.UI.NodePubkeyInput', () => {
8 | it('should render correctly', () => {
9 | const tree = renderWithTheme(
10 |
11 |
14 |
15 | ).toJSON()
16 | expect(tree).toMatchSnapshot()
17 | })
18 | })
19 |
--------------------------------------------------------------------------------
/test/unit/components/Form/PasswordInput.spec.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { renderWithTheme } from '@zap/test/unit/__helpers__/renderWithTheme'
3 | import { PasswordInput } from 'components/Form'
4 |
5 | describe('component.UI.PasswordInput', () => {
6 | it('should render correctly', () => {
7 | const tree = renderWithTheme().toJSON()
8 | expect(tree).toMatchSnapshot()
9 | })
10 | })
11 |
--------------------------------------------------------------------------------
/test/unit/components/Form/Range.spec.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { Form } from 'informed'
3 | import { renderWithTheme } from '@zap/test/unit/__helpers__/renderWithTheme'
4 | import { Range } from 'components/Form'
5 |
6 | describe('component.UI.Range', () => {
7 | it('should render correctly', () => {
8 | const tree = renderWithTheme(
9 |
12 | ).toJSON()
13 | expect(tree).toMatchSnapshot()
14 | })
15 | })
16 |
--------------------------------------------------------------------------------
/test/unit/components/Form/TextArea.spec.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { Form } from 'informed'
3 | import { renderWithTheme } from '@zap/test/unit/__helpers__/renderWithTheme'
4 | import { TextArea } from 'components/Form'
5 |
6 | describe('component.UI.Input', () => {
7 | it('should render correctly', () => {
8 | const tree = renderWithTheme(
9 |
12 | ).toJSON()
13 | expect(tree).toMatchSnapshot()
14 | })
15 | })
16 |
--------------------------------------------------------------------------------
/test/unit/components/Form/Toggle.spec.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { Form } from 'informed'
3 | import { renderWithTheme } from '@zap/test/unit/__helpers__/renderWithTheme'
4 | import { Toggle } from 'components/Form'
5 |
6 | describe('component.UI.Toggle', () => {
7 | it('should render correctly', () => {
8 | const tree = renderWithTheme(
9 |
12 | ).toJSON()
13 | expect(tree).toMatchSnapshot()
14 | })
15 | })
16 |
--------------------------------------------------------------------------------
/test/unit/components/Form/__snapshots__/Form.spec.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`component.UI.Form should render correctly 1`] = `
4 |
11 | `;
12 |
--------------------------------------------------------------------------------
/test/unit/components/Home/CreateWalletButton.spec.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { IntlProvider } from 'react-intl'
3 | import { renderWithTheme } from '@zap/test/unit/__helpers__/renderWithTheme'
4 | import CreateWalletButton from 'components/Home/CreateWalletButton'
5 |
6 | const history = { push: jest.fn() }
7 |
8 | describe('component.CreateWalletButton', () => {
9 | it('should render correctly', () => {
10 | const tree = renderWithTheme(
11 |
12 |
13 |
14 | ).toJSON()
15 | expect(tree).toMatchSnapshot()
16 | })
17 | })
18 |
--------------------------------------------------------------------------------
/test/unit/components/Home/WalletHeader.spec.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { shallow } from 'enzyme'
3 | import toJSON from 'enzyme-to-json'
4 | import WalletHeader from 'components/Home/WalletHeader'
5 |
6 | describe('component.WalletHeader', () => {
7 | it('should render correctly', () => {
8 | const wallet = {
9 | type: 'local',
10 | id: 1,
11 | host: 'local.host',
12 | name: 'Wallet name',
13 | }
14 | const wrapper = shallow()
15 | expect(toJSON(wrapper)).toMatchSnapshot()
16 | })
17 | })
18 |
--------------------------------------------------------------------------------
/test/unit/components/Home/__snapshots__/WalletHeader.spec.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`component.WalletHeader should render correctly 1`] = `
4 |
5 |
14 |
24 |
25 |
26 | `;
27 |
--------------------------------------------------------------------------------
/test/unit/components/Pay/PayButtons.spec.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { shallow } from 'enzyme'
3 | import toJSON from 'enzyme-to-json'
4 | import { PayButtons } from 'components/Pay'
5 |
6 | describe('component.Form.PayButtons', () => {
7 | it('should render correctly with default props', () => {
8 | const wrapper = shallow()
9 | expect(toJSON(wrapper)).toMatchSnapshot()
10 | })
11 | })
12 |
--------------------------------------------------------------------------------
/test/unit/components/Pay/PaySummaryRow.spec.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { shallow } from 'enzyme'
3 | import toJSON from 'enzyme-to-json'
4 | import { DataRow } from 'components/UI'
5 |
6 | describe('component.Form.DataRow', () => {
7 | it('should render correctly', () => {
8 | const wrapper = shallow()
9 | expect(toJSON(wrapper)).toMatchSnapshot()
10 | })
11 | })
12 |
--------------------------------------------------------------------------------
/test/unit/components/Pay/__snapshots__/PaySummaryRow.spec.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`component.Form.DataRow should render correctly 1`] = `
4 |
7 |
11 |
15 | left contnet
16 |
17 |
21 | right content
22 |
23 |
24 |
25 | `;
26 |
--------------------------------------------------------------------------------
/test/unit/components/UI/ActionBar.spec.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { renderWithTheme } from '@zap/test/unit/__helpers__/renderWithTheme'
3 | import { ActionBar } from 'components/UI'
4 |
5 | describe('component.UI.ActionBar', () => {
6 | it('should render correctly', () => {
7 | const tree = renderWithTheme(
8 | {} },
11 | { name: 'Cancel', onClick: () => {} },
12 | ]}
13 | />
14 | ).toJSON()
15 | expect(tree).toMatchSnapshot()
16 | })
17 | })
18 |
--------------------------------------------------------------------------------
/test/unit/components/UI/BackgroundDark.spec.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { renderWithTheme } from '@zap/test/unit/__helpers__/renderWithTheme'
3 | import { BackgroundPrimary } from 'components/UI'
4 |
5 | describe('component.UI.BackgroundPrimary', () => {
6 | it('should render correctly', () => {
7 | const tree = renderWithTheme().toJSON()
8 | expect(tree).toMatchSnapshot()
9 | })
10 | })
11 |
--------------------------------------------------------------------------------
/test/unit/components/UI/BackgroundLight.spec.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { renderWithTheme } from '@zap/test/unit/__helpers__/renderWithTheme'
3 | import { BackgroundTertiary } from 'components/UI'
4 |
5 | describe('component.UI.BackgroundTertiary', () => {
6 | it('should render correctly', () => {
7 | const tree = renderWithTheme().toJSON()
8 | expect(tree).toMatchSnapshot()
9 | })
10 | })
11 |
--------------------------------------------------------------------------------
/test/unit/components/UI/BackgroundLightest.spec.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { renderWithTheme } from '@zap/test/unit/__helpers__/renderWithTheme'
3 | import { BackgroundSecondary } from 'components/UI'
4 |
5 | describe('component.UI.BackgroundSecondary', () => {
6 | it('should render correctly', () => {
7 | const tree = renderWithTheme().toJSON()
8 | expect(tree).toMatchSnapshot()
9 | })
10 | })
11 |
--------------------------------------------------------------------------------
/test/unit/components/UI/BackgroundPrimary.spec.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { renderWithTheme } from '@zap/test/unit/__helpers__/renderWithTheme'
3 | import { BackgroundPrimary } from 'components/UI'
4 |
5 | describe('component.UI.BackgroundPrimary', () => {
6 | it('should render correctly', () => {
7 | const tree = renderWithTheme().toJSON()
8 | expect(tree).toMatchSnapshot()
9 | })
10 | })
11 |
--------------------------------------------------------------------------------
/test/unit/components/UI/Bar.spec.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { renderWithTheme } from '@zap/test/unit/__helpers__/renderWithTheme'
3 | import { Bar } from 'components/UI'
4 |
5 | describe('component.UI.Bar', () => {
6 | it('should render correctly', () => {
7 | const tree = renderWithTheme().toJSON()
8 | expect(tree).toMatchSnapshot()
9 | })
10 | })
11 |
--------------------------------------------------------------------------------
/test/unit/components/UI/Button.spec.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { Button } from 'components/UI'
3 | import { renderWithTheme } from '@zap/test/unit/__helpers__/renderWithTheme'
4 |
5 | describe('component.UI.Button', () => {
6 | it('should render correctly', () => {
7 | const tree = renderWithTheme().toJSON()
8 | expect(tree).toMatchSnapshot()
9 | })
10 | })
11 |
--------------------------------------------------------------------------------
/test/unit/components/UI/Card.spec.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { renderWithTheme } from '@zap/test/unit/__helpers__/renderWithTheme'
3 | import { Card } from 'components/UI'
4 |
5 | describe('component.UI.Card', () => {
6 | it('should render correctly', () => {
7 | const tree = renderWithTheme(content).toJSON()
8 | expect(tree).toMatchSnapshot()
9 | })
10 | })
11 |
--------------------------------------------------------------------------------
/test/unit/components/UI/Link.spec.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { renderWithTheme } from '@zap/test/unit/__helpers__/renderWithTheme'
3 | import { Link } from 'components/UI'
4 |
5 | describe('component.UI.Link', () => {
6 | it('should render correctly', () => {
7 | const tree = renderWithTheme(Link text).toJSON()
8 | expect(tree).toMatchSnapshot()
9 | })
10 | })
11 |
--------------------------------------------------------------------------------
/test/unit/components/UI/MainContent.spec.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { renderWithTheme } from '@zap/test/unit/__helpers__/renderWithTheme'
3 | import { MainContent } from 'components/UI'
4 |
5 | describe('component.UI.MainContent', () => {
6 | it('should render correctly', () => {
7 | const tree = renderWithTheme().toJSON()
8 | expect(tree).toMatchSnapshot()
9 | })
10 | })
11 |
--------------------------------------------------------------------------------
/test/unit/components/UI/Message.spec.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { renderWithTheme } from '@zap/test/unit/__helpers__/renderWithTheme'
3 | import { Message } from 'components/UI'
4 |
5 | describe('component.UI.Message', () => {
6 | it('should render correctly with default props', () => {
7 | const wrapper = renderWithTheme(A message).toJSON()
8 | expect(wrapper).toMatchSnapshot()
9 | })
10 | })
11 |
--------------------------------------------------------------------------------
/test/unit/components/UI/Modal.spec.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { renderWithTheme } from '@zap/test/unit/__helpers__/renderWithTheme'
3 | import { Modal } from 'components/UI'
4 |
5 | describe('component.UI.Modal', () => {
6 | it('should render correctly', () => {
7 | const tree = renderWithTheme().toJSON()
8 | expect(tree).toMatchSnapshot()
9 | })
10 | })
11 |
--------------------------------------------------------------------------------
/test/unit/components/UI/Page.spec.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { renderWithTheme } from '@zap/test/unit/__helpers__/renderWithTheme'
3 | import { Page } from 'components/UI'
4 |
5 | describe('component.UI.Page', () => {
6 | it('should render correctly', () => {
7 | const tree = renderWithTheme().toJSON()
8 | expect(tree).toMatchSnapshot()
9 | })
10 | })
11 |
--------------------------------------------------------------------------------
/test/unit/components/UI/Panel.spec.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { renderWithTheme } from '@zap/test/unit/__helpers__/renderWithTheme'
3 | import { Panel } from 'components/UI'
4 |
5 | describe('component.UI.Panel', () => {
6 | it('should render correctly', () => {
7 | const tree = renderWithTheme(
8 |
9 | Header here
10 | Body here
11 | Footer here
12 |
13 | ).toJSON()
14 | expect(tree).toMatchSnapshot()
15 | })
16 | })
17 |
--------------------------------------------------------------------------------
/test/unit/components/UI/QRCode.spec.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { renderWithTheme } from '@zap/test/unit/__helpers__/renderWithTheme'
3 | import { QRCode } from 'components/UI'
4 |
5 | describe('component.UI.QRCode', () => {
6 | it('should render correctly', () => {
7 | const tree = renderWithTheme().toJSON()
8 | expect(tree).toMatchSnapshot()
9 | })
10 | })
11 |
--------------------------------------------------------------------------------
/test/unit/components/UI/Spinner.spec.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { renderWithTheme } from '@zap/test/unit/__helpers__/renderWithTheme'
3 | import { Spinner } from 'components/UI'
4 |
5 | describe('component.UI.Spinner', () => {
6 | it('should render correctly', () => {
7 | const tree = renderWithTheme().toJSON()
8 | expect(tree).toMatchSnapshot()
9 | })
10 | })
11 |
--------------------------------------------------------------------------------
/test/unit/components/UI/Text.spec.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { renderWithTheme } from '@zap/test/unit/__helpers__/renderWithTheme'
3 | import { Text } from 'components/UI'
4 |
5 | describe('component.UI.Text', () => {
6 | it('should render correctly', () => {
7 | const tree = renderWithTheme().toJSON()
8 | expect(tree).toMatchSnapshot()
9 | })
10 | })
11 |
--------------------------------------------------------------------------------
/test/unit/components/UI/__snapshots__/BackgroundDark.spec.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`component.UI.BackgroundPrimary should render correctly 1`] = `
4 | .c0 {
5 | box-sizing: border-box;
6 | margin: 0;
7 | min-width: 0;
8 | background-color: #242633;
9 | color: #ffffff;
10 | -webkit-flex-direction: column;
11 | -ms-flex-direction: column;
12 | flex-direction: column;
13 | display: -webkit-box;
14 | display: -webkit-flex;
15 | display: -ms-flexbox;
16 | display: flex;
17 | }
18 |
19 |
23 | `;
24 |
--------------------------------------------------------------------------------
/test/unit/components/UI/__snapshots__/BackgroundLight.spec.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`component.UI.BackgroundTertiary should render correctly 1`] = `
4 | .c0 {
5 | box-sizing: border-box;
6 | margin: 0;
7 | min-width: 0;
8 | background-color: #313340;
9 | color: #ffffff;
10 | }
11 |
12 |
16 | `;
17 |
--------------------------------------------------------------------------------
/test/unit/components/UI/__snapshots__/BackgroundLightest.spec.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`component.UI.BackgroundSecondary should render correctly 1`] = `
4 | .c0 {
5 | box-sizing: border-box;
6 | margin: 0;
7 | min-width: 0;
8 | background-color: #373947;
9 | color: #ffffff;
10 | }
11 |
12 |
16 | `;
17 |
--------------------------------------------------------------------------------
/test/unit/components/UI/__snapshots__/BackgroundPrimary.spec.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`component.UI.BackgroundPrimary should render correctly 1`] = `
4 | .c0 {
5 | box-sizing: border-box;
6 | margin: 0;
7 | min-width: 0;
8 | background-color: #242633;
9 | color: #ffffff;
10 | -webkit-flex-direction: column;
11 | -ms-flex-direction: column;
12 | flex-direction: column;
13 | display: -webkit-box;
14 | display: -webkit-flex;
15 | display: -ms-flexbox;
16 | display: flex;
17 | }
18 |
19 |
23 | `;
24 |
--------------------------------------------------------------------------------
/test/unit/components/UI/__snapshots__/Bar.spec.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`component.UI.Bar should render correctly 1`] = `
4 | .c0 {
5 | box-sizing: border-box;
6 | margin: 0;
7 | min-width: 0;
8 | opacity: 0.6;
9 | background-color: #ffffff;
10 | border: 0;
11 | height: 1px;
12 | }
13 |
14 |
17 | `;
18 |
--------------------------------------------------------------------------------
/test/unit/components/UI/__snapshots__/Card.spec.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`component.UI.Card should render correctly 1`] = `
4 | .c0 {
5 | box-sizing: border-box;
6 | margin: 0;
7 | min-width: 0;
8 | border-radius: 5px;
9 | box-shadow: 0 2px 24px 0 rgba(0,0,0,0.5);
10 | background-color: #242633;
11 | color: #ffffff;
12 | padding: 16px;
13 | }
14 |
15 |
21 | `;
22 |
--------------------------------------------------------------------------------
/test/unit/components/UI/__snapshots__/Heading.spec.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`component.UI.Heading should render correctly 1`] = `
4 | .c0 {
5 | box-sizing: border-box;
6 | margin: 0;
7 | min-width: 0;
8 | font-size: 4px;
9 | font-family: Roboto,system-ui,sans-serif;
10 | font-weight: 300;
11 | line-height: 1.4;
12 | color: #ffffff;
13 | font-size: 18px;
14 | font-weight: 300;
15 | line-height: 1.4;
16 | }
17 |
18 |
24 | Heading here
25 |
26 | `;
27 |
--------------------------------------------------------------------------------
/test/unit/components/UI/__snapshots__/Link.spec.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`component.UI.Link should render correctly 1`] = `
4 | .c0 {
5 | box-sizing: border-box;
6 | margin: 0;
7 | min-width: 0;
8 | cursor: pointer;
9 | -webkit-text-decoration: underline;
10 | text-decoration: underline;
11 | color: #ffffff;
12 | font-size: 13px;
13 | line-height: 1.4;
14 | }
15 |
16 |
21 | Link text
22 |
23 | `;
24 |
--------------------------------------------------------------------------------
/test/unit/components/UI/__snapshots__/MainContent.spec.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`component.UI.MainContent should render correctly 1`] = `
4 | .c0 {
5 | box-sizing: border-box;
6 | margin: 0;
7 | min-width: 0;
8 | -webkit-flex: 1;
9 | -ms-flex: 1;
10 | flex: 1;
11 | overflow-y: overlay;
12 | overflow-x: hidden;
13 | height: 100%;
14 | }
15 |
16 |
20 | `;
21 |
--------------------------------------------------------------------------------
/test/unit/components/UI/__snapshots__/Text.spec.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`component.UI.Text should render correctly 1`] = `
4 | .c0 {
5 | box-sizing: border-box;
6 | margin: 0;
7 | min-width: 0;
8 | color: #ffffff;
9 | font-size: 13px;
10 | line-height: 1.4;
11 | }
12 |
13 |
18 | `;
19 |
--------------------------------------------------------------------------------
/test/unit/components/UI/__snapshots__/Truncate.spec.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`component.UI.Truncate should truncate test to a specific length when the maxlen parm is provided 1`] = `"Lorem ipsum dol...adipiscing elit"`;
4 |
5 | exports[`component.UI.Truncate should truncate text to 12 chars by default 1`] = `"Lorem ...g elit"`;
6 |
--------------------------------------------------------------------------------
/test/unit/components/Util/__snapshots__/WalletName.spec.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`component.WalletName custom wallet, with name should render correctly 1`] = `"Wallet name"`;
4 |
5 | exports[`component.WalletName custom wallet, without name should render correctly 1`] = `"local.host"`;
6 |
7 | exports[`component.WalletName local wallet, with name should render correctly 1`] = `"Wallet name"`;
8 |
9 | exports[`component.WalletName local wallet, without name should render correctly 1`] = `"Wallet #1"`;
10 |
--------------------------------------------------------------------------------
/test/unit/reducers/__snapshots__/contactsform.spec.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`reducers contactsformReducer should handle UPDATE_CONTACT_FORM_SEARCH_QUERY 1`] = `
4 | Snapshot Diff:
5 | - First value
6 | + Second value
7 |
8 | Object {
9 | - "searchQuery": null,
10 | + "searchQuery": "some text",
11 | }
12 | `;
13 |
14 | exports[`reducers contactsformReducer should handle initial state 1`] = `
15 | Object {
16 | "searchQuery": null,
17 | }
18 | `;
19 |
--------------------------------------------------------------------------------
/test/unit/reducers/__snapshots__/settingsmenu.spec.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`reducers settingsmenuReducer should handle CLOSE_SETTINGS 1`] = `
4 | Snapshot Diff:
5 | Compared values have no visual difference.
6 | `;
7 |
8 | exports[`reducers settingsmenuReducer should handle OPEN_SETTINGS 1`] = `
9 | Snapshot Diff:
10 | - First value
11 | + Second value
12 |
13 | Object {
14 | - "isSettingsMenuOpen": false,
15 | + "isSettingsMenuOpen": true,
16 | }
17 | `;
18 |
19 | exports[`reducers settingsmenuReducer should handle initial state 1`] = `
20 | Object {
21 | "isSettingsMenuOpen": false,
22 | }
23 | `;
24 |
--------------------------------------------------------------------------------
/utils/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | parser: 'babel-eslint',
3 | extends: ['plugin:jsdoc/recommended'],
4 | }
5 |
--------------------------------------------------------------------------------
/utils/chainify.js:
--------------------------------------------------------------------------------
1 | /**
2 | * chainifies promise-returning function that enqueues function
3 | * calls preventing concurrent calls
4 | *
5 | * @param {Function} fn function that returns a Promise
6 | * @returns {Function} function that returns a promise that resolves when original function
7 | * is called
8 | */
9 | const chainify = fn => {
10 | let currentTask = Promise.resolve()
11 | return (...args) => {
12 | const cb = () => fn(...args)
13 | // eslint-disable-next-line promise/no-callback-in-promise
14 | currentTask = currentTask.then(cb, cb)
15 | return currentTask
16 | }
17 | }
18 |
19 | export default chainify
20 |
--------------------------------------------------------------------------------
/utils/createReducer.js:
--------------------------------------------------------------------------------
1 | import produce, { enableMapSet } from 'immer'
2 |
3 | enableMapSet()
4 |
5 | /**
6 | * createReducer - Creates immer compatible reducer.
7 | *
8 | * @param {object} initialState initial redux state
9 | * @param {object} actionHandlers map
10 | * @returns {Function} immer compatible reducer function
11 | */
12 | const createReducer = (initialState, actionHandlers = {}) => (state = initialState, action) => {
13 | return produce(state, draft => {
14 | const handler = actionHandlers[action.type]
15 | return handler && handler(draft, action)
16 | })
17 | }
18 |
19 | export default createReducer
20 |
--------------------------------------------------------------------------------
/utils/db.js:
--------------------------------------------------------------------------------
1 | /**
2 | * getDbName - Derive database name from global config.
3 | *
4 | * @param {*} options Options
5 | * @returns {string} Database name
6 | */
7 | const getDbName = options => {
8 | const { namespace, domain, environment = 'development' } = options
9 | return [namespace, domain, environment].filter(item => Boolean(item)).join('.')
10 | }
11 |
12 | export default getDbName
13 |
--------------------------------------------------------------------------------
/utils/delay.js:
--------------------------------------------------------------------------------
1 | /**
2 | * delay - Promisified setTimeout.
3 | *
4 | * @param {number} time Time (ms)
5 | * @returns {Promise} Promise that resolves after time ms
6 | */
7 | const delay = time => new Promise(resolve => setTimeout(() => resolve(), time))
8 |
9 | export default delay
10 |
--------------------------------------------------------------------------------
/utils/dirExists.js:
--------------------------------------------------------------------------------
1 | import { existsSync } from 'fs'
2 | import untildify from 'untildify'
3 |
4 | /**
5 | * dirExists - Check a directory exists.
6 | *
7 | * @param {string} path Path of directory to check for existence
8 | * @returns {Promise} Boolean indicating whether directory exists
9 | */
10 | const dirExists = path => existsSync(untildify(path))
11 |
12 | export default dirExists
13 |
--------------------------------------------------------------------------------
/utils/error.js:
--------------------------------------------------------------------------------
1 | export const createError = (msg, code) => {
2 | const error = new Error(msg)
3 | if (code) {
4 | error.code = code
5 | }
6 | return error
7 | }
8 |
9 | export const UNSUPPORTED = 'UNSUPPORTED'
10 |
--------------------------------------------------------------------------------
/utils/events/index.js:
--------------------------------------------------------------------------------
1 | export { forwardEvent } from './events'
2 | export { forwardAll } from './events'
3 | export { unforwardAll } from './events'
4 | export defineEvents from './eventDefinition'
5 |
--------------------------------------------------------------------------------
/utils/fileExists.js:
--------------------------------------------------------------------------------
1 | import fs from 'fs'
2 | import { promisify } from 'util'
3 | import untildify from 'untildify'
4 |
5 | const fsReadFile = promisify(fs.readFile)
6 |
7 | /**
8 | * fileExists - Check a file exists.
9 | *
10 | * @param {string} path Path of file to check for existence
11 | * @returns {Promise} Boolean indicating whether file exists
12 | */
13 | const fileExists = async path => fsReadFile(untildify(path))
14 |
15 | export default fileExists
16 |
--------------------------------------------------------------------------------
/utils/genId.js:
--------------------------------------------------------------------------------
1 | /**
2 | * genId - Generates a unique id.
3 | *
4 | * @returns {string} Unique id
5 | */
6 | const genId = () =>
7 | Math.random()
8 | .toString(36)
9 | .substring(7)
10 |
11 | export default genId
12 |
--------------------------------------------------------------------------------
/utils/getDisplayName.js:
--------------------------------------------------------------------------------
1 | /**
2 | * getDisplayName - Derive an appropriate component name from a wraped component.
3 | *
4 | * @param {*} WrappedComponent Component to get display name for
5 | * @returns {string} Display name
6 | */
7 | const getDisplayName = WrappedComponent => {
8 | return WrappedComponent.displayName || WrappedComponent.name || 'Component'
9 | }
10 |
11 | export default getDisplayName
12 |
--------------------------------------------------------------------------------
/utils/getLndListen.js:
--------------------------------------------------------------------------------
1 | import getPort from 'get-port'
2 | import config from 'config'
3 |
4 | /**
5 | * getLndListen - Find a port for lnd to listen on.
6 | *
7 | * @param {string} type Interface type (p2p|grpc|rest)
8 | * @returns {string} host:port
9 | */
10 | const getLndListen = async type => {
11 | if (config.lnd[type].host) {
12 | const port = await getPort({
13 | host: config.lnd[type].host,
14 | port: config.lnd[type].port,
15 | })
16 | return `${config.lnd[type].host}:${port}`
17 | }
18 | return 0
19 | }
20 |
21 | export default getLndListen
22 |
--------------------------------------------------------------------------------
/utils/getPackageDetails.js:
--------------------------------------------------------------------------------
1 | import { productName, version } from '../package.json'
2 |
3 | /**
4 | * getPackageDetails - Get package details from package.json.
5 | *
6 | * @returns {{productName:string, version:string}} Package details
7 | */
8 | const getPackageDetails = () => {
9 | return { productName, version }
10 | }
11 |
12 | export default getPackageDetails
13 |
--------------------------------------------------------------------------------
/utils/isBase64url.js:
--------------------------------------------------------------------------------
1 | /**
2 | * isBase64url - Checks whether specified string is base64 url encoded.
3 | *
4 | * @param {string} str Parent directory
5 | * @returns {boolean} Boolean indicating whether str is a base64url encoded
6 | */
7 | const isBase64url = str => {
8 | try {
9 | // convert from base64url to base64
10 | window.atob(str.replace(/-/g, '+').replace(/_/g, '/'))
11 | return true
12 | } catch (e) {
13 | return false
14 | }
15 | }
16 |
17 | export default isBase64url
18 |
--------------------------------------------------------------------------------
/utils/isObject.js:
--------------------------------------------------------------------------------
1 | const isObject = x => x != null && typeof x === 'object'
2 |
3 | export default isObject
4 |
--------------------------------------------------------------------------------
/utils/isSubDir.js:
--------------------------------------------------------------------------------
1 | const { relative, isAbsolute } = require('path')
2 |
3 | /**
4 | * isSubDir - Check if a directory has a given subdirectory.
5 | *
6 | * @param {string} parent Parent directory
7 | * @param {string} dir Subdirectory to check for
8 | * @returns {boolean} Boolean indicating whether dir is a subdirectory of parent
9 | */
10 | const isSubDir = (parent, dir) => {
11 | const isRelative = relative(parent, dir)
12 | return Boolean(isRelative) && !isRelative.startsWith('..') && !isAbsolute(isRelative)
13 | }
14 |
15 | export default isSubDir
16 |
--------------------------------------------------------------------------------
/utils/lndBinaryName.js:
--------------------------------------------------------------------------------
1 | import { platform } from 'os'
2 |
3 | /**
4 | * lndBinaryName - Get the OS specific lnd binary name.
5 | *
6 | * @returns {string} 'lnd' on mac or linux, 'lnd.exe' on windows.
7 | */
8 | const lndBinaryName = () => (platform() === 'win32' ? 'lnd.exe' : 'lnd')
9 |
10 | export default lndBinaryName
11 |
--------------------------------------------------------------------------------
/utils/lndBinaryPath.js:
--------------------------------------------------------------------------------
1 | import { dirname, join } from 'path'
2 | import isDev from 'electron-is-dev'
3 | import appRootPath from '@zap/utils/appRootPath'
4 | import lndBinaryName from '@zap/utils/lndBinaryName'
5 |
6 | /**
7 | * lndBinaryPath - Get the OS specific path to the lnd binary.
8 | *
9 | * @returns {string} Path to the lnd binary
10 | */
11 | const lndBinaryPath = () => {
12 | return isDev
13 | ? join(dirname(require.resolve('lnd-binary/package.json')), 'vendor', lndBinaryName())
14 | : join(appRootPath(), 'resources', 'bin', lndBinaryName())
15 | }
16 |
17 | export default lndBinaryPath
18 |
--------------------------------------------------------------------------------
/utils/lndGrpcProtoDir.js:
--------------------------------------------------------------------------------
1 | import { dirname, join } from 'path'
2 | import isDev from 'electron-is-dev'
3 | import appRootPath from '@zap/utils/appRootPath'
4 |
5 | /**
6 | * lndGrpcProtoDir - Get the OS specific path to the rpc.proto files that are provided by lnd-grpc.
7 | *
8 | * @returns {string} Path to the rpc.proto files
9 | */
10 | const lndGrpcProtoDir = () => {
11 | return isDev
12 | ? join(dirname(require.resolve('lnd-grpc/package.json')), 'proto')
13 | : join(appRootPath(), 'resources', 'proto')
14 | }
15 |
16 | export default lndGrpcProtoDir
17 |
--------------------------------------------------------------------------------
/utils/notifications.js:
--------------------------------------------------------------------------------
1 | /**
2 | * showSystemNotification - Show a system notification.
3 | *
4 | * @param {string} title Notification title
5 | * @param {object} options Notification options
6 | * @returns {Notification} HTML5 Notification
7 | */
8 | export const showSystemNotification = (title, options) => {
9 | return new Notification(title, options)
10 | }
11 |
12 | export default { showSystemNotification }
13 |
--------------------------------------------------------------------------------
/utils/parseUrlFragments.js:
--------------------------------------------------------------------------------
1 | /**
2 | * parseUrlFragments - Parses url fragments string as returned by url.parse format
3 | * e.g #param1=value¶m2=value.
4 | *
5 | * @param {string} hash Url fragments to parse
6 | * @returns {object} param map
7 | */
8 | export default function parseUrlFragments(hash) {
9 | return hash
10 | ? hash
11 | .substring(1)
12 | .split('&')
13 | .map(p => p.split('='))
14 | .reduce((acc, [key, value]) => ({ ...acc, [key]: value }), {})
15 | : {}
16 | }
17 |
--------------------------------------------------------------------------------
/utils/promisifiedCall.js:
--------------------------------------------------------------------------------
1 | import { promisify } from 'util'
2 |
3 | /**
4 | * promisifiedCall - Promisifies specified method and calls it with @thisArg as this and passes @args as an object.
5 | *
6 | * @param {*} thisArg This arg
7 | * @param {*} method Method to promisy
8 | * @param {*} args Arguments to pass call method with
9 | * @returns {Function} Promisified method
10 | */
11 | export default function promisifiedCall(thisArg, method, ...args) {
12 | return promisify(method).call(thisArg, ...args)
13 | }
14 |
--------------------------------------------------------------------------------
/utils/rateProvider/index.js:
--------------------------------------------------------------------------------
1 | export { createConfig, getSupportedProviders } from './providers'
2 | export requestTicker from './requestTicker'
3 | export requestTickerWithFallback from './requestTickerWithFallback'
4 |
--------------------------------------------------------------------------------
/utils/sha256.js:
--------------------------------------------------------------------------------
1 | import { createHash } from 'crypto'
2 |
3 | /**
4 | * sha256digest - Generates a digest of the `message`(hex)
5 | *
6 | * @param {string} message message to hash
7 | * @param {string} [encoding] Endoding to output
8 | * @returns {Buffer|string} sha256 hash of a message`. If encoding is provided a string will be returned;
9 | * otherwise a Buffer is returned.
10 | */
11 | export const sha256digest = (message, encoding) =>
12 | createHash('sha256')
13 | .update(message)
14 | .digest(encoding)
15 |
--------------------------------------------------------------------------------
/utils/splitHostname.js:
--------------------------------------------------------------------------------
1 | import { parse } from 'url'
2 |
3 | /**
4 | * splitHostname - Splits hostname into a host+port.
5 | *
6 | * @param {string} host Host
7 | * @returns {{host,port}} Object containing `host` and `port` keys
8 | */
9 | const splitHostname = host => {
10 | const { hostname = host, port } = parse(`http://${host}`)
11 | // if hostname is not set it means `parse` was unable to parse
12 | // in this case just return whatever came in as a host
13 | return { host: hostname, port }
14 | }
15 |
16 | export default splitHostname
17 |
--------------------------------------------------------------------------------
/utils/truncate.js:
--------------------------------------------------------------------------------
1 | /**
2 | * truncate - Truncate a string by replacing the middle characters with ...
3 | *
4 | * @param {string} text String to truncate
5 | * @param {number} maxlen Length to truncate to
6 | * @returns {string} Truncates string
7 | */
8 | const truncate = (text, maxlen = 100) => {
9 | if (typeof text === 'string') {
10 | const truncatedText =
11 | text.length < maxlen
12 | ? text
13 | : `${text.substr(0, maxlen / 2)}...${text.substr(text.length - maxlen / 2)}`
14 |
15 | return truncatedText
16 | }
17 | return text
18 | }
19 |
20 | export default truncate
21 |
--------------------------------------------------------------------------------
/utils/truncateNodePubkey.js:
--------------------------------------------------------------------------------
1 | const truncateNodePubkey = pubkey => (pubkey ? pubkey.substring(0, 10) : '')
2 |
3 | export default truncateNodePubkey
4 |
--------------------------------------------------------------------------------
/webpack/dev/common/plugins.js:
--------------------------------------------------------------------------------
1 | import webpack from 'webpack'
2 | import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer'
3 | import CircularDependencyPlugin from 'circular-dependency-plugin'
4 |
5 | const plugins = [
6 | new webpack.EnvironmentPlugin({
7 | NODE_ENV: 'development',
8 | }),
9 | new CircularDependencyPlugin({
10 | exclude: /node_modules/,
11 | }),
12 | new BundleAnalyzerPlugin({
13 | analyzerMode: process.env.OPEN_ANALYZER === 'true' ? 'server' : 'disabled',
14 | openAnalyzer: process.env.OPEN_ANALYZER === 'true',
15 | }),
16 | ]
17 |
18 | export default plugins
19 |
--------------------------------------------------------------------------------
/webpack/prod/common/plugins.js:
--------------------------------------------------------------------------------
1 | import webpack from 'webpack'
2 | import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer'
3 |
4 | const plugins = [
5 | new webpack.EnvironmentPlugin({
6 | NODE_ENV: 'production',
7 | }),
8 | new BundleAnalyzerPlugin({
9 | analyzerMode: process.env.OPEN_ANALYZER === 'true' ? 'server' : 'disabled',
10 | openAnalyzer: process.env.OPEN_ANALYZER === 'true',
11 | }),
12 | ]
13 |
14 | export default plugins
15 |
--------------------------------------------------------------------------------
/webpack/webpack.config.eslint.js:
--------------------------------------------------------------------------------
1 | require('@babel/register')
2 |
3 | module.exports = require('./webpack.config.renderer')
4 |
--------------------------------------------------------------------------------
/webpack/webpack.config.main.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Webpack config for development builds.
3 | */
4 |
5 | import { CleanWebpackPlugin } from 'clean-webpack-plugin'
6 | import preloadConfig from './dev/preload.config'
7 | import mainConfig from './dev/main.config'
8 | import workersConfig from './dev/workers.config'
9 |
10 | preloadConfig.plugins.unshift(
11 | new CleanWebpackPlugin({ cleanOnceBeforeBuildPatterns: ['**/*', '!config.json', '!preload.js'] })
12 | )
13 |
14 | export default [preloadConfig, workersConfig, mainConfig]
15 |
--------------------------------------------------------------------------------
/webpack/webpack.config.prod.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Webpack config for production builds
3 | */
4 |
5 | import { CleanWebpackPlugin } from 'clean-webpack-plugin'
6 | import mainConfig from './prod/main.config'
7 | import workersConfig from './prod/workers.config'
8 | import preloadConfig from './prod/preload.config'
9 | import rendererConfig from './prod/renderer.config'
10 |
11 | preloadConfig.plugins.unshift(
12 | new CleanWebpackPlugin({ cleanOnceBeforeBuildPatterns: ['**/*', '!config.json'] })
13 | )
14 |
15 | export default [preloadConfig, workersConfig, mainConfig, rendererConfig]
16 |
--------------------------------------------------------------------------------
/webpack/webpack.config.renderer.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Webpack config for development builds.
3 | */
4 |
5 | import rendererConfig from './dev/renderer.config'
6 |
7 | export default rendererConfig
8 |
--------------------------------------------------------------------------------