diff --git a/.babelrc b/.babelrc new file mode 100644 index 0000000..4a2b394 --- /dev/null +++ b/.babelrc @@ -0,0 +1,5 @@ +{ + "presets": [ + "flow", "react", "es2015" + ] +} \ No newline at end of file diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index 49468a7..0000000 --- a/.eslintignore +++ /dev/null @@ -1,3 +0,0 @@ -www -platforms -plugins diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index d420b68..0000000 --- a/.eslintrc.json +++ /dev/null @@ -1,150 +0,0 @@ -{ - "parserOptions": { - "ecmaVersion": 6, - "ecmaFeatures": { - "experimentalObjectRestSpread": true, - "jsx": true - }, - "sourceType": "module" - }, - - "env": { - "es6": true, - "node": true, - "browser": true - }, - - "plugins": [ - "standard", - "promise", - "react" - ], - - "globals": { - "document": false, - "navigator": false, - "window": false - }, - - "rules": { - "accessor-pairs": 2, - "arrow-spacing": [2, { "before": true, "after": true }], - "block-spacing": [2, "always"], - "brace-style": [2, "1tbs", { "allowSingleLine": true }], - "comma-dangle": [2, "never"], - "comma-spacing": [2, { "before": false, "after": true }], - "comma-style": [2, "last"], - "constructor-super": 2, - "curly": [2, "multi-line"], - "dot-location": [2, "property"], - "eol-last": 2, - "eqeqeq": [2, "allow-null"], - "generator-star-spacing": [2, { "before": true, "after": true }], - "handle-callback-err": [2, "^(err|error)$" ], - "indent": [2, 2, { "SwitchCase": 1 }], - "jsx-quotes": [2, "prefer-single"], - "react/jsx-uses-vars": 2, - "react/react-in-jsx-scope": 2, - "react/jsx-uses-react": 2, - "key-spacing": [2, { "beforeColon": false, "afterColon": true }], - "keyword-spacing": [2, { "before": true, "after": true }], - "new-cap": [2, { "newIsCap": true, "capIsNew": false }], - "new-parens": 2, - "no-array-constructor": 2, - "no-caller": 2, - "no-class-assign": 2, - "no-cond-assign": 2, - "no-const-assign": 2, - "no-control-regex": 2, - "no-debugger": 2, - "no-delete-var": 2, - "no-dupe-args": 2, - "no-dupe-class-members": 2, - "no-dupe-keys": 2, - "no-duplicate-case": 2, - "no-empty-character-class": 2, - "no-empty-pattern": 2, - "no-eval": 2, - "no-ex-assign": 2, - "no-extend-native": 2, - "no-extra-bind": 2, - "no-extra-boolean-cast": 2, - "no-extra-parens": [2, "functions"], - "no-fallthrough": 2, - "no-floating-decimal": 2, - "no-func-assign": 2, - "no-implied-eval": 2, - "no-inner-declarations": [2, "functions"], - "no-invalid-regexp": 2, - "no-irregular-whitespace": 2, - "no-iterator": 2, - "no-label-var": 2, - "no-labels": [2, { "allowLoop": false, "allowSwitch": false }], - "no-lone-blocks": 2, - "no-mixed-spaces-and-tabs": 2, - "no-multi-spaces": 2, - "no-multi-str": 2, - "no-multiple-empty-lines": [2, { "max": 1 }], - "no-native-reassign": 2, - "no-negated-in-lhs": 2, - "no-new": 2, - "no-new-func": 2, - "no-new-object": 2, - "no-new-require": 2, - "no-new-symbol": 2, - "no-new-wrappers": 2, - "no-obj-calls": 2, - "no-octal": 2, - "no-octal-escape": 2, - "no-path-concat": 2, - "no-proto": 2, - "no-redeclare": 2, - "no-regex-spaces": 2, - "no-return-assign": [2, "except-parens"], - "no-self-assign": 2, - "no-self-compare": 2, - "no-sequences": 2, - "no-shadow-restricted-names": 2, - "no-spaced-func": 2, - "no-sparse-arrays": 2, - "no-this-before-super": 2, - "no-throw-literal": 2, - "no-trailing-spaces": 2, - "no-undef": 2, - "no-undef-init": 2, - "no-unexpected-multiline": 2, - "no-unneeded-ternary": [2, { "defaultAssignment": false }], - "no-unreachable": 2, - "no-unused-vars": [2, { "vars": "all", "args": "none" }], - "no-useless-call": 2, - "no-useless-constructor": 2, - "no-with": 2, - "one-var": [2, { "initialized": "never" }], - "operator-linebreak": [2, "after", { "overrides": { "?": "before", ":": "before" } }], - "padded-blocks": [2, "never"], - "quotes": [2, "single", "avoid-escape"], - "semi": [2, "always"], - "semi-spacing": [2, { "before": false, "after": true }], - "space-before-blocks": [2, "always"], - "space-before-function-paren": [2, "never"], - "space-in-parens": [2, "never"], - "space-infix-ops": 2, - "space-unary-ops": [2, { "words": true, "nonwords": false }], - "spaced-comment": [2, "always", { "markers": ["global", "globals", "eslint", "eslint-disable", "*package", "!", ","] }], - "template-curly-spacing": [2, "never"], - "use-isnan": 2, - "valid-typeof": 2, - "wrap-iife": [2, "any"], - "yield-star-spacing": [2, "both"], - "yoda": [2, "never"], - - "standard/object-curly-even-spacing": [2, "either"], - "standard/array-bracket-even-spacing": [2, "either"], - "standard/computed-property-even-spacing": [2, "even"], - - "promise/param-names": 2 - }, - "globals": { - "CustomElements": false - } -} diff --git a/.flowconfig b/.flowconfig new file mode 100644 index 0000000..9c22657 --- /dev/null +++ b/.flowconfig @@ -0,0 +1,13 @@ +[ignore] +.*/plugins/.* +.*/platforms/.* +.*/node_modules/.* + +[include] +./src/.* + +[libs] + +[lints] + +[options] diff --git a/.gitignore b/.gitignore index 1116be8..b12b6c4 100644 --- a/.gitignore +++ b/.gitignore @@ -37,4 +37,5 @@ platforms plugins .vscode/ -dist/ \ No newline at end of file +dist/ +lib/ \ No newline at end of file diff --git a/README.md b/README.md index 0d520f1..bececf7 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ ZENCash mobile app built using Onsen UI, Redux, React and Webpack. ``` yarn install +yarn run flow-build cordova plugin add cordova-plugin-qrscanner cordova-plugin-file cordova-plugin-http cordova-clipboard cordova-plugin-inappbrowser cordova platform add [android | ios] cordova run [android | ios] diff --git a/src/assets/css/index.css b/assets/css/index.css similarity index 100% rename from src/assets/css/index.css rename to assets/css/index.css diff --git a/src/assets/img/zencash.png b/assets/img/zencash.png similarity index 100% rename from src/assets/img/zencash.png rename to assets/img/zencash.png diff --git a/config.xml b/config.xml index 8999517..09a564c 100644 --- a/config.xml +++ b/config.xml @@ -24,8 +24,8 @@ - - + + diff --git a/package.json b/package.json index 71a853d..c07d917 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "scripts": { "start": "webpack-dev-server --host 0.0.0.0 --progress --content-base www/", "build": "cross-env NODE_ENV=production webpack --config webpack.config.prod.js", - "lint": "eslint ." + "flow-build": "babel --watch src/ -d lib/" }, "repository": { "type": "git", @@ -21,10 +21,12 @@ "devDependencies": { "autoprefixer": "^7.1.3", "axios": "^0.16.2", + "babel-cli": "^6.26.0", "babel-core": "^6.26.0", "babel-loader": "^7.1.2", "babel-polyfill": "^6.26.0", "babel-preset-es2015": "^6.18.0", + "babel-preset-flow": "^6.23.0", "babel-preset-react": "^6.5.0", "babel-preset-stage-2": "^6.18.0", "bip32-utils": "^0.10.0", @@ -39,6 +41,7 @@ "eslint-plugin-react": "^7.3.0", "eslint-plugin-standard": "^3.0.1", "file-loader": "^0.11.2", + "flow-bin": "^0.54.1", "isomorphic-fetch": "^2.2.1", "json-loader": "^0.5.4", "moment": "^2.18.1", diff --git a/src/scripts/build.sh b/scripts/build.sh similarity index 58% rename from src/scripts/build.sh rename to scripts/build.sh index 8d432d7..9f1bc40 100755 --- a/src/scripts/build.sh +++ b/scripts/build.sh @@ -1,3 +1,3 @@ #!/usr/bin/env bash -npm run build +yarn run build diff --git a/src/containers/App.js b/src/containers/App.js index ee1b13a..2f09cb7 100644 --- a/src/containers/App.js +++ b/src/containers/App.js @@ -23,7 +23,7 @@ import { phraseToSecretItems } from '../utils/wallet' import MainPage from './MainPage' import SetupPage from './SetupPage' -import ZENCASH_IMG from '../assets/img/zencash.png' +import ZENCASH_IMG from '../../assets/img/zencash.png' const renderPage = (route, navigator) => ( diff --git a/src/index.js b/src/index.js index 4aa4e32..3309c20 100644 --- a/src/index.js +++ b/src/index.js @@ -13,7 +13,7 @@ import App from './containers/App'; import ons from 'onsenui'; import 'onsenui/css/onsenui.css'; import 'onsenui/css/onsen-css-components.css' -import './assets/css/index.css' +import '../assets/css/index.css' import { ZENCASH_MOBILE_SAVE_PATH, readFromFile, writeToFile } from './utils/persistentStorage' diff --git a/webpack.config.js b/webpack.config.js index 545e4cc..6816c41 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -10,7 +10,7 @@ module.exports = { 'react-hot-loader/patch', 'webpack-dev-server/client?http://0.0.0.0:9000', 'webpack/hot/only-dev-server', - './src/index.js' + './lib/index.js' ], output: { path: path.join(__dirname, 'www'), diff --git a/webpack.config.prod.js b/webpack.config.prod.js index adf1f78..f7afdfc 100644 --- a/webpack.config.prod.js +++ b/webpack.config.prod.js @@ -6,7 +6,7 @@ module.exports = { devtool: 'source-map', context: __dirname, entry: [ - './src/index.js' + './lib/index.js' ], output: { path: path.join(__dirname, 'www'), diff --git a/www/bundle.js b/www/bundle.js index ea13889..02369a4 100644 --- a/www/bundle.js +++ b/www/bundle.js @@ -95135,7 +95135,9 @@ __webpack_require__(967); var _persistentStorage = __webpack_require__(188); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; +} var logger = (0, _reduxLogger2.default)(); @@ -95159,29 +95161,13 @@ store.subscribe(function () { var rootElement = document.getElementById('root'); _onsenui2.default.ready(function () { - return (0, _reactDom.render)(_react2.default.createElement( - _reactHotLoader.AppContainer, - null, - _react2.default.createElement( - _reactRedux.Provider, - { store: store }, - _react2.default.createElement(_App2.default, null) - ) - ), rootElement); + return (0, _reactDom.render)(_react2.default.createElement(_reactHotLoader.AppContainer, null, _react2.default.createElement(_reactRedux.Provider, { store: store }, _react2.default.createElement(_App2.default, null))), rootElement); }); if (false) { module.hot.accept('./containers/App', function () { var NextApp = require('./containers/App').default; - (0, _reactDom.render)(_react2.default.createElement( - _reactHotLoader.AppContainer, - null, - _react2.default.createElement( - _reactRedux.Provider, - { store: store }, - _react2.default.createElement(NextApp, null) - ) - ), rootElement); + (0, _reactDom.render)(_react2.default.createElement(_reactHotLoader.AppContainer, null, _react2.default.createElement(_reactRedux.Provider, { store: store }, _react2.default.createElement(NextApp, null))), rootElement); }); } @@ -108334,7 +108320,9 @@ var _Context = __webpack_require__(788); var _Context2 = _interopRequireDefault(_Context); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; +} var allReducers = (0, _redux.combineReducers)({ secrets: _Secrets2.default, @@ -113796,11 +113784,21 @@ function ContextReducer() { "use strict"; +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + Object.defineProperty(exports, "__esModule", { value: true }); -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); +var _createClass = function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i];descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if ("value" in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor); + } + }return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps);if (staticProps) defineProperties(Constructor, staticProps);return Constructor; + }; +}(); var _react = __webpack_require__(20); @@ -113834,13 +113832,27 @@ var _zencash = __webpack_require__(946); var _zencash2 = _interopRequireDefault(_zencash); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; +} -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } +function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + }return call && ((typeof call === "undefined" ? "undefined" : _typeof(call)) === "object" || typeof call === "function") ? call : self; +} -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Page that does the funky loading animation while reading files +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + (typeof superClass === "undefined" ? "undefined" : _typeof(superClass))); + }subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; +} // Page that does the funky loading animation while reading files // Or page that displays the MainPage. this page exists because // of the async nature of JS @@ -113922,17 +113934,7 @@ var App = function (_React$Component) { initialRoute: { component: _MainPage2.default, key: 'MAIN_PAGE' } }) : _react2.default.createElement(_SetupPage2.default, { setHasExistingWallet: function setHasExistingWallet(v) { return _this2.setState({ hasExistingWallet: v }); - } }) : _react2.default.createElement( - _reactOnsenui.Page, - null, - _react2.default.createElement( - 'div', - { style: { marginTop: '40%', textAlign: 'center' } }, - _react2.default.createElement('img', { src: _zencash2.default, style: { width: '30%' } }), - _react2.default.createElement('br', null), - _react2.default.createElement(_reactOnsenui.Icon, { icon: 'spinner', spin: true }) - ) - ); + } }) : _react2.default.createElement(_reactOnsenui.Page, null, _react2.default.createElement('div', { style: { marginTop: '40%', textAlign: 'center' } }, _react2.default.createElement('img', { src: _zencash2.default, style: { width: '30%' } }), _react2.default.createElement('br', null), _react2.default.createElement(_reactOnsenui.Icon, { icon: 'spinner', spin: true }))); } }]); @@ -133364,11 +133366,21 @@ module.exports = { "use strict"; +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + Object.defineProperty(exports, "__esModule", { value: true }); -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); +var _createClass = function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i];descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if ("value" in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor); + } + }return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps);if (staticProps) defineProperties(Constructor, staticProps);return Constructor; + }; +}(); var _react = __webpack_require__(20); @@ -133410,13 +133422,27 @@ var _translations = __webpack_require__(54); var _translations2 = _interopRequireDefault(_translations); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; +} -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } +function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + }return call && ((typeof call === "undefined" ? "undefined" : _typeof(call)) === "object" || typeof call === "function") ? call : self; +} -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + (typeof superClass === "undefined" ? "undefined" : _typeof(superClass))); + }subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; +} var getTxDetailPage = function getTxDetailPage(tx) { var curLang = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _Settings.LANG_ENGLISH; @@ -133424,218 +133450,15 @@ var getTxDetailPage = function getTxDetailPage(tx) { var curTranslation = _translations2.default[curLang]; var txPage = function txPage(_ref) { var navigator = _ref.navigator; - return _react2.default.createElement( - _reactOnsenui.Page, - { renderToolbar: function renderToolbar() { - return _react2.default.createElement( - _reactOnsenui.Toolbar, - null, - _react2.default.createElement( - 'div', - { className: 'left' }, - _react2.default.createElement( - _reactOnsenui.BackButton, - { onClick: function onClick() { - return navigator.popPage(); - } }, - 'Back' - ) - ) - ); - } }, - _react2.default.createElement( - _reactOnsenui.List, - { style: { wordBreak: 'break-word' } }, - _react2.default.createElement( - _reactOnsenui.ListItem, - { tappable: true }, - _react2.default.createElement( - 'ons-row', - null, - _react2.default.createElement( - 'strong', - null, - curTranslation.TxDetailPage.txid - ) - ), - _react2.default.createElement( - 'ons-row', - null, - tx.txid - ) - ), - _react2.default.createElement( - _reactOnsenui.ListItem, - { tappable: true }, - _react2.default.createElement( - 'ons-row', - null, - _react2.default.createElement( - 'strong', - null, - curTranslation.TxDetailPage.blockhash - ) - ), - _react2.default.createElement( - 'ons-row', - null, - tx.blockhash - ) - ), - _react2.default.createElement( - _reactOnsenui.ListItem, - { tappable: true }, - _react2.default.createElement( - 'ons-row', - null, - _react2.default.createElement( - 'strong', - null, - curTranslation.General.version - ) - ), - _react2.default.createElement( - 'ons-row', - null, - tx.version - ) - ), - _react2.default.createElement( - _reactOnsenui.ListItem, - { tappable: true }, - _react2.default.createElement( - 'ons-row', - null, - _react2.default.createElement( - 'strong', - null, - curTranslation.TxDetailPage.blockheight - ) - ), - _react2.default.createElement( - 'ons-row', - null, - tx.blockheight - ) - ), - _react2.default.createElement( - _reactOnsenui.ListItem, - { tappable: true }, - _react2.default.createElement( - 'ons-row', - null, - _react2.default.createElement( - 'strong', - null, - curTranslation.TxDetailPage.confirmations - ) - ), - _react2.default.createElement( - 'ons-row', - null, - tx.confirmations - ) - ), - _react2.default.createElement( - _reactOnsenui.ListItem, - { tappable: true }, - _react2.default.createElement( - 'ons-row', - null, - _react2.default.createElement( - 'strong', - null, - curTranslation.General.fees - ) - ), - _react2.default.createElement( - 'ons-row', - null, - tx.fees - ) - ), - _react2.default.createElement( - _reactOnsenui.ListItem, - { tappable: true }, - _react2.default.createElement( - 'ons-row', - null, - _react2.default.createElement( - 'strong', - null, - curTranslation.General.in, - '\xA0(', - tx.valueIn, - ' ZEN)' - ) - ), - tx.vin.map(function (vin) { - return _react2.default.createElement( - 'ons-row', - { style: { marginTop: '10px' } }, - _react2.default.createElement( - 'ons-col', - { width: '90%' }, - vin.addr, - _react2.default.createElement('br', null), - _react2.default.createElement( - 'span', - { style: { color: '#7f8c8d' } }, - '(', - vin.value, - ' ZEN)' - ) - ), - _react2.default.createElement( - 'ons-col', - { width: '10%' }, - _react2.default.createElement(_reactOnsenui.Icon, { icon: 'ion-arrow-right-c' }) - ) - ); - }) - ), - _react2.default.createElement( - _reactOnsenui.ListItem, - { tappable: true }, - _react2.default.createElement( - 'ons-row', - null, - _react2.default.createElement( - 'strong', - null, - curTranslation.General.out, - ' (', - tx.valueOut, - ' ZEN)' - ) - ), - tx.vout.map(function (vout) { - return _react2.default.createElement( - 'ons-row', - { style: { marginTop: '10px' } }, - _react2.default.createElement( - 'ons-col', - { width: '90%' }, - vout.scriptPubKey.addresses[0], - _react2.default.createElement('br', null), - _react2.default.createElement( - 'span', - { style: { color: '#7f8c8d' } }, - '(', - vout.value, - ' ZEN)' - ) - ), - _react2.default.createElement( - 'ons-col', - { width: '10%' }, - _react2.default.createElement(_reactOnsenui.Icon, { icon: 'ion-arrow-left-c' }) - ) - ); - }) - ) - ) - ); + return _react2.default.createElement(_reactOnsenui.Page, { renderToolbar: function renderToolbar() { + return _react2.default.createElement(_reactOnsenui.Toolbar, null, _react2.default.createElement('div', { className: 'left' }, _react2.default.createElement(_reactOnsenui.BackButton, { onClick: function onClick() { + return navigator.popPage(); + } }, 'Back'))); + } }, _react2.default.createElement(_reactOnsenui.List, { style: { wordBreak: 'break-word' } }, _react2.default.createElement(_reactOnsenui.ListItem, { tappable: true }, _react2.default.createElement('ons-row', null, _react2.default.createElement('strong', null, curTranslation.TxDetailPage.txid)), _react2.default.createElement('ons-row', null, tx.txid)), _react2.default.createElement(_reactOnsenui.ListItem, { tappable: true }, _react2.default.createElement('ons-row', null, _react2.default.createElement('strong', null, curTranslation.TxDetailPage.blockhash)), _react2.default.createElement('ons-row', null, tx.blockhash)), _react2.default.createElement(_reactOnsenui.ListItem, { tappable: true }, _react2.default.createElement('ons-row', null, _react2.default.createElement('strong', null, curTranslation.General.version)), _react2.default.createElement('ons-row', null, tx.version)), _react2.default.createElement(_reactOnsenui.ListItem, { tappable: true }, _react2.default.createElement('ons-row', null, _react2.default.createElement('strong', null, curTranslation.TxDetailPage.blockheight)), _react2.default.createElement('ons-row', null, tx.blockheight)), _react2.default.createElement(_reactOnsenui.ListItem, { tappable: true }, _react2.default.createElement('ons-row', null, _react2.default.createElement('strong', null, curTranslation.TxDetailPage.confirmations)), _react2.default.createElement('ons-row', null, tx.confirmations)), _react2.default.createElement(_reactOnsenui.ListItem, { tappable: true }, _react2.default.createElement('ons-row', null, _react2.default.createElement('strong', null, curTranslation.General.fees)), _react2.default.createElement('ons-row', null, tx.fees)), _react2.default.createElement(_reactOnsenui.ListItem, { tappable: true }, _react2.default.createElement('ons-row', null, _react2.default.createElement('strong', null, curTranslation.General.in, '\xA0(', tx.valueIn, ' ZEN)')), tx.vin.map(function (vin) { + return _react2.default.createElement('ons-row', { style: { marginTop: '10px' } }, _react2.default.createElement('ons-col', { width: '90%' }, vin.addr, _react2.default.createElement('br', null), _react2.default.createElement('span', { style: { color: '#7f8c8d' } }, '(', vin.value, ' ZEN)')), _react2.default.createElement('ons-col', { width: '10%' }, _react2.default.createElement(_reactOnsenui.Icon, { icon: 'ion-arrow-right-c' }))); + })), _react2.default.createElement(_reactOnsenui.ListItem, { tappable: true }, _react2.default.createElement('ons-row', null, _react2.default.createElement('strong', null, curTranslation.General.out, ' (', tx.valueOut, ' ZEN)')), tx.vout.map(function (vout) { + return _react2.default.createElement('ons-row', { style: { marginTop: '10px' } }, _react2.default.createElement('ons-col', { width: '90%' }, vout.scriptPubKey.addresses[0], _react2.default.createElement('br', null), _react2.default.createElement('span', { style: { color: '#7f8c8d' } }, '(', vout.value, ' ZEN)')), _react2.default.createElement('ons-col', { width: '10%' }, _react2.default.createElement(_reactOnsenui.Icon, { icon: 'ion-arrow-left-c' }))); + })))); }; return txPage; }; @@ -133779,29 +133602,11 @@ var MainPage = function (_React$Component) { value: function renderFixed() { var _this2 = this; - return _react2.default.createElement( - _reactOnsenui.SpeedDial, - { position: 'bottom right' }, - _react2.default.createElement( - _reactOnsenui.Fab, - null, - _react2.default.createElement(_reactOnsenui.Icon, { icon: 'md-plus' }) - ), - _react2.default.createElement( - _reactOnsenui.SpeedDialItem, - { onClick: function onClick() { - return _this2.gotoComponent(_SendPage2.default); - } }, - _react2.default.createElement(_reactOnsenui.Icon, { icon: 'ion-paper-airplane' }) - ), - _react2.default.createElement( - _reactOnsenui.SpeedDialItem, - { onClick: function onClick() { - return _this2.gotoComponent(_AddressInfoPage2.default); - } }, - _react2.default.createElement(_reactOnsenui.Icon, { icon: 'ion-qr-scanner' }) - ) - ); + return _react2.default.createElement(_reactOnsenui.SpeedDial, { position: 'bottom right' }, _react2.default.createElement(_reactOnsenui.Fab, null, _react2.default.createElement(_reactOnsenui.Icon, { icon: 'md-plus' })), _react2.default.createElement(_reactOnsenui.SpeedDialItem, { onClick: function onClick() { + return _this2.gotoComponent(_SendPage2.default); + } }, _react2.default.createElement(_reactOnsenui.Icon, { icon: 'ion-paper-airplane' })), _react2.default.createElement(_reactOnsenui.SpeedDialItem, { onClick: function onClick() { + return _this2.gotoComponent(_AddressInfoPage2.default); + } }, _react2.default.createElement(_reactOnsenui.Icon, { icon: 'ion-qr-scanner' }))); } }, { key: 'renderToolbar', @@ -133812,40 +133617,13 @@ var MainPage = function (_React$Component) { var CUR_LANG = this.props.settings.language; var titleLang = _translations2.default[CUR_LANG].MainPage.title; - return _react2.default.createElement( - _reactOnsenui.Toolbar, - null, - _react2.default.createElement( - 'div', - { className: 'center' }, - titleLang - ), - _react2.default.createElement( - 'div', - { className: 'right' }, - _react2.default.createElement( - _reactOnsenui.ToolbarButton, - { onClick: function onClick() { - return _this3.gotoComponent(_SettingsPage2.default); - } }, - _react2.default.createElement(_reactOnsenui.Icon, { icon: 'ion-wrench' }) - ), - _react2.default.createElement( - _reactOnsenui.ToolbarButton, - { onClick: function onClick() { - return _this3.setAddressInfo(_this3.props.context.address); - } }, - _react2.default.createElement(_reactOnsenui.Icon, { icon: 'ion-refresh' }) - ), - _react2.default.createElement( - _reactOnsenui.ToolbarButton, - { onClick: function onClick(e) { - return _this3.toggleSelectAddressDialog(); - } }, - _react2.default.createElement(_reactOnsenui.Icon, { icon: 'ion-clipboard' }) - ) - ) - ); + return _react2.default.createElement(_reactOnsenui.Toolbar, null, _react2.default.createElement('div', { className: 'center' }, titleLang), _react2.default.createElement('div', { className: 'right' }, _react2.default.createElement(_reactOnsenui.ToolbarButton, { onClick: function onClick() { + return _this3.gotoComponent(_SettingsPage2.default); + } }, _react2.default.createElement(_reactOnsenui.Icon, { icon: 'ion-wrench' })), _react2.default.createElement(_reactOnsenui.ToolbarButton, { onClick: function onClick() { + return _this3.setAddressInfo(_this3.props.context.address); + } }, _react2.default.createElement(_reactOnsenui.Icon, { icon: 'ion-refresh' })), _react2.default.createElement(_reactOnsenui.ToolbarButton, { onClick: function onClick(e) { + return _this3.toggleSelectAddressDialog(); + } }, _react2.default.createElement(_reactOnsenui.Icon, { icon: 'ion-clipboard' })))); } }, { key: 'render', @@ -133867,180 +133645,65 @@ var MainPage = function (_React$Component) { // For qr scanning var pageOpacity = this.props.context.qrScanning ? '0.0' : '1.0'; - return _react2.default.createElement( - _reactOnsenui.Page, - { - style: { opacity: pageOpacity }, - renderToolbar: function renderToolbar(e) { - return _this4.renderToolbar(); - }, - renderFixed: function renderFixed(e) { - return _this4.renderFixed(); - } }, - _react2.default.createElement( - 'ons-row', - { style: { marginTop: '25px', marginBottom: '25px', overflowWrap: 'break-word' } }, - _react2.default.createElement( - 'ons-col', - { width: '47%' }, - _react2.default.createElement( - 'h1', - { style: { marginLeft: '12px' } }, - this.props.context.value === null ? loadingLang : (0, _index.prettyFormatPrices)(this.props.context.value), - '\xA0', - this.props.context.value === null ? null : _react2.default.createElement( - 'span', - { style: { fontSize: '16px' } }, - 'ZEN' - ) - ) - ), - _react2.default.createElement( - 'ons-col', - null, - _react2.default.createElement( - 'ons-row', - null, - _react2.default.createElement( - 'ons-col', - null, - _react2.default.createElement( - 'h5', - { style: { marginLeft: '12px' } }, - 'BTC', - _react2.default.createElement('br', null), - this.props.context.BTCValue === null && this.props.context.value === null ? loadingLang : (0, _index.prettyFormatPrices)(this.props.context.value * this.props.context.BTCValue) - ) - ), - _react2.default.createElement( - 'ons-col', - null, - _react2.default.createElement( - 'h5', - { style: { marginLeft: '12px' } }, - this.props.settings.currency, - _react2.default.createElement('br', null), - this.props.context.currencyValue === null && this.props.context.value === null ? loadingLang : (0, _index.prettyFormatPrices)(this.props.context.value * this.props.context.currencyValue, 2) - ) - ) - ) - ) - ), - _react2.default.createElement('hr', null), - _react2.default.createElement( - _reactOnsenui.List, - null, - this.state.selectedAddressScannedTxs === false ? _react2.default.createElement( - _reactOnsenui.ListHeader, - null, - _react2.default.createElement( - 'div', - { style: { textAlign: 'center' } }, - _react2.default.createElement(_reactOnsenui.Icon, { icon: 'spinner', spin: true }) - ) - ) : this.state.selectedAddressNoTxs ? _react2.default.createElement( - _reactOnsenui.ListHeader, - null, - noTxFoundLang - ) : this.state.selectedAddressTxs.map(function (tx) { - var _this5 = this; - - var selectedAddress = this.props.context.address; - var vins = tx.vin || []; - var vouts = tx.vout || []; - var txTime = _moment2.default.unix(tx.time).local().format('lll'); - var txValue = 0.0; - - // Double tap tx to get more info on it - var txPage = getTxDetailPage(tx, CUR_LANG); - var handleTxClick = function handleTxClick() { - return _this5.gotoComponent(txPage); - }; + return _react2.default.createElement(_reactOnsenui.Page, { + style: { opacity: pageOpacity }, + renderToolbar: function renderToolbar(e) { + return _this4.renderToolbar(); + }, + renderFixed: function renderFixed(e) { + return _this4.renderFixed(); + } }, _react2.default.createElement('ons-row', { style: { marginTop: '25px', marginBottom: '25px', overflowWrap: 'break-word' } }, _react2.default.createElement('ons-col', { width: '47%' }, _react2.default.createElement('h1', { style: { marginLeft: '12px' } }, this.props.context.value === null ? loadingLang : (0, _index.prettyFormatPrices)(this.props.context.value), '\xA0', this.props.context.value === null ? null : _react2.default.createElement('span', { style: { fontSize: '16px' } }, 'ZEN'))), _react2.default.createElement('ons-col', null, _react2.default.createElement('ons-row', null, _react2.default.createElement('ons-col', null, _react2.default.createElement('h5', { style: { marginLeft: '12px' } }, 'BTC', _react2.default.createElement('br', null), this.props.context.BTCValue === null && this.props.context.value === null ? loadingLang : (0, _index.prettyFormatPrices)(this.props.context.value * this.props.context.BTCValue))), _react2.default.createElement('ons-col', null, _react2.default.createElement('h5', { style: { marginLeft: '12px' } }, this.props.settings.currency, _react2.default.createElement('br', null), this.props.context.currencyValue === null && this.props.context.value === null ? loadingLang : (0, _index.prettyFormatPrices)(this.props.context.value * this.props.context.currencyValue, 2)))))), _react2.default.createElement('hr', null), _react2.default.createElement(_reactOnsenui.List, null, this.state.selectedAddressScannedTxs === false ? _react2.default.createElement(_reactOnsenui.ListHeader, null, _react2.default.createElement('div', { style: { textAlign: 'center' } }, _react2.default.createElement(_reactOnsenui.Icon, { icon: 'spinner', spin: true }))) : this.state.selectedAddressNoTxs ? _react2.default.createElement(_reactOnsenui.ListHeader, null, noTxFoundLang) : this.state.selectedAddressTxs.map(function (tx) { + var _this5 = this; + + var selectedAddress = this.props.context.address; + var vins = tx.vin || []; + var vouts = tx.vout || []; + var txTime = _moment2.default.unix(tx.time).local().format('lll'); + var txValue = 0.0; + + // Double tap tx to get more info on it + var txPage = getTxDetailPage(tx, CUR_LANG); + var handleTxClick = function handleTxClick() { + return _this5.gotoComponent(txPage); + }; - vins.forEach(function (vin) { - if (vin.addr === selectedAddress) { - txValue = txValue - parseFloat(vin.value); - } - }); + vins.forEach(function (vin) { + if (vin.addr === selectedAddress) { + txValue = txValue - parseFloat(vin.value); + } + }); - vouts.forEach(function (vout) { - if (vout.scriptPubKey.addresses[0] === selectedAddress) { - txValue = txValue + parseFloat(vout.value); - } - }); + vouts.forEach(function (vout) { + if (vout.scriptPubKey.addresses[0] === selectedAddress) { + txValue = txValue + parseFloat(vout.value); + } + }); - // Don't display useless data - if (parseFloat(txValue.toFixed(8)) === 0.0) { - return null; - } + // Don't display useless data + if (parseFloat(txValue.toFixed(8)) === 0.0) { + return null; + } - return _react2.default.createElement( - _reactOnsenui.ListItem, - { - onClick: handleTxClick, - tappable: true }, - _react2.default.createElement( - 'ons-row', - null, - _react2.default.createElement( - 'ons-col', - null, - txValue > 0 ? receivedLang : sentLang, - ' ', - _react2.default.createElement('br', null), - _react2.default.createElement( - 'span', - { style: { color: '#7f8c8d' } }, - txTime - ) - ), - _react2.default.createElement( - 'ons-col', - { style: { textAlign: 'right', paddingRight: '12px' } }, - txValue > 0 ? '+' : '-', - ' ', - parseFloat(Math.abs(txValue)).toFixed(8), - ' zen' - ) - ) - ); - }.bind(this)) - ), - _react2.default.createElement( - _reactOnsenui.Dialog, - { - isOpen: this.state.dialogSelectAddressOpen, - onCancel: this.toggleSelectAddressDialog, - animationOptions: { duration: 0.1, delay: 0.2 }, - cancelable: true }, - _react2.default.createElement( - _reactOnsenui.List, - null, - _react2.default.createElement( - _reactOnsenui.ListHeader, - null, - addressLang - ), - this.props.secrets.items.map(function (e) { - return _react2.default.createElement( - _reactOnsenui.ListItem, - { - style: { fontSize: '14px' }, - onClick: function () { - this.props.setAddress(e.address); - this.props.setPrivateKey(e.privateKey); - this.setState({ - dialogSelectAddressOpen: false - }); - }.bind(this), - tappable: true - }, - e.address - ); - }.bind(this)) - ) - ) - ); + return _react2.default.createElement(_reactOnsenui.ListItem, { + onClick: handleTxClick, + tappable: true }, _react2.default.createElement('ons-row', null, _react2.default.createElement('ons-col', null, txValue > 0 ? receivedLang : sentLang, ' ', _react2.default.createElement('br', null), _react2.default.createElement('span', { style: { color: '#7f8c8d' } }, txTime)), _react2.default.createElement('ons-col', { style: { textAlign: 'right', paddingRight: '12px' } }, txValue > 0 ? '+' : '-', ' ', parseFloat(Math.abs(txValue)).toFixed(8), ' zen'))); + }.bind(this))), _react2.default.createElement(_reactOnsenui.Dialog, { + isOpen: this.state.dialogSelectAddressOpen, + onCancel: this.toggleSelectAddressDialog, + animationOptions: { duration: 0.1, delay: 0.2 }, + cancelable: true }, _react2.default.createElement(_reactOnsenui.List, null, _react2.default.createElement(_reactOnsenui.ListHeader, null, addressLang), this.props.secrets.items.map(function (e) { + return _react2.default.createElement(_reactOnsenui.ListItem, { + style: { fontSize: '14px' }, + onClick: function () { + this.props.setAddress(e.address); + this.props.setPrivateKey(e.privateKey); + this.setState({ + dialogSelectAddressOpen: false + }); + }.bind(this), + tappable: true + }, e.address); + }.bind(this))))); } }]); @@ -135434,11 +135097,21 @@ webpackContext.id = 932; "use strict"; +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + Object.defineProperty(exports, "__esModule", { value: true }); -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); +var _createClass = function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i];descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if ("value" in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor); + } + }return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps);if (staticProps) defineProperties(Constructor, staticProps);return Constructor; + }; +}(); var _react = __webpack_require__(20); @@ -135458,13 +135131,27 @@ var _translations = __webpack_require__(54); var _translations2 = _interopRequireDefault(_translations); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; +} -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } +function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + }return call && ((typeof call === "undefined" ? "undefined" : _typeof(call)) === "object" || typeof call === "function") ? call : self; +} -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + (typeof superClass === "undefined" ? "undefined" : _typeof(superClass))); + }subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; +} var AddressInfoPage = function (_React$Component) { _inherits(AddressInfoPage, _React$Component); @@ -135483,26 +135170,9 @@ var AddressInfoPage = function (_React$Component) { var CUR_LANG = this.props.settings.language; var addressLang = _translations2.default[CUR_LANG].General.address; - return _react2.default.createElement( - _reactOnsenui.Toolbar, - null, - _react2.default.createElement( - 'div', - { className: 'left' }, - _react2.default.createElement( - _reactOnsenui.BackButton, - { onClick: function onClick() { - return _this2.props.navigator.popPage(); - } }, - 'Back' - ) - ), - _react2.default.createElement( - 'div', - { className: 'center' }, - addressLang - ) - ); + return _react2.default.createElement(_reactOnsenui.Toolbar, null, _react2.default.createElement('div', { className: 'left' }, _react2.default.createElement(_reactOnsenui.BackButton, { onClick: function onClick() { + return _this2.props.navigator.popPage(); + } }, 'Back')), _react2.default.createElement('div', { className: 'center' }, addressLang)); } }, { key: 'render', @@ -135512,33 +135182,11 @@ var AddressInfoPage = function (_React$Component) { var CUR_LANG = this.props.settings.language; var copyToClipboardLang = _translations2.default[CUR_LANG].AddressInfoPage.copyToClipboard; - return _react2.default.createElement( - _reactOnsenui.Page, - { renderToolbar: this.renderToolbar.bind(this) }, - _react2.default.createElement( - 'div', - { style: { padding: '12px 12px 0 12px', textAlign: 'center' } }, - _react2.default.createElement( - 'p', - null, - _react2.default.createElement(_qrcode2.default, { value: this.props.context.address }) - ), - _react2.default.createElement( - 'p', - null, - this.props.context.address - ), - _react2.default.createElement( - _reactOnsenui.Button, - { - onClick: function onClick() { - cordova.plugins.clipboard.copy(_this3.props.context.address); - }, - style: { fontSize: '12px', marginBottom: '10px', width: '90%' } }, - copyToClipboardLang - ) - ) - ); + return _react2.default.createElement(_reactOnsenui.Page, { renderToolbar: this.renderToolbar.bind(this) }, _react2.default.createElement('div', { style: { padding: '12px 12px 0 12px', textAlign: 'center' } }, _react2.default.createElement('p', null, _react2.default.createElement(_qrcode2.default, { value: this.props.context.address })), _react2.default.createElement('p', null, this.props.context.address), _react2.default.createElement(_reactOnsenui.Button, { + onClick: function onClick() { + cordova.plugins.clipboard.copy(_this3.props.context.address); + }, + style: { fontSize: '12px', marginBottom: '10px', width: '90%' } }, copyToClipboardLang))); } }]); @@ -135739,11 +135387,21 @@ var RUSSIAN_TRANSLATION = exports.RUSSIAN_TRANSLATION = { "use strict"; +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + Object.defineProperty(exports, "__esModule", { value: true }); -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); +var _createClass = function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i];descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if ("value" in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor); + } + }return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps);if (staticProps) defineProperties(Constructor, staticProps);return Constructor; + }; +}(); var _react = __webpack_require__(20); @@ -135767,13 +135425,27 @@ var _translations = __webpack_require__(54); var _translations2 = _interopRequireDefault(_translations); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; +} -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } +function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + }return call && ((typeof call === "undefined" ? "undefined" : _typeof(call)) === "object" || typeof call === "function") ? call : self; +} -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + (typeof superClass === "undefined" ? "undefined" : _typeof(superClass))); + }subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; +} var SendPage = function (_React$Component) { _inherits(SendPage, _React$Component); @@ -136077,42 +135749,16 @@ var SendPage = function (_React$Component) { // Language stuff var CUR_LANG = this.props.settings.language; - return _react2.default.createElement( - _reactOnsenui.Toolbar, - null, - _react2.default.createElement( - 'div', - { className: 'left' }, - _react2.default.createElement( - _reactOnsenui.BackButton, - { onClick: function onClick() { - _this6.safeReleaseCamera(); - _this6.props.navigator.popPage(); - } }, - 'Back' - ) - ), - _react2.default.createElement( - 'div', - { className: 'center' }, - _translations2.default[CUR_LANG].SendPage.title - ), - _react2.default.createElement( - 'div', - { className: 'right' }, - _react2.default.createElement( - _reactOnsenui.ToolbarButton, - { onClick: function onClick() { - try { - _this6.handleQRScan(); - } catch (err) { - alert(JSON.stringify(err)); - } - } }, - _react2.default.createElement(_reactOnsenui.Icon, { icon: 'ion-camera' }) - ) - ) - ); + return _react2.default.createElement(_reactOnsenui.Toolbar, null, _react2.default.createElement('div', { className: 'left' }, _react2.default.createElement(_reactOnsenui.BackButton, { onClick: function onClick() { + _this6.safeReleaseCamera(); + _this6.props.navigator.popPage(); + } }, 'Back')), _react2.default.createElement('div', { className: 'center' }, _translations2.default[CUR_LANG].SendPage.title), _react2.default.createElement('div', { className: 'right' }, _react2.default.createElement(_reactOnsenui.ToolbarButton, { onClick: function onClick() { + try { + _this6.handleQRScan(); + } catch (err) { + alert(JSON.stringify(err)); + } + } }, _react2.default.createElement(_reactOnsenui.Icon, { icon: 'ion-camera' })))); } }, { key: 'render', @@ -136144,240 +135790,66 @@ var SendPage = function (_React$Component) { var txSuccessfulLang = _translations2.default[CUR_LANG].SendPage.txSuccessful; var confirmSendLang = _translations2.default[CUR_LANG].SendPage.confirmSend; - return _react2.default.createElement( - _reactOnsenui.Page, - { - style: { opacity: pageOpacity }, - renderToolbar: this.renderToolbar.bind(this) }, + return _react2.default.createElement(_reactOnsenui.Page, { + style: { opacity: pageOpacity }, + renderToolbar: this.renderToolbar.bind(this) }, - // Show qr capture area - this.props.context.qrScanning ? _react2.default.createElement( - 'div', - { style: { height: '100%', opacity: '0.4' } }, - _react2.default.createElement( - 'ons-row', - { style: { height: '30%' } }, - _react2.default.createElement('ons-col', null) - ), - _react2.default.createElement( - 'ons-row', - { style: { height: '40%' } }, - _react2.default.createElement('ons-col', { width: '25%' }), - _react2.default.createElement('ons-col', { - style: { border: '5px solid red' } }), - _react2.default.createElement('ons-col', { width: '25%' }) - ), - _react2.default.createElement('ons-row', { style: { height: '30%' } }) - ) : _react2.default.createElement( - 'div', - { style: { padding: '12px 12px 0 12px' } }, - _react2.default.createElement( - 'div', - null, - _react2.default.createElement( - 'h3', - null, - payToLang - ), - _react2.default.createElement(_reactOnsenui.Input, { - onChange: function onChange(e) { - return _this7.setState({ addressReceive: e.target.value }); - }, - value: this.state.addressReceive, - placeholder: addressLang, - style: { width: '100%' }, - float: true - }) - ), - _react2.default.createElement('br', null), - _react2.default.createElement( - 'h3', - null, - amountToPayLang, - '\xA0\xA0', - _react2.default.createElement( - _reactOnsenui.Button, - { modifier: 'quiet', onClick: function onClick() { - return _this7.handleSendValueChange({ target: { value: _this7.props.context.value } }); - } }, - maxLang - ) - ), - _react2.default.createElement( - 'ons-row', - { width: '45%', style: { textAlign: 'center' } }, - _react2.default.createElement( - 'ons-col', - null, - _react2.default.createElement( - 'span', - { style: { fontSize: '12px', color: '#7f8c8d' } }, - balanceLang, - ':\xA0', - (0, _index.prettyFormatPrices)(this.props.context.value), - '\xA0 ZEN' - ), - _react2.default.createElement(_reactOnsenui.Input, { - onChange: this.handleSendValueChange, - value: this.state.sendValue, - placeholder: amountLang, - style: { width: '100%' } - }), - _react2.default.createElement('br', null), - 'ZEN' - ), - _react2.default.createElement( - 'ons-col', - { width: '10%' }, - _react2.default.createElement('br', null), - _react2.default.createElement(_reactOnsenui.Icon, { icon: 'ion-arrow-swap' }), - _react2.default.createElement('br', null) - ), - _react2.default.createElement( - 'ons-col', - { width: '45%' }, - _react2.default.createElement( - 'span', - { style: { fontSize: '12px', color: '#7f8c8d' } }, - balanceLang, - ':\xA0', - (0, _index.prettyFormatPrices)(this.props.context.value * this.props.context.currencyValue), - '\xA0', - this.props.settings.currency - ), - _react2.default.createElement(_reactOnsenui.Input, { - onChange: this.handleSendCurrencyValueChange, - value: this.state.sendCurrencyValue, - placeholder: amountLang, - style: { width: '100%' } - }), - _react2.default.createElement('br', null), - this.props.settings.currency - ) - ), - _react2.default.createElement('br', null), - _react2.default.createElement( - 'h3', - null, - networkFeeLang - ), - _react2.default.createElement( - 'ons-row', - { style: { textAlign: 'center' } }, - _react2.default.createElement( - 'ons-col', - { width: '25%' }, - slowTxLang - ), - _react2.default.createElement( - 'ons-col', - { width: '50%' }, - _react2.default.createElement(_reactOnsenui.Range, { - style: { width: '100%' }, - onChange: function onChange(e) { - return _this7.setState({ sendFee: e.target.value }); - }, - value: this.state.sendFee, - min: 0, - max: 10000 - }), - _react2.default.createElement('br', null), - feesLang, - ': ', - parseFloat(this.state.sendFee / 100000000).toString(), - ' ZEN' - ), - _react2.default.createElement( - 'ons-col', - { width: '25%' }, - fastTxLang - ) - ), - _react2.default.createElement('br', null), - _react2.default.createElement( - 'div', - null, - _react2.default.createElement( - 'label', - { className: 'left' }, - _react2.default.createElement(_reactOnsenui.Checkbox, { - onChange: function onChange(e) { - _this7.setState({ - confirmSend: !_this7.state.confirmSend - }); - }, - checked: this.state.confirmSend, - inputId: 'understoodCheckbox', type: 'checkbox' - }) - ), - _react2.default.createElement( - 'label', - { htmlFor: 'understoodCheckbox', className: 'center' }, - '\xA0', - confirmSendLang - ) - ), - _react2.default.createElement('br', null), - _react2.default.createElement( - 'ons-row', - { style: { textAlign: 'center' } }, - _react2.default.createElement( - 'ons-col', - { width: '47.5%' }, - _react2.default.createElement( - _reactOnsenui.Button, - { - onClick: function onClick() { - return _this7.props.navigator.popPage(); - }, - style: { width: '100%', height: '50px', paddingTop: '7px' } }, - cancelLang - ) - ), - _react2.default.createElement('ons-col', { width: '5%' }), - _react2.default.createElement( - 'ons-col', - { width: '47.5%' }, - _react2.default.createElement( - _reactOnsenui.Button, - { - onClick: function onClick() { - return _this7.handleSendZEN(); - }, - disabled: !this.state.confirmSend || this.state.progressValue > 0, - style: { width: '100%', height: '50px', paddingTop: '7px' } }, - sendLang - ) - ) - ), - _react2.default.createElement( - 'p', - null, - _react2.default.createElement(_reactOnsenui.ProgressBar, { - style: { width: ' 100%', height: '20px' }, - value: this.state.progressValue - }) - ), - _react2.default.createElement( - 'p', - null, - this.state.progressValue === 100 ? _react2.default.createElement( - 'div', - { style: { textAlign: 'center' } }, - _react2.default.createElement( - 'a', - { - href: '#', - onClick: function onClick() { - return window.open((0, _index.urlAppend)(_this7.props.settings.explorerURL, 'tx/') + _this7.state.sendTxid, '_system'); - } - }, - txSuccessfulLang - ) - ) : null - ) - ) - ); + // Show qr capture area + this.props.context.qrScanning ? _react2.default.createElement('div', { style: { height: '100%', opacity: '0.4' } }, _react2.default.createElement('ons-row', { style: { height: '30%' } }, _react2.default.createElement('ons-col', null)), _react2.default.createElement('ons-row', { style: { height: '40%' } }, _react2.default.createElement('ons-col', { width: '25%' }), _react2.default.createElement('ons-col', { + style: { border: '5px solid red' } }), _react2.default.createElement('ons-col', { width: '25%' })), _react2.default.createElement('ons-row', { style: { height: '30%' } })) : _react2.default.createElement('div', { style: { padding: '12px 12px 0 12px' } }, _react2.default.createElement('div', null, _react2.default.createElement('h3', null, payToLang), _react2.default.createElement(_reactOnsenui.Input, { + onChange: function onChange(e) { + return _this7.setState({ addressReceive: e.target.value }); + }, + value: this.state.addressReceive, + placeholder: addressLang, + style: { width: '100%' }, + float: true + })), _react2.default.createElement('br', null), _react2.default.createElement('h3', null, amountToPayLang, '\xA0\xA0', _react2.default.createElement(_reactOnsenui.Button, { modifier: 'quiet', onClick: function onClick() { + return _this7.handleSendValueChange({ target: { value: _this7.props.context.value } }); + } }, maxLang)), _react2.default.createElement('ons-row', { width: '45%', style: { textAlign: 'center' } }, _react2.default.createElement('ons-col', null, _react2.default.createElement('span', { style: { fontSize: '12px', color: '#7f8c8d' } }, balanceLang, ':\xA0', (0, _index.prettyFormatPrices)(this.props.context.value), '\xA0 ZEN'), _react2.default.createElement(_reactOnsenui.Input, { + onChange: this.handleSendValueChange, + value: this.state.sendValue, + placeholder: amountLang, + style: { width: '100%' } + }), _react2.default.createElement('br', null), 'ZEN'), _react2.default.createElement('ons-col', { width: '10%' }, _react2.default.createElement('br', null), _react2.default.createElement(_reactOnsenui.Icon, { icon: 'ion-arrow-swap' }), _react2.default.createElement('br', null)), _react2.default.createElement('ons-col', { width: '45%' }, _react2.default.createElement('span', { style: { fontSize: '12px', color: '#7f8c8d' } }, balanceLang, ':\xA0', (0, _index.prettyFormatPrices)(this.props.context.value * this.props.context.currencyValue), '\xA0', this.props.settings.currency), _react2.default.createElement(_reactOnsenui.Input, { + onChange: this.handleSendCurrencyValueChange, + value: this.state.sendCurrencyValue, + placeholder: amountLang, + style: { width: '100%' } + }), _react2.default.createElement('br', null), this.props.settings.currency)), _react2.default.createElement('br', null), _react2.default.createElement('h3', null, networkFeeLang), _react2.default.createElement('ons-row', { style: { textAlign: 'center' } }, _react2.default.createElement('ons-col', { width: '25%' }, slowTxLang), _react2.default.createElement('ons-col', { width: '50%' }, _react2.default.createElement(_reactOnsenui.Range, { + style: { width: '100%' }, + onChange: function onChange(e) { + return _this7.setState({ sendFee: e.target.value }); + }, + value: this.state.sendFee, + min: 0, + max: 10000 + }), _react2.default.createElement('br', null), feesLang, ': ', parseFloat(this.state.sendFee / 100000000).toString(), ' ZEN'), _react2.default.createElement('ons-col', { width: '25%' }, fastTxLang)), _react2.default.createElement('br', null), _react2.default.createElement('div', null, _react2.default.createElement('label', { className: 'left' }, _react2.default.createElement(_reactOnsenui.Checkbox, { + onChange: function onChange(e) { + _this7.setState({ + confirmSend: !_this7.state.confirmSend + }); + }, + checked: this.state.confirmSend, + inputId: 'understoodCheckbox', type: 'checkbox' + })), _react2.default.createElement('label', { htmlFor: 'understoodCheckbox', className: 'center' }, '\xA0', confirmSendLang)), _react2.default.createElement('br', null), _react2.default.createElement('ons-row', { style: { textAlign: 'center' } }, _react2.default.createElement('ons-col', { width: '47.5%' }, _react2.default.createElement(_reactOnsenui.Button, { + onClick: function onClick() { + return _this7.props.navigator.popPage(); + }, + style: { width: '100%', height: '50px', paddingTop: '7px' } }, cancelLang)), _react2.default.createElement('ons-col', { width: '5%' }), _react2.default.createElement('ons-col', { width: '47.5%' }, _react2.default.createElement(_reactOnsenui.Button, { + onClick: function onClick() { + return _this7.handleSendZEN(); + }, + disabled: !this.state.confirmSend || this.state.progressValue > 0, + style: { width: '100%', height: '50px', paddingTop: '7px' } }, sendLang))), _react2.default.createElement('p', null, _react2.default.createElement(_reactOnsenui.ProgressBar, { + style: { width: ' 100%', height: '20px' }, + value: this.state.progressValue + })), _react2.default.createElement('p', null, this.state.progressValue === 100 ? _react2.default.createElement('div', { style: { textAlign: 'center' } }, _react2.default.createElement('a', { + href: '#', + onClick: function onClick() { + return window.open((0, _index.urlAppend)(_this7.props.settings.explorerURL, 'tx/') + _this7.state.sendTxid, '_system'); + } + }, txSuccessfulLang)) : null))); } }]); @@ -136407,11 +135879,21 @@ exports.default = (0, _reactRedux.connect)(mapStateToProps, matchDispatchToProps "use strict"; +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + Object.defineProperty(exports, "__esModule", { value: true }); -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); +var _createClass = function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i];descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if ("value" in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor); + } + }return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps);if (staticProps) defineProperties(Constructor, staticProps);return Constructor; + }; +}(); var _react = __webpack_require__(20); @@ -136453,13 +135935,27 @@ var _translations = __webpack_require__(54); var _translations2 = _interopRequireDefault(_translations); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; +} -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } +function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + }return call && ((typeof call === "undefined" ? "undefined" : _typeof(call)) === "object" || typeof call === "function") ? call : self; +} -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + (typeof superClass === "undefined" ? "undefined" : _typeof(superClass))); + }subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; +} var SettingsPage = function (_React$Component) { _inherits(SettingsPage, _React$Component); @@ -136484,26 +135980,9 @@ var SettingsPage = function (_React$Component) { var CUR_LANG = this.props.settings.language; var titleLang = _translations2.default[CUR_LANG].SettingsPage.title; - return _react2.default.createElement( - _reactOnsenui.Toolbar, - null, - _react2.default.createElement( - 'div', - { className: 'left' }, - _react2.default.createElement( - _reactOnsenui.BackButton, - { onClick: function onClick() { - return _this2.props.navigator.popPage(); - } }, - 'Back' - ) - ), - _react2.default.createElement( - 'div', - { className: 'center' }, - titleLang - ) - ); + return _react2.default.createElement(_reactOnsenui.Toolbar, null, _react2.default.createElement('div', { className: 'left' }, _react2.default.createElement(_reactOnsenui.BackButton, { onClick: function onClick() { + return _this2.props.navigator.popPage(); + } }, 'Back')), _react2.default.createElement('div', { className: 'center' }, titleLang)); } }, { key: 'render', @@ -136518,57 +135997,19 @@ var SettingsPage = function (_React$Component) { var showPrivateKeysLang = _translations2.default[CUR_LANG].SettingsPage.showPrivateKeys; var recoverExistingWalletLang = _translations2.default[CUR_LANG].SettingsPage.recoverExistingWallet; - return _react2.default.createElement( - _reactOnsenui.Page, - { renderToolbar: this.renderToolbar.bind(this) }, - _react2.default.createElement( - _reactOnsenui.List, - null, - _react2.default.createElement( - _reactOnsenui.ListItem, - { - onClick: this.gotoComponent.bind(this, _AboutPage2.default), - tappable: true }, - aboutLang - ), - _react2.default.createElement( - _reactOnsenui.ListItem, - { - onClick: this.gotoComponent.bind(this, _SelectLanguagePage2.default), - tappable: true }, - languageLang - ), - _react2.default.createElement( - _reactOnsenui.ListItem, - { - onClick: this.gotoComponent.bind(this, _SelectCurrencyPage2.default), - tappable: true }, - currencyLang - ), - _react2.default.createElement(_reactOnsenui.ListHeader, null), - _react2.default.createElement( - _reactOnsenui.ListItem, - { - onClick: this.gotoComponent.bind(this, _SecretPhrasePage2.default), - tappable: true }, - secretPhraseLang - ), - _react2.default.createElement( - _reactOnsenui.ListItem, - { - onClick: this.gotoComponent.bind(this, _ShowPrivateKeyPage2.default), - tappable: true }, - showPrivateKeysLang - ), - _react2.default.createElement( - _reactOnsenui.ListItem, - { - onClick: this.gotoComponent.bind(this, _RecoverWalletPage2.default), - tappable: true, style: { color: 'red' } }, - recoverExistingWalletLang - ) - ) - ); + return _react2.default.createElement(_reactOnsenui.Page, { renderToolbar: this.renderToolbar.bind(this) }, _react2.default.createElement(_reactOnsenui.List, null, _react2.default.createElement(_reactOnsenui.ListItem, { + onClick: this.gotoComponent.bind(this, _AboutPage2.default), + tappable: true }, aboutLang), _react2.default.createElement(_reactOnsenui.ListItem, { + onClick: this.gotoComponent.bind(this, _SelectLanguagePage2.default), + tappable: true }, languageLang), _react2.default.createElement(_reactOnsenui.ListItem, { + onClick: this.gotoComponent.bind(this, _SelectCurrencyPage2.default), + tappable: true }, currencyLang), _react2.default.createElement(_reactOnsenui.ListHeader, null), _react2.default.createElement(_reactOnsenui.ListItem, { + onClick: this.gotoComponent.bind(this, _SecretPhrasePage2.default), + tappable: true }, secretPhraseLang), _react2.default.createElement(_reactOnsenui.ListItem, { + onClick: this.gotoComponent.bind(this, _ShowPrivateKeyPage2.default), + tappable: true }, showPrivateKeysLang), _react2.default.createElement(_reactOnsenui.ListItem, { + onClick: this.gotoComponent.bind(this, _RecoverWalletPage2.default), + tappable: true, style: { color: 'red' } }, recoverExistingWalletLang))); } }]); @@ -136598,11 +136039,21 @@ exports.default = (0, _reactRedux.connect)(mapStateToProps, matchDispatchToProps "use strict"; +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + Object.defineProperty(exports, "__esModule", { value: true }); -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); +var _createClass = function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i];descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if ("value" in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor); + } + }return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps);if (staticProps) defineProperties(Constructor, staticProps);return Constructor; + }; +}(); var _react = __webpack_require__(20); @@ -136618,13 +136069,27 @@ var _translations = __webpack_require__(54); var _translations2 = _interopRequireDefault(_translations); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; +} -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } +function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + }return call && ((typeof call === "undefined" ? "undefined" : _typeof(call)) === "object" || typeof call === "function") ? call : self; +} -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + (typeof superClass === "undefined" ? "undefined" : _typeof(superClass))); + }subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; +} var RecoverWalletPage = function (_React$Component) { _inherits(RecoverWalletPage, _React$Component); @@ -136642,70 +136107,19 @@ var RecoverWalletPage = function (_React$Component) { var CUR_LANG = this.props.settings.language; - return _react2.default.createElement( - _reactOnsenui.Toolbar, - null, - _react2.default.createElement( - 'div', - { className: 'left' }, - _react2.default.createElement( - _reactOnsenui.BackButton, - { onClick: function onClick() { - return _this2.props.navigator.popPage(); - } }, - 'Back' - ) - ), - _react2.default.createElement( - 'div', - { className: 'center' }, - _translations2.default[CUR_LANG].AboutPage.title - ) - ); + return _react2.default.createElement(_reactOnsenui.Toolbar, null, _react2.default.createElement('div', { className: 'left' }, _react2.default.createElement(_reactOnsenui.BackButton, { onClick: function onClick() { + return _this2.props.navigator.popPage(); + } }, 'Back')), _react2.default.createElement('div', { className: 'center' }, _translations2.default[CUR_LANG].AboutPage.title)); } }, { key: 'render', value: function render() { - return _react2.default.createElement( - _reactOnsenui.Page, - { renderToolbar: this.renderToolbar.bind(this) }, - _react2.default.createElement( - 'div', - { style: { padding: '12px 12px 0 12px', textAlign: 'center' } }, - _react2.default.createElement( - 'p', - null, - 'ZEN Wallet v', - "0.0.4a" - ), - _react2.default.createElement('br', null), - _react2.default.createElement( - 'p', - null, - 'Author: Kendrick Tan' - ), - _react2.default.createElement( - 'p', - null, - 'Made for zensystem.io' - ), - _react2.default.createElement( - 'p', - null, - 'Found a bug? File it \xA0', - _react2.default.createElement( - 'a', - { - href: '#', - onClick: function onClick() { - return window.open('https://github.com/zencashofficial/zencash-mobile/issues', '_system'); - } - }, - 'here' - ) - ) - ) - ); + return _react2.default.createElement(_reactOnsenui.Page, { renderToolbar: this.renderToolbar.bind(this) }, _react2.default.createElement('div', { style: { padding: '12px 12px 0 12px', textAlign: 'center' } }, _react2.default.createElement('p', null, 'ZEN Wallet v', "0.0.4a"), _react2.default.createElement('br', null), _react2.default.createElement('p', null, 'Author: Kendrick Tan'), _react2.default.createElement('p', null, 'Made for zensystem.io'), _react2.default.createElement('p', null, 'Found a bug? File it \xA0', _react2.default.createElement('a', { + href: '#', + onClick: function onClick() { + return window.open('https://github.com/zencashofficial/zencash-mobile/issues', '_system'); + } + }, 'here')))); } }]); @@ -136727,11 +136141,21 @@ exports.default = (0, _reactRedux.connect)(mapStateToProps)(RecoverWalletPage); "use strict"; +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + Object.defineProperty(exports, "__esModule", { value: true }); -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); +var _createClass = function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i];descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if ("value" in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor); + } + }return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps);if (staticProps) defineProperties(Constructor, staticProps);return Constructor; + }; +}(); var _react = __webpack_require__(20); @@ -136747,13 +136171,27 @@ var _translations = __webpack_require__(54); var _translations2 = _interopRequireDefault(_translations); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; +} -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } +function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + }return call && ((typeof call === "undefined" ? "undefined" : _typeof(call)) === "object" || typeof call === "function") ? call : self; +} -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + (typeof superClass === "undefined" ? "undefined" : _typeof(superClass))); + }subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; +} var SecretPhrasePage = function (_React$Component) { _inherits(SecretPhrasePage, _React$Component); @@ -136779,48 +136217,19 @@ var SecretPhrasePage = function (_React$Component) { var CUR_LANG = this.props.settings.language; - return _react2.default.createElement( - _reactOnsenui.Toolbar, - null, - _react2.default.createElement( - 'div', - { className: 'left' }, - _react2.default.createElement( - _reactOnsenui.BackButton, - { onClick: function onClick() { - return _this2.props.navigator.popPage(); - } }, - 'Back' - ) - ), - _react2.default.createElement( - 'div', - { className: 'center' }, - _translations2.default[CUR_LANG].SecretPhrasePage.title - ) - ); + return _react2.default.createElement(_reactOnsenui.Toolbar, null, _react2.default.createElement('div', { className: 'left' }, _react2.default.createElement(_reactOnsenui.BackButton, { onClick: function onClick() { + return _this2.props.navigator.popPage(); + } }, 'Back')), _react2.default.createElement('div', { className: 'center' }, _translations2.default[CUR_LANG].SecretPhrasePage.title)); } }, { key: 'render', value: function render() { - return _react2.default.createElement( - _reactOnsenui.Page, - { renderToolbar: this.renderToolbar.bind(this) }, - _react2.default.createElement( - 'ons-row', - null, - _react2.default.createElement( - 'div', - { style: { padding: '12px 12px 0 12px', textAlign: 'center', width: '100%' } }, - _react2.default.createElement('textarea', { - style: { width: '100%' }, - className: 'textarea', rows: '3', - maxLength: 64, - value: this.props.secrets.secretPhrase - }) - ) - ) - ); + return _react2.default.createElement(_reactOnsenui.Page, { renderToolbar: this.renderToolbar.bind(this) }, _react2.default.createElement('ons-row', null, _react2.default.createElement('div', { style: { padding: '12px 12px 0 12px', textAlign: 'center', width: '100%' } }, _react2.default.createElement('textarea', { + style: { width: '100%' }, + className: 'textarea', rows: '3', + maxLength: 64, + value: this.props.secrets.secretPhrase + })))); } }]); @@ -136843,11 +136252,21 @@ exports.default = (0, _reactRedux.connect)(mapStateToProps)(SecretPhrasePage); "use strict"; +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + Object.defineProperty(exports, "__esModule", { value: true }); -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); +var _createClass = function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i];descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if ("value" in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor); + } + }return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps);if (staticProps) defineProperties(Constructor, staticProps);return Constructor; + }; +}(); var _react = __webpack_require__(20); @@ -136869,13 +136288,27 @@ var _translations = __webpack_require__(54); var _translations2 = _interopRequireDefault(_translations); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; +} -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } +function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + }return call && ((typeof call === "undefined" ? "undefined" : _typeof(call)) === "object" || typeof call === "function") ? call : self; +} -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + (typeof superClass === "undefined" ? "undefined" : _typeof(superClass))); + }subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; +} var RecoverWalletPage = function (_React$Component) { _inherits(RecoverWalletPage, _React$Component); @@ -136928,26 +136361,9 @@ var RecoverWalletPage = function (_React$Component) { var CUR_LANG = this.props.settings.language; - return _react2.default.createElement( - _reactOnsenui.Toolbar, - null, - _react2.default.createElement( - 'div', - { className: 'left' }, - _react2.default.createElement( - _reactOnsenui.BackButton, - { onClick: function onClick() { - return _this2.props.navigator.popPage(); - } }, - 'Back' - ) - ), - _react2.default.createElement( - 'div', - { className: 'center' }, - _translations2.default[CUR_LANG].RecoverExistingWalletPage.title - ) - ); + return _react2.default.createElement(_reactOnsenui.Toolbar, null, _react2.default.createElement('div', { className: 'left' }, _react2.default.createElement(_reactOnsenui.BackButton, { onClick: function onClick() { + return _this2.props.navigator.popPage(); + } }, 'Back')), _react2.default.createElement('div', { className: 'center' }, _translations2.default[CUR_LANG].RecoverExistingWalletPage.title)); } }, { key: 'render', @@ -136961,99 +136377,45 @@ var RecoverWalletPage = function (_React$Component) { var confirmUnderstandLang = _translations2.default[CUR_LANG].RecoverExistingWalletPage.confirmUnderstand; var recoverLang = _translations2.default[CUR_LANG].RecoverExistingWalletPage.recover; - return _react2.default.createElement( - _reactOnsenui.Page, - { renderToolbar: this.renderToolbar.bind(this) }, - _react2.default.createElement( - 'div', - { style: { padding: '12px 12px 0 12px' } }, - _react2.default.createElement( - 'p', - null, - secretPhraseLang, - ':', - _react2.default.createElement('br', null), - _react2.default.createElement('br', null), - _react2.default.createElement('textarea', { - style: { width: '100%' }, - value: this.state.tempSecretPhrase, - onChange: function onChange(e) { - var str = e.target.value; - - if (str.length > 64) { - str = str.slice(0, 64); - } + return _react2.default.createElement(_reactOnsenui.Page, { renderToolbar: this.renderToolbar.bind(this) }, _react2.default.createElement('div', { style: { padding: '12px 12px 0 12px' } }, _react2.default.createElement('p', null, secretPhraseLang, ':', _react2.default.createElement('br', null), _react2.default.createElement('br', null), _react2.default.createElement('textarea', { + style: { width: '100%' }, + value: this.state.tempSecretPhrase, + onChange: function onChange(e) { + var str = e.target.value; - _this3.setState({ tempSecretPhrase: e.target.value }); - }, - className: 'textarea', rows: '3', placeholder: textareaPlaceholderLang }) - ), - _react2.default.createElement( - 'p', - null, - _react2.default.createElement( - 'label', - { className: 'left' }, - _react2.default.createElement(_reactOnsenui.Checkbox, { - onChange: function onChange(e) { - _this3.setState({ - confirmRecover: !_this3.state.confirmRecover - }); - }, - inputId: 'understoodCheckbox' - }) - ), - _react2.default.createElement( - 'label', - { htmlFor: 'understoodCheckbox', className: 'center' }, - '\xA0', - confirmUnderstandLang - ) - ), - this.state.recovering ? _react2.default.createElement(_reactOnsenui.Icon, { icon: 'spinner', spin: true }) : _react2.default.createElement( - _reactOnsenui.Button, - { - onClick: function onClick() { - return _this3.newSecrets(); - }, - disabled: !this.state.confirmRecover || this.state.tempSecretPhrase.length < 16, - style: { width: '100%', textAlign: 'center' } - }, - recoverLang - ) - ), - _react2.default.createElement( - _reactOnsenui.Dialog, - { - isOpen: this.state.dialogOpen, - onCancel: function onCancel() { - _this3.setState({ dialogOpen: false }); - _this3.props.navigator.popPage(); - }, - cancelable: true }, - _react2.default.createElement( - 'p', - { style: { textAlign: 'center' } }, - 'Wallet recovered!' - ), - _react2.default.createElement( - 'p', - { style: { textAlign: 'center' } }, - _react2.default.createElement( - _reactOnsenui.Button, - { - style: { width: '90%' }, - disabled: !this.state.dialogOpen, - onClick: function onClick() { - _this3.setState({ dialogOpen: false }); - _this3.props.navigator.popPage(); - } - }, - 'Cool' - ) - ) - ) - ); + if (str.length > 64) { + str = str.slice(0, 64); + } + + _this3.setState({ tempSecretPhrase: e.target.value }); + }, + className: 'textarea', rows: '3', placeholder: textareaPlaceholderLang })), _react2.default.createElement('p', null, _react2.default.createElement('label', { className: 'left' }, _react2.default.createElement(_reactOnsenui.Checkbox, { + onChange: function onChange(e) { + _this3.setState({ + confirmRecover: !_this3.state.confirmRecover + }); + }, + inputId: 'understoodCheckbox' + })), _react2.default.createElement('label', { htmlFor: 'understoodCheckbox', className: 'center' }, '\xA0', confirmUnderstandLang)), this.state.recovering ? _react2.default.createElement(_reactOnsenui.Icon, { icon: 'spinner', spin: true }) : _react2.default.createElement(_reactOnsenui.Button, { + onClick: function onClick() { + return _this3.newSecrets(); + }, + disabled: !this.state.confirmRecover || this.state.tempSecretPhrase.length < 16, + style: { width: '100%', textAlign: 'center' } + }, recoverLang)), _react2.default.createElement(_reactOnsenui.Dialog, { + isOpen: this.state.dialogOpen, + onCancel: function onCancel() { + _this3.setState({ dialogOpen: false }); + _this3.props.navigator.popPage(); + }, + cancelable: true }, _react2.default.createElement('p', { style: { textAlign: 'center' } }, 'Wallet recovered!'), _react2.default.createElement('p', { style: { textAlign: 'center' } }, _react2.default.createElement(_reactOnsenui.Button, { + style: { width: '90%' }, + disabled: !this.state.dialogOpen, + onClick: function onClick() { + _this3.setState({ dialogOpen: false }); + _this3.props.navigator.popPage(); + } + }, 'Cool')))); } }]); @@ -137087,11 +136449,21 @@ exports.default = (0, _reactRedux.connect)(mapStateToProps, matchDispatchToProps "use strict"; +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + Object.defineProperty(exports, "__esModule", { value: true }); -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); +var _createClass = function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i];descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if ("value" in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor); + } + }return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps);if (staticProps) defineProperties(Constructor, staticProps);return Constructor; + }; +}(); var _react = __webpack_require__(20); @@ -137115,13 +136487,27 @@ var _translations = __webpack_require__(54); var _translations2 = _interopRequireDefault(_translations); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; +} -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } +function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + }return call && ((typeof call === "undefined" ? "undefined" : _typeof(call)) === "object" || typeof call === "function") ? call : self; +} -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + (typeof superClass === "undefined" ? "undefined" : _typeof(superClass))); + }subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; +} var ShowPrivateKeyPage = function (_React$Component) { _inherits(ShowPrivateKeyPage, _React$Component); @@ -137147,80 +136533,18 @@ var ShowPrivateKeyPage = function (_React$Component) { var CUR_LANG = this.props.settings.language; - return _react2.default.createElement( - _reactOnsenui.Toolbar, - null, - _react2.default.createElement( - 'div', - { className: 'left' }, - _react2.default.createElement( - _reactOnsenui.BackButton, - { onClick: function onClick() { - return _this2.props.navigator.popPage(); - } }, - 'Back' - ) - ), - _react2.default.createElement( - 'div', - { className: 'center' }, - _translations2.default[CUR_LANG].ShowPrivateKeyPage.title - ) - ); + return _react2.default.createElement(_reactOnsenui.Toolbar, null, _react2.default.createElement('div', { className: 'left' }, _react2.default.createElement(_reactOnsenui.BackButton, { onClick: function onClick() { + return _this2.props.navigator.popPage(); + } }, 'Back')), _react2.default.createElement('div', { className: 'center' }, _translations2.default[CUR_LANG].ShowPrivateKeyPage.title)); } }, { key: 'render', value: function render() { var CUR_LANG = this.props.settings.language; - return _react2.default.createElement( - _reactOnsenui.Page, - { renderToolbar: this.renderToolbar.bind(this) }, - _react2.default.createElement('hr', null), - this.props.secrets.items.map(function (i) { - return _react2.default.createElement( - 'div', - null, - _react2.default.createElement( - 'ons-row', - { style: { textAlign: 'center' } }, - _react2.default.createElement( - 'ons-col', - null, - _react2.default.createElement( - 'p', - null, - _translations2.default[CUR_LANG].General.privateKey, - _react2.default.createElement('br', null), - _react2.default.createElement(_qrcode2.default, { value: i.privateKey }) - ), - _react2.default.createElement( - 'p', - { style: { fontSize: '12px' } }, - _react2.default.createElement('textarea', { disabled: true, value: i.privateKey }) - ) - ), - _react2.default.createElement( - 'ons-col', - null, - _react2.default.createElement( - 'p', - null, - _translations2.default[CUR_LANG].General.address, - _react2.default.createElement('br', null), - _react2.default.createElement(_qrcode2.default, { value: i.address }) - ), - _react2.default.createElement( - 'p', - { style: { fontSize: '12px' } }, - _react2.default.createElement('textarea', { disabled: true, value: i.address }) - ) - ) - ), - _react2.default.createElement('hr', null) - ); - }) - ); + return _react2.default.createElement(_reactOnsenui.Page, { renderToolbar: this.renderToolbar.bind(this) }, _react2.default.createElement('hr', null), this.props.secrets.items.map(function (i) { + return _react2.default.createElement('div', null, _react2.default.createElement('ons-row', { style: { textAlign: 'center' } }, _react2.default.createElement('ons-col', null, _react2.default.createElement('p', null, _translations2.default[CUR_LANG].General.privateKey, _react2.default.createElement('br', null), _react2.default.createElement(_qrcode2.default, { value: i.privateKey })), _react2.default.createElement('p', { style: { fontSize: '12px' } }, _react2.default.createElement('textarea', { disabled: true, value: i.privateKey }))), _react2.default.createElement('ons-col', null, _react2.default.createElement('p', null, _translations2.default[CUR_LANG].General.address, _react2.default.createElement('br', null), _react2.default.createElement(_qrcode2.default, { value: i.address })), _react2.default.createElement('p', { style: { fontSize: '12px' } }, _react2.default.createElement('textarea', { disabled: true, value: i.address })))), _react2.default.createElement('hr', null)); + })); } }]); @@ -137243,11 +136567,21 @@ exports.default = (0, _reactRedux.connect)(mapStateToProps)(ShowPrivateKeyPage); "use strict"; +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + Object.defineProperty(exports, "__esModule", { value: true }); -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); +var _createClass = function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i];descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if ("value" in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor); + } + }return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps);if (staticProps) defineProperties(Constructor, staticProps);return Constructor; + }; +}(); var _react = __webpack_require__(20); @@ -137265,13 +136599,27 @@ var _translations = __webpack_require__(54); var _translations2 = _interopRequireDefault(_translations); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; +} -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } +function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + }return call && ((typeof call === "undefined" ? "undefined" : _typeof(call)) === "object" || typeof call === "function") ? call : self; +} -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + (typeof superClass === "undefined" ? "undefined" : _typeof(superClass))); + }subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; +} var SelectCurrencyPage = function (_React$Component) { _inherits(SelectCurrencyPage, _React$Component); @@ -137291,58 +136639,22 @@ var SelectCurrencyPage = function (_React$Component) { var currentLang = _translations2.default[CUR_LANG].SettingsPage.current; var currencyLang = _translations2.default[CUR_LANG].SettingsPage.currency; - return _react2.default.createElement( - _reactOnsenui.Toolbar, - null, - _react2.default.createElement( - 'div', - { className: 'left' }, - _react2.default.createElement( - _reactOnsenui.BackButton, - { onClick: function onClick() { - return _this2.props.navigator.popPage(); - } }, - 'Back' - ) - ), - _react2.default.createElement( - 'div', - { className: 'center' }, - currencyLang, - ' (', - this.props.settings.currency, - ')' - ) - ); + return _react2.default.createElement(_reactOnsenui.Toolbar, null, _react2.default.createElement('div', { className: 'left' }, _react2.default.createElement(_reactOnsenui.BackButton, { onClick: function onClick() { + return _this2.props.navigator.popPage(); + } }, 'Back')), _react2.default.createElement('div', { className: 'center' }, currencyLang, ' (', this.props.settings.currency, ')')); } }, { key: 'render', value: function render() { - return _react2.default.createElement( - _reactOnsenui.Page, - { renderToolbar: this.renderToolbar.bind(this) }, - _react2.default.createElement( - _reactOnsenui.List, - null, - _Settings.CURRENCIES.map(function (l) { - return _react2.default.createElement( - 'div', - null, - _react2.default.createElement( - _reactOnsenui.ListItem, - { - onClick: function () { - this.props.setCurrency(l); - this.props.navigator.popPage(); - }.bind(this), - tappable: true - }, - l - ) - ); - }.bind(this)) - ) - ); + return _react2.default.createElement(_reactOnsenui.Page, { renderToolbar: this.renderToolbar.bind(this) }, _react2.default.createElement(_reactOnsenui.List, null, _Settings.CURRENCIES.map(function (l) { + return _react2.default.createElement('div', null, _react2.default.createElement(_reactOnsenui.ListItem, { + onClick: function () { + this.props.setCurrency(l); + this.props.navigator.popPage(); + }.bind(this), + tappable: true + }, l)); + }.bind(this)))); } }]); @@ -137371,11 +136683,21 @@ exports.default = (0, _reactRedux.connect)(mapStateToProps, matchDispatchToProps "use strict"; +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + Object.defineProperty(exports, "__esModule", { value: true }); -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); +var _createClass = function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i];descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if ("value" in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor); + } + }return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps);if (staticProps) defineProperties(Constructor, staticProps);return Constructor; + }; +}(); var _react = __webpack_require__(20); @@ -137393,13 +136715,27 @@ var _translations = __webpack_require__(54); var _translations2 = _interopRequireDefault(_translations); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; +} -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } +function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + }return call && ((typeof call === "undefined" ? "undefined" : _typeof(call)) === "object" || typeof call === "function") ? call : self; +} -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + (typeof superClass === "undefined" ? "undefined" : _typeof(superClass))); + }subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; +} var SelectLanguagePage = function (_React$Component) { _inherits(SelectLanguagePage, _React$Component); @@ -137418,58 +136754,22 @@ var SelectLanguagePage = function (_React$Component) { var CUR_LANG = this.props.settings.language; var languageLang = _translations2.default[CUR_LANG].SettingsPage.language; - return _react2.default.createElement( - _reactOnsenui.Toolbar, - null, - _react2.default.createElement( - 'div', - { className: 'left' }, - _react2.default.createElement( - _reactOnsenui.BackButton, - { onClick: function onClick() { - return _this2.props.navigator.popPage(); - } }, - 'Back' - ) - ), - _react2.default.createElement( - 'div', - { className: 'center' }, - languageLang, - ' (', - this.props.settings.language, - ')' - ) - ); + return _react2.default.createElement(_reactOnsenui.Toolbar, null, _react2.default.createElement('div', { className: 'left' }, _react2.default.createElement(_reactOnsenui.BackButton, { onClick: function onClick() { + return _this2.props.navigator.popPage(); + } }, 'Back')), _react2.default.createElement('div', { className: 'center' }, languageLang, ' (', this.props.settings.language, ')')); } }, { key: 'render', value: function render() { - return _react2.default.createElement( - _reactOnsenui.Page, - { renderToolbar: this.renderToolbar.bind(this) }, - _react2.default.createElement( - _reactOnsenui.List, - null, - _Settings.LANGUAGES.map(function (l) { - return _react2.default.createElement( - 'div', - null, - _react2.default.createElement( - _reactOnsenui.ListItem, - { - onClick: function () { - this.props.setLanguage(l); - this.props.navigator.popPage(); - }.bind(this), - tappable: true - }, - l - ) - ); - }.bind(this)) - ) - ); + return _react2.default.createElement(_reactOnsenui.Page, { renderToolbar: this.renderToolbar.bind(this) }, _react2.default.createElement(_reactOnsenui.List, null, _Settings.LANGUAGES.map(function (l) { + return _react2.default.createElement('div', null, _react2.default.createElement(_reactOnsenui.ListItem, { + onClick: function () { + this.props.setLanguage(l); + this.props.navigator.popPage(); + }.bind(this), + tappable: true + }, l)); + }.bind(this)))); } }]); @@ -137498,11 +136798,21 @@ exports.default = (0, _reactRedux.connect)(mapStateToProps, matchDispatchToProps "use strict"; +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + Object.defineProperty(exports, "__esModule", { value: true }); -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); +var _createClass = function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i];descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if ("value" in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor); + } + }return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps);if (staticProps) defineProperties(Constructor, staticProps);return Constructor; + }; +}(); var _react = __webpack_require__(20); @@ -137522,13 +136832,27 @@ var _chance = __webpack_require__(945); var _chance2 = _interopRequireDefault(_chance); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; +} -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } +function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + }return call && ((typeof call === "undefined" ? "undefined" : _typeof(call)) === "object" || typeof call === "function") ? call : self; +} -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + (typeof superClass === "undefined" ? "undefined" : _typeof(superClass))); + }subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; +} var SetupPage = function (_React$Component) { _inherits(SetupPage, _React$Component); @@ -137579,62 +136903,32 @@ var SetupPage = function (_React$Component) { }, { key: 'renderToolbar', value: function renderToolbar() { - return _react2.default.createElement( - _reactOnsenui.Toolbar, - null, - _react2.default.createElement( - 'div', - { className: 'center' }, - 'ZEN Wallet Setup' - ) - ); + return _react2.default.createElement(_reactOnsenui.Toolbar, null, _react2.default.createElement('div', { className: 'center' }, 'ZEN Wallet Setup')); } }, { key: 'render', value: function render() { var _this2 = this; - return _react2.default.createElement( - _reactOnsenui.Page, - { renderToolbar: this.renderToolbar.bind(this) }, - _react2.default.createElement( - 'div', - { style: { padding: '12px 12px 0 12px' } }, - _react2.default.createElement( - 'p', - null, - _react2.default.createElement('textarea', { - style: { width: '100%' }, - onChange: function onChange(e) { - return _this2.setState({ tempSecretPhrase: e.target.value }); - }, - className: 'textarea', rows: '3', placeholder: 'secret phrase', - maxLength: 64 - }) - ), - _react2.default.createElement( - _reactOnsenui.Button, - { - onClick: function onClick() { - return _this2.handleLoadWallet(_this2.state.tempSecretPhrase); - }, - disabled: this.state.tempSecretPhrase.length < 16, - style: { width: '100%' } - }, - 'Recover Wallet' - ), - _react2.default.createElement( - _reactOnsenui.Button, - { - onClick: function onClick() { - return _this2.handleNewWallet(); - }, - style: { width: '100%', marginTop: '100%' } - }, - 'New Wallet' - ) - ) - ); + return _react2.default.createElement(_reactOnsenui.Page, { renderToolbar: this.renderToolbar.bind(this) }, _react2.default.createElement('div', { style: { padding: '12px 12px 0 12px' } }, _react2.default.createElement('p', null, _react2.default.createElement('textarea', { + style: { width: '100%' }, + onChange: function onChange(e) { + return _this2.setState({ tempSecretPhrase: e.target.value }); + }, + className: 'textarea', rows: '3', placeholder: 'secret phrase', + maxLength: 64 + })), _react2.default.createElement(_reactOnsenui.Button, { + onClick: function onClick() { + return _this2.handleLoadWallet(_this2.state.tempSecretPhrase); + }, + disabled: this.state.tempSecretPhrase.length < 16, + style: { width: '100%' } + }, 'Recover Wallet'), _react2.default.createElement(_reactOnsenui.Button, { + onClick: function onClick() { + return _this2.handleNewWallet(); + }, + style: { width: '100%', marginTop: '100%' } + }, 'New Wallet'))); } }]); @@ -145258,8 +144552,8 @@ if(content.locals) module.exports = content.locals; if(false) { // When the styles change, update the