├── .babelrc ├── .eslintrc ├── .gitignore ├── .nvmrc ├── .travis.yml ├── LICENSE ├── README.md ├── package-lock.json ├── package.json ├── spectrum.config.js ├── spectrum.dapplet.js ├── src ├── actions │ ├── address.js │ ├── keystore.js │ ├── keystoreType.js │ ├── network.js │ ├── session.js │ └── token.js ├── assets │ ├── digix_logo_minimal_blue_mini.png │ ├── icon.png │ └── qr-overlay.png ├── components │ ├── __tests__ │ │ ├── __snapshots__ │ │ │ └── app.test.jsx.snap │ │ └── app.test.jsx │ ├── app.jsx │ ├── common │ │ ├── __tests__ │ │ │ ├── __snapshots__ │ │ │ │ ├── active_link.test.jsx.snap │ │ │ │ ├── address.test.jsx.snap │ │ │ │ ├── address_dropdown.test.jsx.snap │ │ │ │ ├── address_input.test.jsx.snap │ │ │ │ ├── address_selector.test.jsx.snap │ │ │ │ ├── advanced.test.jsx.snap │ │ │ │ ├── balance_label.test.jsx.snap │ │ │ │ ├── button_selector.test.jsx.snap │ │ │ │ ├── color_picker.test.jsx.snap │ │ │ │ ├── connection_status.test.jsx.snap │ │ │ │ ├── crypto_price.test.jsx.snap │ │ │ │ ├── default_address_selector.test.jsx.snap │ │ │ │ ├── download_json_button.test.jsx.snap │ │ │ │ ├── dropdown_selector.test.jsx.snap │ │ │ │ ├── entropy_field.test.jsx.snap │ │ │ │ ├── entropy_generator.test.jsx.snap │ │ │ │ ├── error_message.test.jsx.snap │ │ │ │ ├── footer.test.jsx.snap │ │ │ │ ├── form_field.test.jsx.snap │ │ │ │ ├── ipfs_image.test.jsx.snap │ │ │ │ ├── ipfs_uploader.test.jsx.snap │ │ │ │ ├── menu_system.test.jsx.snap │ │ │ │ ├── network_selector.test.jsx.snap │ │ │ │ ├── network_status.test.jsx.snap │ │ │ │ ├── network_tokens_selector.test.jsx.snap │ │ │ │ ├── pagination_menu.test.jsx.snap │ │ │ │ ├── qr_button.test.jsx.snap │ │ │ │ ├── qr_code.test.jsx.snap │ │ │ │ ├── qr_multi_button.test.jsx.snap │ │ │ │ ├── qr_reader.test.jsx.snap │ │ │ │ ├── series_paginator.test.jsx.snap │ │ │ │ ├── startup_overlay.test.jsx.snap │ │ │ │ ├── tx_visualisation.test.jsx.snap │ │ │ │ └── value_input.test.jsx.snap │ │ │ ├── active_link.test.jsx │ │ │ ├── address.test.jsx │ │ │ ├── address_dropdown.test.jsx │ │ │ ├── address_input.test.jsx │ │ │ ├── address_selector.test.jsx │ │ │ ├── advanced.test.jsx │ │ │ ├── balance_label.test.jsx │ │ │ ├── button_selector.test.jsx │ │ │ ├── color_picker.test.jsx │ │ │ ├── connection_status.test.jsx │ │ │ ├── crypto_price.test.jsx │ │ │ ├── default_address_selector.test.jsx │ │ │ ├── download_json_button.test.jsx │ │ │ ├── dropdown_selector.test.jsx │ │ │ ├── entropy_field.test.jsx │ │ │ ├── entropy_generator.test.jsx │ │ │ ├── error_message.test.jsx │ │ │ ├── footer.test.jsx │ │ │ ├── form_field.test.jsx │ │ │ ├── ipfs_image.test.jsx │ │ │ ├── ipfs_uploader.test.jsx │ │ │ ├── menu_system.test.jsx │ │ │ ├── network_selector.test.jsx │ │ │ ├── network_status.test.jsx │ │ │ ├── network_tokens_selector.test.jsx │ │ │ ├── pagination_menu.test.jsx │ │ │ ├── qr_button.test.jsx │ │ │ ├── qr_code.test.jsx │ │ │ ├── qr_multi_button.test.jsx │ │ │ ├── qr_reader.test.jsx │ │ │ ├── series_paginator.test.jsx │ │ │ ├── startup_overlay.test.jsx │ │ │ ├── tx_visualisation.test.jsx │ │ │ └── value_input.test.jsx │ │ ├── active_link.jsx │ │ ├── address.jsx │ │ ├── address_dropdown.jsx │ │ ├── address_input.jsx │ │ ├── address_selector.jsx │ │ ├── advanced.jsx │ │ ├── balance_label.jsx │ │ ├── button_selector.jsx │ │ ├── color_picker.jsx │ │ ├── connection_status.jsx │ │ ├── crypto_price.jsx │ │ ├── default_address_selector.jsx │ │ ├── dll_paginator.jsx │ │ ├── download_json_button.jsx │ │ ├── dropdown_selector.jsx │ │ ├── entropy_field.jsx │ │ ├── entropy_generator.jsx │ │ ├── error_message.jsx │ │ ├── footer.jsx │ │ ├── form_field.jsx │ │ ├── form_image_field.jsx │ │ ├── form_image_preview.jsx │ │ ├── ipfs_image.jsx │ │ ├── ipfs_uploader.jsx │ │ ├── lazyload.jsx │ │ ├── menu_system.jsx │ │ ├── menu_system_dropdown.jsx │ │ ├── network_selector.jsx │ │ ├── network_status.jsx │ │ ├── network_tokens_selector.jsx │ │ ├── pagination_menu.jsx │ │ ├── qr_button.jsx │ │ ├── qr_code.jsx │ │ ├── qr_multi_button.jsx │ │ ├── qr_reader.jsx │ │ ├── redux_paginator.jsx │ │ ├── series_paginator.jsx │ │ ├── spectrum_watermark.jsx │ │ ├── startup_overlay.jsx │ │ ├── success_header.jsx │ │ ├── tx_visualisation.jsx │ │ └── value_input.jsx │ ├── config │ │ ├── index.jsx │ │ ├── networks │ │ │ ├── __tests__ │ │ │ │ ├── __snapshots__ │ │ │ │ │ ├── index.test.jsx.snap │ │ │ │ │ ├── network.test.jsx.snap │ │ │ │ │ └── network_form.test.jsx.snap │ │ │ │ ├── index.test.jsx │ │ │ │ ├── network.test.jsx │ │ │ │ └── network_form.test.jsx │ │ │ ├── index.jsx │ │ │ ├── network.jsx │ │ │ └── network_form.jsx │ │ └── tokens │ │ │ ├── __tests__ │ │ │ ├── __snapshots__ │ │ │ │ ├── index.test.jsx.snap │ │ │ │ ├── token.test.jsx.snap │ │ │ │ └── token_form.test.jsx.snap │ │ │ ├── index.test.jsx │ │ │ ├── token.test.jsx │ │ │ └── token_form.test.jsx │ │ │ ├── index.jsx │ │ │ ├── token.jsx │ │ │ └── token_form.jsx │ ├── dapplets │ │ ├── index.jsx │ │ └── placeholder.jsx │ ├── keystores │ │ ├── __tests__ │ │ │ ├── __snapshots__ │ │ │ │ ├── address.test.jsx.snap │ │ │ │ ├── address_balances.test.jsx.snap │ │ │ │ ├── import_keystore_form.test.jsx.snap │ │ │ │ ├── import_keystore_modal.test.jsx.snap │ │ │ │ ├── index.test.jsx.snap │ │ │ │ ├── keystore_buttons.test.jsx.snap │ │ │ │ ├── keystore_creation_form.test.jsx.snap │ │ │ │ ├── keystore_edit_form.test.jsx.snap │ │ │ │ ├── keystore_menu.test.jsx.snap │ │ │ │ ├── keystore_modal.test.jsx.snap │ │ │ │ ├── keystore_selector.test.jsx.snap │ │ │ │ └── keystore_type_message.test.jsx.snap │ │ │ ├── address.test.jsx │ │ │ ├── address_balances.test.jsx │ │ │ ├── import_keystore_form.test.jsx │ │ │ ├── import_keystore_modal.test.jsx │ │ │ ├── index.test.jsx │ │ │ ├── keystore_buttons.test.jsx │ │ │ ├── keystore_creation_form.test.jsx │ │ │ ├── keystore_edit_form.test.jsx │ │ │ ├── keystore_menu.test.jsx │ │ │ ├── keystore_modal.test.jsx │ │ │ ├── keystore_selector.test.jsx │ │ │ └── keystore_type_message.test.jsx │ │ ├── address.jsx │ │ ├── address_balances.jsx │ │ ├── base_token │ │ │ ├── __tests__ │ │ │ │ ├── __snapshots__ │ │ │ │ │ ├── base_token_balance.test.jsx.snap │ │ │ │ │ ├── base_token_transfer.test.jsx.snap │ │ │ │ │ ├── base_token_transfer_form.test.jsx.snap │ │ │ │ │ ├── base_token_tx_ui.test.jsx.snap │ │ │ │ │ └── index.test.jsx.snap │ │ │ │ ├── base_token_balance.test.jsx │ │ │ │ ├── base_token_transfer.test.jsx │ │ │ │ ├── base_token_transfer_form.test.jsx │ │ │ │ ├── base_token_tx_ui.test.jsx │ │ │ │ └── index.test.jsx │ │ │ ├── base_token_balance.jsx │ │ │ ├── base_token_transfer.jsx │ │ │ ├── base_token_transfer_form.jsx │ │ │ ├── base_token_tx_ui.jsx │ │ │ └── index.jsx │ │ ├── generic_transaction │ │ │ ├── __tests__ │ │ │ │ ├── __snapshots__ │ │ │ │ │ ├── generic_transaction_form.test.jsx.snap │ │ │ │ │ └── index.test.jsx.snap │ │ │ │ ├── generic_transaction_form.test.jsx │ │ │ │ └── index.test.jsx │ │ │ ├── generic_transaction_form.jsx │ │ │ └── index.jsx │ │ ├── import_keystore_form.jsx │ │ ├── import_keystore_modal.jsx │ │ ├── index.jsx │ │ ├── keystore_buttons.jsx │ │ ├── keystore_creation_form.jsx │ │ ├── keystore_edit_form.jsx │ │ ├── keystore_menu.jsx │ │ ├── keystore_modal.jsx │ │ ├── keystore_selector.jsx │ │ ├── keystore_type_message.jsx │ │ └── token │ │ │ ├── __tests__ │ │ │ ├── __snapshots__ │ │ │ │ ├── index.test.jsx.snap │ │ │ │ ├── token_balance.test.jsx.snap │ │ │ │ ├── token_transfer.test.jsx.snap │ │ │ │ ├── token_transfer_form.test.jsx.snap │ │ │ │ └── token_tx_ui.test.jsx.snap │ │ │ ├── index.test.jsx │ │ │ ├── token_balance.test.jsx │ │ │ ├── token_transfer.test.jsx │ │ │ ├── token_transfer_form.test.jsx │ │ │ └── token_tx_ui.test.jsx │ │ │ ├── index.jsx │ │ │ ├── token_balance.jsx │ │ │ ├── token_transfer.jsx │ │ │ ├── token_transfer_form.jsx │ │ │ └── token_tx_ui.jsx │ └── transactions │ │ ├── __tests__ │ │ ├── __snapshots__ │ │ │ ├── transaction_info.test.jsx.snap │ │ │ ├── transaction_info_table.test.jsx.snap │ │ │ ├── transaction_modal.test.jsx.snap │ │ │ ├── transaction_modal_container.test.jsx.snap │ │ │ ├── transaction_modal_form.test.jsx.snap │ │ │ ├── transaction_signing_overlay.test.jsx.snap │ │ │ └── transaction_tracker.test.jsx.snap │ │ ├── transaction_info.test.jsx │ │ ├── transaction_info_table.test.jsx │ │ ├── transaction_modal.test.jsx │ │ ├── transaction_modal_container.test.jsx │ │ ├── transaction_modal_form.test.jsx │ │ ├── transaction_signing_overlay.test.jsx │ │ └── transaction_tracker.test.jsx │ │ ├── transaction_info.jsx │ │ ├── transaction_info_table.jsx │ │ ├── transaction_modal.jsx │ │ ├── transaction_modal_container.jsx │ │ ├── transaction_modal_form.jsx │ │ ├── transaction_signing_overlay.jsx │ │ └── transaction_tracker.jsx ├── helpers │ ├── blockie.js │ ├── constants.js │ ├── fileUtils.js │ ├── offlinePlugin.js │ ├── registerReducers.js │ ├── seedStore.js │ ├── stringUtils.js │ ├── uiRegistry.js │ ├── validation.js │ └── web3 │ │ ├── connect.js │ │ ├── index.js │ │ ├── redux_subprovider.js │ │ └── rpc_subprovider.js ├── index.html ├── index.jsx ├── keystoreTypes │ ├── cold │ │ ├── __tests__ │ │ │ ├── __snapshots__ │ │ │ │ ├── cold_keystore_address.test.jsx.snap │ │ │ │ ├── cold_keystore_creation_form.test.jsx.snap │ │ │ │ ├── cold_keystore_edit_form.test.jsx.snap │ │ │ │ └── cold_keystore_transaction_signer.test.jsx.snap │ │ │ ├── cold_keystore_address.test.jsx │ │ │ ├── cold_keystore_creation_form.test.jsx │ │ │ ├── cold_keystore_edit_form.test.jsx │ │ │ └── cold_keystore_transaction_signer.test.jsx │ │ ├── cold_keystore_actions.js │ │ ├── cold_keystore_address.jsx │ │ ├── cold_keystore_creation_form.jsx │ │ ├── cold_keystore_edit_form.jsx │ │ ├── cold_keystore_transaction_signer.jsx │ │ └── index.js │ ├── index.js │ ├── ledger │ │ ├── __tests__ │ │ │ ├── __snapshots__ │ │ │ │ ├── ledger_keystore_address_item.test.jsx.snap │ │ │ │ ├── ledger_keystore_address_list.test.jsx.snap │ │ │ │ ├── ledger_keystore_creation_form.test.jsx.snap │ │ │ │ ├── ledger_keystore_edit_form.test.jsx.snap │ │ │ │ └── ledger_keystore_transaction_signer.test.jsx.snap │ │ │ ├── ledger_keystore_address_item.test.jsx │ │ │ ├── ledger_keystore_address_list.test.jsx │ │ │ ├── ledger_keystore_creation_form.test.jsx │ │ │ ├── ledger_keystore_edit_form.test.jsx │ │ │ └── ledger_keystore_transaction_signer.test.jsx │ │ ├── index.js │ │ ├── ledger_keystore_actions.js │ │ ├── ledger_keystore_address_item.jsx │ │ ├── ledger_keystore_address_list.jsx │ │ ├── ledger_keystore_creation_form.jsx │ │ ├── ledger_keystore_edit_form.jsx │ │ └── ledger_keystore_transaction_signer.jsx │ ├── multisig │ │ ├── __tests__ │ │ │ ├── __snapshots__ │ │ │ │ ├── multisig_keystore_creation_form.test.jsx.snap │ │ │ │ ├── multisig_keystore_deploy_form.test.jsx.snap │ │ │ │ ├── multisig_keystore_deploy_tx_ui.test.jsx.snap │ │ │ │ ├── multisig_keystore_edit_form.test.jsx.snap │ │ │ │ ├── multisig_keystore_info.test.jsx.snap │ │ │ │ ├── multisig_keystore_transaction_proxy.test.jsx.snap │ │ │ │ └── multisig_keystore_transaction_signer.test.jsx.snap │ │ │ ├── multisig_keystore_creation_form.test.jsx │ │ │ ├── multisig_keystore_deploy_form.test.jsx │ │ │ ├── multisig_keystore_deploy_tx_ui.test.jsx │ │ │ ├── multisig_keystore_edit_form.test.jsx │ │ │ ├── multisig_keystore_info.test.jsx │ │ │ ├── multisig_keystore_transaction_proxy.test.jsx │ │ │ └── multisig_keystore_transaction_signer.test.jsx │ │ ├── index.js │ │ ├── multisig_keystore_actions.js │ │ ├── multisig_keystore_creation_form.jsx │ │ ├── multisig_keystore_deploy_form.jsx │ │ ├── multisig_keystore_deploy_tx_ui.jsx │ │ ├── multisig_keystore_edit_form.jsx │ │ ├── multisig_keystore_info.jsx │ │ ├── multisig_keystore_transaction_proxy.jsx │ │ └── multisig_keystore_transaction_signer.jsx │ └── v3 │ │ ├── __tests__ │ │ ├── __snapshots__ │ │ │ ├── v3_keystore_creation_form.test.jsx.snap │ │ │ ├── v3_keystore_download_button.test.jsx.snap │ │ │ ├── v3_keystore_edit_form.test.jsx.snap │ │ │ └── v3_keystore_transaction_signer.test.jsx.snap │ │ ├── v3_keystore_creation_form.test.jsx │ │ ├── v3_keystore_download_button.test.jsx │ │ ├── v3_keystore_edit_form.test.jsx │ │ └── v3_keystore_transaction_signer.test.jsx │ │ ├── index.js │ │ ├── v3_keystore_actions.js │ │ ├── v3_keystore_creation_form.jsx │ │ ├── v3_keystore_download_button.jsx │ │ ├── v3_keystore_edit_form.jsx │ │ ├── v3_keystore_transaction_signer.jsx │ │ └── v3_sign_tx.js ├── models │ ├── address.js │ ├── index.js │ ├── keystore.js │ ├── keystoreType.js │ ├── network.js │ ├── session.js │ └── token.js ├── selectors.js ├── semantic-ui │ ├── spectrum.less │ └── theme.config └── store.js ├── test ├── __mocks__ │ ├── connectMock.js │ ├── fileMock.js │ └── styleMock.js └── cucumber │ ├── features │ ├── Example.feature │ └── V3Keystore.feature │ ├── steps │ ├── given.js │ ├── then.js │ └── when.js │ └── support │ ├── action │ ├── clearInputField.js │ ├── clickElement.js │ ├── closeAllButFirstTab.js │ ├── closeLastOpenedWindow.js │ ├── deleteCookie.js │ ├── dragElement.js │ ├── focusLastOpenedWindow.js │ ├── handleModal.js │ ├── moveToElement.js │ ├── openSpectrumAndAcceptTerms.js │ ├── openWebsite.js │ ├── pause.js │ ├── pressButton.js │ ├── resizeScreenSize.js │ ├── scroll.js │ ├── selectOption.js │ ├── selectOptionByIndex.js │ ├── setCookie.js │ ├── setInputField.js │ ├── setPromptText.js │ ├── submitForm.js │ ├── waitFor.js │ └── waitForVisible.js │ ├── check │ ├── checkClass.js │ ├── checkContainsAnyText.js │ ├── checkContainsText.js │ ├── checkCookieContent.js │ ├── checkCookieExists.js │ ├── checkDimension.js │ ├── checkElementExists.js │ ├── checkEqualsText.js │ ├── checkFocus.js │ ├── checkInURLPath.js │ ├── checkIsEmpty.js │ ├── checkIsOpenedInNewWindow.js │ ├── checkModal.js │ ├── checkModalText.js │ ├── checkNewWindow.js │ ├── checkOffset.js │ ├── checkProperty.js │ ├── checkSelected.js │ ├── checkTitle.js │ ├── checkURL.js │ ├── checkURLPath.js │ ├── checkWithinViewport.js │ ├── compareText.js │ ├── isEnabled.js │ ├── isExisting.js │ └── isVisible.js │ └── lib │ └── checkIfElementExists.js ├── wdio.ci.config.js ├── wdio.development.config.js ├── webpack.config.js ├── webpack.development.config.js └── webpack.production.config.js /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | "env", 4 | "react", 5 | "stage-2", 6 | "stage-0" 7 | ], 8 | "compact" : false, 9 | "plugins": [ 10 | "transform-class-properties", 11 | ["babel-root-import", { "rootPathSuffix": "src" }], 12 | "react-hot-loader/babel", 13 | "transform-object-rest-spread" 14 | ], 15 | "env": { 16 | "production": { 17 | "plugins": "transform-class-properties", 18 | "presets": [ 19 | "react-optimize", 20 | ["env", { 21 | "targets": { 22 | "uglify": false, 23 | "browsers": [ 24 | "last 2 versions", 25 | "safari >= 8", 26 | "ie >= 10", 27 | "ios >= 8" 28 | ] 29 | }, 30 | "loose": true, 31 | "useBuiltIns": true 32 | }] 33 | ] 34 | }, 35 | "test": { 36 | "presets": ["env"], 37 | "plugins": [ 38 | "transform-class-properties", 39 | ["babel-root-import", { "rootPathSuffix": "src" }], 40 | "transform-object-rest-spread" 41 | ] 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | --- 2 | extends: airbnb 3 | parser: babel-eslint 4 | plugins: 5 | - react 6 | - jest 7 | env: 8 | browser: true 9 | jest/globals: true 10 | rules: 11 | react/prefer-stateless-function: 12 | - 0 13 | react/forbid-prop-types: 14 | - 0 15 | import/no-unresolved: 16 | - 2 17 | - ignore: 18 | - "^[~]" 19 | max-len: 20 | - error 21 | - 128 22 | import/extensions: 23 | - off 24 | - never 25 | class-methods-use-this: 26 | - 0 27 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.diff 2 | *.done.txt 3 | *.err 4 | *.esproj 5 | *.komodoproject 6 | *.log 7 | *.orig 8 | *.pyc 9 | *.rej 10 | *.sass-cache 11 | *.sublime-project 12 | *.sublime-workspace 13 | *.swo 14 | *.swp 15 | *.todo 16 | *.todo.txt 17 | *.vi 18 | *.zip 19 | *~ 20 | .CVS 21 | .DS_Store 22 | ._* 23 | .cache 24 | .grunt 25 | .hg 26 | .idea 27 | .komodotools 28 | .npmrc 29 | .project 30 | .settings 31 | .static 32 | .svn 33 | .tern-port 34 | .tmp 35 | .tmproj 36 | Thumbs.db 37 | _SpecRunner.html 38 | _site 39 | _tmp 40 | bower_components 41 | coverage 42 | docs 43 | done.txt 44 | nbproject 45 | node_modules 46 | npm-debug.log 47 | reports 48 | selenium-debug.log 49 | todo.txt 50 | stats.json 51 | errorShots 52 | .cache-loader 53 | -------------------------------------------------------------------------------- /.nvmrc: -------------------------------------------------------------------------------- 1 | 8 2 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | 3 | node_js: 4 | - '8' 5 | 6 | addons: 7 | apt: 8 | sources: 9 | - ubuntu-toolchain-r-test 10 | packages: 11 | - g++-4.8 12 | - libusb-1.0-0-dev 13 | env: 14 | - CXX=g++-4.8 15 | cache: 16 | directories: 17 | - node_modules 18 | 19 | before_script: 20 | - npm run serve & 21 | 22 | script: 23 | - npm run build:ci 24 | - npm run test:ci 25 | -------------------------------------------------------------------------------- /spectrum.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { }; 2 | -------------------------------------------------------------------------------- /spectrum.dapplet.js: -------------------------------------------------------------------------------- 1 | // this file imports the dapplet and is seperate from config.js to enable HMR 2 | export default null; 3 | -------------------------------------------------------------------------------- /src/actions/address.js: -------------------------------------------------------------------------------- 1 | import { REDUX_PREFIX } from '~/helpers/constants'; 2 | 3 | export const actions = { 4 | CREATE_ADDRESS: `${REDUX_PREFIX} create address`, 5 | UPDATE_ADDRESS: `${REDUX_PREFIX} update address`, 6 | DELETE_ADDRESS: `${REDUX_PREFIX} delete address`, 7 | }; 8 | 9 | export const createAddress = props => ({ 10 | type: actions.CREATE_ADDRESS, 11 | payload: props, 12 | }); 13 | 14 | export const updateAddress = props => ({ 15 | type: actions.UPDATE_ADDRESS, 16 | payload: props, 17 | }); 18 | 19 | export const deleteAddress = id => ({ 20 | type: actions.DELETE_ADDRESS, 21 | payload: id, 22 | }); 23 | -------------------------------------------------------------------------------- /src/actions/keystore.js: -------------------------------------------------------------------------------- 1 | import { REDUX_PREFIX } from '~/helpers/constants'; 2 | import { getKeystoreAction } from '~/keystoreTypes'; 3 | 4 | export const actions = { 5 | CREATE_KEYSTORE: `${REDUX_PREFIX} create keystore`, 6 | UPDATE_KEYSTORE: `${REDUX_PREFIX} update keystore`, 7 | DELETE_KEYSTORE: `${REDUX_PREFIX} delete keystore`, 8 | ADD_ACCOUNT_TO_KEYSTORE: `${REDUX_PREFIX} add account to keystore`, 9 | REMOVE_ACCOUNT_FROM_KEYSTORE: `${REDUX_PREFIX} remove account from keystore`, 10 | }; 11 | 12 | export const createKeystore = props => 13 | getKeystoreAction({ id: props.type, type: 'create' })(props); 14 | 15 | export const updateKeystore = (props, data) => 16 | getKeystoreAction({ id: data.type.id, type: 'update' })(props, data); 17 | 18 | export const deleteKeystore = payload => ({ 19 | type: actions.DELETE_KEYSTORE, payload, 20 | }); 21 | -------------------------------------------------------------------------------- /src/actions/keystoreType.js: -------------------------------------------------------------------------------- 1 | import { REDUX_PREFIX } from '~/helpers/constants'; 2 | 3 | export const actions = { 4 | CREATE_KEYSTORE_TYPE: `${REDUX_PREFIX} create keystore type`, 5 | DELETE_KEYSTORE_TYPE: `${REDUX_PREFIX} delete keystore type`, 6 | }; 7 | 8 | export const createKeystoreType = props => ({ 9 | type: actions.CREATE_KEYSTORE_TYPE, 10 | payload: props, 11 | }); 12 | 13 | export const deleteKeystoreType = id => ({ 14 | type: actions.DELETE_KEYSTORE_TYPE, 15 | payload: id, 16 | }); 17 | -------------------------------------------------------------------------------- /src/actions/token.js: -------------------------------------------------------------------------------- 1 | import { REDUX_PREFIX } from '~/helpers/constants'; 2 | import { validateProps } from '~/helpers/validation'; 3 | 4 | export const actions = { 5 | CREATE_TOKEN: `${REDUX_PREFIX} create token`, 6 | UPDATE_TOKEN: `${REDUX_PREFIX} update token`, 7 | DELETE_TOKEN: `${REDUX_PREFIX} delete token`, 8 | }; 9 | 10 | const requiredProps = { 11 | address: 'address', 12 | color: true, 13 | decimals: 'number', 14 | name: true, 15 | network: true, 16 | symbol: true, 17 | }; 18 | 19 | export const createToken = (payload) => { 20 | validateProps(requiredProps, payload); 21 | return { 22 | type: actions.CREATE_TOKEN, 23 | payload, 24 | }; 25 | }; 26 | 27 | export const updateToken = (payload) => { 28 | validateProps(requiredProps, payload); 29 | return { 30 | type: actions.UPDATE_TOKEN, 31 | payload, 32 | }; 33 | }; 34 | 35 | export const deleteToken = payload => ({ 36 | type: actions.DELETE_TOKEN, 37 | payload, 38 | }); 39 | -------------------------------------------------------------------------------- /src/assets/digix_logo_minimal_blue_mini.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IstoraMandiri/spectrum/4329330a6df5991af3d67c3edde5b69ac01621d9/src/assets/digix_logo_minimal_blue_mini.png -------------------------------------------------------------------------------- /src/assets/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IstoraMandiri/spectrum/4329330a6df5991af3d67c3edde5b69ac01621d9/src/assets/icon.png -------------------------------------------------------------------------------- /src/assets/qr-overlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IstoraMandiri/spectrum/4329330a6df5991af3d67c3edde5b69ac01621d9/src/assets/qr-overlay.png -------------------------------------------------------------------------------- /src/components/__tests__/__snapshots__/app.test.jsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[` renders correctly 1`] = ` 4 |
7 | 8 | 9 | 41 |
42 |
43 | `; 44 | -------------------------------------------------------------------------------- /src/components/__tests__/app.test.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { shallow } from 'enzyme'; 3 | import toJson from 'enzyme-to-json'; 4 | 5 | import App from '../app'; 6 | 7 | jest.mock('react-redux', () => ({ 8 | connect: () => component => component, 9 | })); 10 | 11 | describe('', () => { 12 | test('renders correctly', () => { 13 | const component = shallow( 14 | , 15 | ); 16 | 17 | expect(toJson(component)).toMatchSnapshot(); 18 | }); 19 | }); 20 | -------------------------------------------------------------------------------- /src/components/common/__tests__/__snapshots__/active_link.test.jsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[` renders correctly 1`] = ` 4 | 10 | `; 11 | -------------------------------------------------------------------------------- /src/components/common/__tests__/__snapshots__/address.test.jsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`
renders correctly 1`] = ` 4 |
7 | 12 | 20 | test address 21 | 22 |
23 | `; 24 | 25 | exports[`
renders correctly with short width 1`] = ` 26 |
29 | 34 | 42 | test address 2 43 | 44 |
45 | `; 46 | -------------------------------------------------------------------------------- /src/components/common/__tests__/__snapshots__/address_input.test.jsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[` renders correctly 1`] = ` 4 | 5 | 15 | 16 | 20 | 21 | 22 | `; 23 | -------------------------------------------------------------------------------- /src/components/common/__tests__/__snapshots__/address_selector.test.jsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[` renders correctly 1`] = ` 4 | 46 | `; 47 | -------------------------------------------------------------------------------- /src/components/common/__tests__/__snapshots__/advanced.test.jsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[` renders correctly 1`] = ` 4 | 5 | 15 | Advanced 16 | 17 | 21 | 22 | 23 | `; 24 | -------------------------------------------------------------------------------- /src/components/common/__tests__/__snapshots__/balance_label.test.jsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[` renders correctly 1`] = ` 4 | 12 | `; 13 | -------------------------------------------------------------------------------- /src/components/common/__tests__/__snapshots__/button_selector.test.jsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[` renders correctly 1`] = ` 4 | 5 |