From a2060bb7f3f4cb727dee475475dc99c8a0b5bb56 Mon Sep 17 00:00:00 2001 From: Sebastian Klingler Date: Sat, 12 May 2018 21:42:44 -0500 Subject: [PATCH 1/2] Catch web3 initialization errors properly --- dist/drizzle.js | 227 ++++++++++++------------- src/drizzleStatus/drizzleStatusSaga.js | 5 + src/web3/web3Saga.js | 71 ++++---- 3 files changed, 146 insertions(+), 157 deletions(-) diff --git a/dist/drizzle.js b/dist/drizzle.js index f835786d..40381d8d 100644 --- a/dist/drizzle.js +++ b/dist/drizzle.js @@ -2292,10 +2292,9 @@ var _effects = __webpack_require__(5); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var _marked = /*#__PURE__*/_regenerator2.default.mark(initializeWeb3), - _marked2 = /*#__PURE__*/_regenerator2.default.mark(callInitializeWeb3), - _marked3 = /*#__PURE__*/_regenerator2.default.mark(getNetworkId), - _marked4 = /*#__PURE__*/_regenerator2.default.mark(callSendTx), - _marked5 = /*#__PURE__*/_regenerator2.default.mark(web3Saga); + _marked2 = /*#__PURE__*/_regenerator2.default.mark(getNetworkId), + _marked3 = /*#__PURE__*/_regenerator2.default.mark(callSendTx), + _marked4 = /*#__PURE__*/_regenerator2.default.mark(web3Saga); var Web3 = __webpack_require__(128); @@ -2310,12 +2309,13 @@ function initializeWeb3(_ref) { while (1) { switch (_context.prev = _context.next) { case 0: + _context.prev = 0; web3 = {}; // Checking if Web3 has been injected by the browser (Mist/MetaMask) if (!(typeof window.web3 !== 'undefined')) { - _context.next = 10; + _context.next = 11; break; } @@ -2327,15 +2327,15 @@ function initializeWeb3(_ref) { console.log('Injected web3 detected.'); - _context.next = 7; + _context.next = 8; return (0, _effects.put)({ type: 'WEB3_INITIALIZED' }); - case 7: + case 8: return _context.abrupt('return', web3); - case 10: + case 11: if (!options.fallback) { - _context.next = 23; + _context.next = 24; break; } @@ -2343,10 +2343,10 @@ function initializeWeb3(_ref) { console.log('No web3 instance injected, using fallback.'); _context.t0 = options.fallback.type; - _context.next = _context.t0 === 'ws' ? 15 : 22; + _context.next = _context.t0 === 'ws' ? 16 : 23; break; - case 15: + case 16: provider = new Web3.providers.WebsocketProvider(options.fallback.url); web3 = new Web3(provider); @@ -2356,54 +2356,38 @@ function initializeWeb3(_ref) { return (0, _effects.put)({ type: 'SEND_WEB3_TX', txObject: txObject, stackId: stackId, web3: web3 }); }; - _context.next = 20; + _context.next = 21; return (0, _effects.put)({ type: 'WEB3_INITIALIZED' }); - case 20: + case 21: return _context.abrupt('return', web3); - case 22: - throw "Invalid web3 fallback provided."; - case 23: - throw "Cannot find injected web3 or valid fallback."; + throw "Invalid web3 fallback provided."; case 24: - case 'end': - return _context.stop(); - } - } - }, _marked, this); -} - -function callInitializeWeb3(action) { - var web3; - return _regenerator2.default.wrap(function callInitializeWeb3$(_context2) { - while (1) { - switch (_context2.prev = _context2.next) { - case 0: - _context2.prev = 0; - _context2.next = 3; - return (0, _effects.call)(initializeWeb3, { options: action.options }); + throw "Cannot find injected web3 or valid fallback."; - case 3: - web3 = _context2.sent; - return _context2.abrupt('return', web3); + case 25: + _context.next = 33; + break; - case 7: - _context2.prev = 7; - _context2.t0 = _context2['catch'](0); + case 27: + _context.prev = 27; + _context.t1 = _context['catch'](0); + _context.next = 31; + return (0, _effects.put)({ type: 'WEB3_FAILED', error: _context.t1 }); - store.dispatch({ type: 'WEB3_FAILED', error: _context2.t0 }); + case 31: console.error('Error intializing web3:'); - console.error(_context2.t0); + console.error(_context.t1); - case 12: + case 33: case 'end': - return _context2.stop(); + return _context.stop(); } } - }, _marked2, this, [[0, 7]]); + }, _marked, this, [[0, 27]]); } /* @@ -2413,41 +2397,41 @@ function callInitializeWeb3(action) { function getNetworkId(_ref2) { var web3 = _ref2.web3; var networkId; - return _regenerator2.default.wrap(function getNetworkId$(_context3) { + return _regenerator2.default.wrap(function getNetworkId$(_context2) { while (1) { - switch (_context3.prev = _context3.next) { + switch (_context2.prev = _context2.next) { case 0: - _context3.prev = 0; - _context3.next = 3; + _context2.prev = 0; + _context2.next = 3; return (0, _effects.call)(web3.eth.net.getId); case 3: - networkId = _context3.sent; - _context3.next = 6; + networkId = _context2.sent; + _context2.next = 6; return (0, _effects.put)({ type: 'NETWORK_ID_FETCHED', networkId: networkId }); case 6: - return _context3.abrupt('return', networkId); + return _context2.abrupt('return', networkId); case 9: - _context3.prev = 9; - _context3.t0 = _context3['catch'](0); - _context3.next = 13; - return (0, _effects.put)({ type: 'NETWORK_ID_FAILED', error: _context3.t0 }); + _context2.prev = 9; + _context2.t0 = _context2['catch'](0); + _context2.next = 13; + return (0, _effects.put)({ type: 'NETWORK_ID_FAILED', error: _context2.t0 }); case 13: console.error('Error fetching network ID:'); - console.error(_context3.t0); + console.error(_context2.t0); - return _context3.abrupt('return'); + return _context2.abrupt('return'); case 16: case 'end': - return _context3.stop(); + return _context2.stop(); } } - }, _marked3, this, [[0, 9]]); + }, _marked2, this, [[0, 9]]); } /* @@ -2489,71 +2473,67 @@ function callSendTx(_ref4) { stackId = _ref4.stackId, web3 = _ref4.web3; var txChannel, event; - return _regenerator2.default.wrap(function callSendTx$(_context4) { + return _regenerator2.default.wrap(function callSendTx$(_context3) { while (1) { - switch (_context4.prev = _context4.next) { + switch (_context3.prev = _context3.next) { case 0: - _context4.next = 2; + _context3.next = 2; return (0, _effects.call)(createTxChannel, { txObject: txObject, stackId: stackId, web3: web3 }); case 2: - txChannel = _context4.sent; - _context4.prev = 3; + txChannel = _context3.sent; + _context3.prev = 3; case 4: if (false) { - _context4.next = 12; + _context3.next = 12; break; } - _context4.next = 7; + _context3.next = 7; return take(txChannel); case 7: - event = _context4.sent; - _context4.next = 10; + event = _context3.sent; + _context3.next = 10; return (0, _effects.put)(event); case 10: - _context4.next = 4; + _context3.next = 4; break; case 12: - _context4.prev = 12; + _context3.prev = 12; txChannel.close(); - return _context4.finish(12); + return _context3.finish(12); case 15: case 'end': - return _context4.stop(); + return _context3.stop(); } } - }, _marked4, this, [[3,, 12, 15]]); + }, _marked3, this, [[3,, 12, 15]]); } function web3Saga() { - return _regenerator2.default.wrap(function web3Saga$(_context5) { + return _regenerator2.default.wrap(function web3Saga$(_context4) { while (1) { - switch (_context5.prev = _context5.next) { + switch (_context4.prev = _context4.next) { case 0: - _context5.next = 2; - return (0, _effects.takeLatest)('WEB3_INITIALIZING', callInitializeWeb3); - - case 2: - _context5.next = 4; + _context4.next = 2; return (0, _effects.takeLatest)('NETWORK_ID_FETCHING', getNetworkId); - case 4: - _context5.next = 6; + case 2: + _context4.next = 4; return (0, _effects.takeEvery)('SEND_WEB3_TX', callSendTx); - case 6: + case 4: case 'end': - return _context5.stop(); + return _context4.stop(); } } - }, _marked5, this); + }, _marked4, this); } exports.default = web3Saga; @@ -3606,25 +3586,34 @@ function initializeDrizzle(action) { case 5: web3 = _context.sent; - action.drizzle.web3 = web3; + if (web3) { + _context.next = 8; + break; + } - _context.next = 9; - return (0, _effects.call)(_web3Saga.getNetworkId, { web3: web3 }); + throw "Web3 could not be initialized"; + + case 8: + + action.drizzle.web3 = web3; - case 9: _context.next = 11; - return (0, _effects.call)(_accountsSaga.getAccounts, { web3: web3 }); + return (0, _effects.call)(_web3Saga.getNetworkId, { web3: web3 }); case 11: _context.next = 13; - return (0, _effects.call)(_accountBalancesSaga.getAccountBalances, { web3: web3 }); + return (0, _effects.call)(_accountsSaga.getAccounts, { web3: web3 }); case 13: + _context.next = 15; + return (0, _effects.call)(_accountBalancesSaga.getAccountBalances, { web3: web3 }); + + case 15: i = 0; - case 14: + case 16: if (!(i < options.contracts.length)) { - _context.next = 24; + _context.next = 26; break; } @@ -3636,18 +3625,18 @@ function initializeDrizzle(action) { events = options.events[contractArtifact.contractName]; } - _context.next = 20; + _context.next = 22; return (0, _effects.call)(_contractsSaga.instantiateContract, { contractArtifact: contractArtifact, events: events, store: action.drizzle.store, web3: web3 }); - case 20: + case 22: action.drizzle.contracts[contractArtifact.contractName] = _context.sent; - case 21: + case 23: i++; - _context.next = 14; + _context.next = 16; break; - case 24: + case 26: // Collect contract addresses in an array for later comparison in txs. contractAddresses = []; @@ -3660,62 +3649,62 @@ function initializeDrizzle(action) { } if (!web3.currentProvider.isMetaMask) { - _context.next = 33; + _context.next = 35; break; } // Using MetaMask, attempt block polling. interval = options.polls.blocks; - _context.next = 31; + _context.next = 33; return (0, _effects.put)({ type: 'BLOCKS_POLLING', contracts: action.drizzle.contracts, interval: interval, contractAddresses: contractAddresses, contractNames: contractNames, web3: web3 }); - case 31: - _context.next = 35; + case 33: + _context.next = 37; break; - case 33: - _context.next = 35; + case 35: + _context.next = 37; return (0, _effects.put)({ type: 'BLOCKS_LISTENING', contracts: action.drizzle.contracts, contractAddresses: contractAddresses, contractNames: contractNames, web3: web3 }); - case 35: + case 37: if (!('accounts' in options.polls)) { - _context.next = 38; + _context.next = 40; break; } - _context.next = 38; + _context.next = 40; return (0, _effects.put)({ type: 'ACCOUNTS_POLLING', interval: options.polls.accounts, web3: web3 }); - case 38: - _context.next = 47; + case 40: + _context.next = 49; break; - case 40: - _context.prev = 40; + case 42: + _context.prev = 42; _context.t0 = _context['catch'](0); - _context.next = 44; + _context.next = 46; return (0, _effects.put)({ type: 'DRIZZLE_FAILED', error: _context.t0 }); - case 44: + case 46: console.error('Error initializing Drizzle:'); console.error(_context.t0); return _context.abrupt('return'); - case 47: - _context.next = 49; + case 49: + _context.next = 51; return (0, _effects.put)({ type: 'DRIZZLE_INITIALIZED' }); - case 49: + case 51: return _context.abrupt('return'); - case 50: + case 52: case 'end': return _context.stop(); } } - }, _marked, this, [[0, 40]]); + }, _marked, this, [[0, 42]]); } function drizzleStatusSaga() { @@ -6757,4 +6746,4 @@ module.exports = generateContractsInitialState; /***/ }) /******/ ]); }); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay91bml2ZXJzYWxNb2R1bGVEZWZpbml0aW9uIiwid2VicGFjazovLy93ZWJwYWNrL2Jvb3RzdHJhcC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XRlXHJcbn1cclxuXHJcbmV4cG9ydCBkZWZhdWx0IGRyaXp6bGVTdGF0dXNSZWR1Y2VyXHJcblxuXG5cbi8vIFdFQlBBQ0sgRk9PVEVSIC8vXG4vLyAuL3NyYy9kcml6emxlU3RhdHVzL2RyaXp6bGVTdGF0dXNSZWR1Y2VyLmpzIiwiY29uc3QgaW5pdGlhbFN0YXRlID0ge31cclxuICBcclxuY29uc3QgdHJhbnNhY3Rpb25zUmVkdWNlciA9IChzdGF0ZSA9IGluaXRpYWxTdGF0ZSwgYWN0aW9uKSA9PiB7XHJcbiAgICBpZiAoYWN0aW9uLnR5cGUgPT09ICdUWF9CUk9BRENBU1RFRCcpXHJcbiAgICB7XHJcbiAgICAgICAgcmV0dXJuIHtcclxuICAgICAgICAgICAgLi4uc3RhdGUsXHJcbiAgICAgICAgICAgIFthY3Rpb24udHhIYXNoXToge1xyXG4gICAgICAgICAgICAgICAgc3RhdHVzOiAncGVuZGluZycsXHJcbiAgICAgICAgICAgICAgICBjb25maXJtYXRpb25zOiBbXVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIGlmIChhY3Rpb24udHlwZSA9PT0gJ1RYX0NPTkZJUk1BSVRPTicpXHJcbiAgICB7XHJcbiAgICAgICAgcmV0dXJuIHtcclxuICAgICAgICAgICAgLi4uc3RhdGUsXHJcbiAgICAgICAgICAgIFthY3Rpb24udHhIYXNoXToge1xyXG4gICAgICAgICAgICAgICAgLi4uc3RhdGVbYWN0aW9uLnR4SGFzaF0sXHJcbiAgICAgICAgICAgICAgICBjb25maXJtYXRpb25zOiBbXHJcbiAgICAgICAgICAgICAgICAgICAgLi4uc3RhdGVbYWN0aW9uLnR4SGFzaF0uY29uZmlybWF0aW9ucyxcclxuICAgICAgICAgICAgICAgICAgICBhY3Rpb24uY29uZmlybWF0aW9uUmVjZWlwdFxyXG4gICAgICAgICAgICAgICAgXVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIGlmIChhY3Rpb24udHlwZSA9PT0gJ1RYX1NVQ0NFU1NGVUwnKVxyXG4gICAge1xyXG4gICAgICAgIHJldHVybiB7XHJcbiAgICAgICAgICAgIC4uLnN0YXRlLFxyXG4gICAgICAgICAgICBbYWN0aW9uLnR4SGFzaF06IHtcclxuICAgICAgICAgICAgICAgIC4uLnN0YXRlW2FjdGlvbi50eEhhc2hdLFxyXG4gICAgICAgICAgICAgICAgc3RhdHVzOiAnc3VjY2VzcycsXHJcbiAgICAgICAgICAgICAgICByZWNlaXB0OiBhY3Rpb24ucmVjZWlwdFxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuXHJcbiAgICBpZiAoYWN0aW9uLnR5cGUgPT09ICdUWF9FUlJPUicpXHJcbiAgICB7XHJcbiAgICAgICAgcmV0dXJuIHtcclxuICAgICAgICAgICAgLi4uc3RhdGUsXHJcbiAgICAgICAgICAgIFthY3Rpb24udHhIYXNoXToge1xyXG4gICAgICAgICAgICAgICAgLi4uc3RhdGVbYWN0aW9uLnR4SGFzaF0sXHJcbiAgICAgICAgICAgICAgICBzdGF0dXM6ICdlcnJvcicsXHJcbiAgICAgICAgICAgICAgICBlcnJvcjogYWN0aW9uLmVycm9yXHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgcmV0dXJuIHN0YXRlXHJcbn1cclxuXHJcbmV4cG9ydCBkZWZhdWx0IHRyYW5zYWN0aW9uc1JlZHVjZXJcclxuXG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIC4vc3JjL3RyYW5zYWN0aW9ucy90cmFuc2FjdGlvbnNSZWR1Y2VyLmpzIiwiY29uc3QgaW5pdGlhbFN0YXRlID0gW11cclxuICBcclxuY29uc3QgdHJhbnNhY3Rpb25TdGFja1JlZHVjZXIgPSAoc3RhdGUgPSBpbml0aWFsU3RhdGUsIGFj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PT0gXCJ0aHJvd1wiKSB7XG4gICAgICAgICAgaWYgKHN0YXRlID09PSBHZW5TdGF0ZVN1c3BlbmRlZFN0YXJ0KSB7XG4gICAgICAgICAgICBzdGF0ZSA9IEdlblN0YXRlQ29tcGxldGVkO1xuICAgICAgICAgICAgdGhyb3cgY29udGV4dC5hcmc7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgY29udGV4dC5kaXNwYXRjaEV4Y2VwdGlvbihjb250ZXh0LmFyZyk7XG5cbiAgICAgICAgfSBlbHNlIGlmIChjb250ZXh0Lm1ldGhvZCA9PT0gXCJyZXR1cm5cIikge1xuICAgICAgICAgIGNvbnRleHQuYWJydXB0KFwicmV0dXJuXCIsIGNvbnRleHQuYXJnKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHN0YXRlID0gR2VuU3RhdGVFeGVjdXRpbmc7XG5cbiAgICAgICAgdmFyIHJlY29yZCA9IHRyeUNhdGNoKGlubmVyRm4sIHNlbGYsIGNvbnRleHQpO1xuICAgICAgICBpZiAocmVjb3JkLnR5cGUgPT09IFwibm9ybWFsXCIpIHtcbiAgICAgICAgICAvLyBJZiBhbiBleGNlcHRpb24gaXMgdGhyb3duIGZyb20gaW5uZXJGbiwgd2UgbGVhdmUgc3RhdGUgPT09XG4gICAgICAgICAgLy8gR2VuU3RhdGVFeGVjdXRpbmcgYW5kIGxvb3AgYmFjayBmb3IgYW5vdGhlciBpbnZvY2F0aW9uLlxuICAgICAgICAgIHN0YXRlID0gY29udGV4dC5kb25lXG4gICAgICAgICAgICA/IEdlblN0YXRlQ29tcGxldGVkXG4gICAgICAgICAgICA6IEdlblN0YXRlU3VzcGVuZGVkWWllbGQ7XG5cbiAgICAgICAgICBpZiAocmVjb3JkLmFyZyA9PT0gQ29udGludWVTZW50aW5lbCkge1xuICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIHZhbHVlOiByZWNvcmQuYXJn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ge1xuICAgICAgICAgICAgICByZXR1cm4gaGFuZGxlKGVudHJ5LmNhdGNoTG9jLCB0cnVlKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgIH0gZWxzZSBpZiAoaGFzRmluYWxseSkge1xuICAgICAgICAgICAgaWYgKHRoaXMucHJldiA8IGVudHJ5LmZpbmFsbHlMb2MpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZShlbnRyeS5maW5hbGx5TG9jKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXCJ0cnkgc3RhdGVtZW50IHdpdGhvdXQgY2F0Y2ggb3IgZmluYWxseVwiKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9LFxuXG4gICAgYWJydXB0OiBmdW5jdGlvbih0eXBlLCBhcmcpIHtcbiAgICAgIGZvciAodmFyIGkgPSB0aGlzLnRyeUVudHJpZXMubGVuZ3RoIC0gMTsgaSA+PSAwOyAtLWkpIHtcbiAgICAgICAgdmFyIGVudHJ5ID0gdGhpcy50cnlFbnRyaWVzW2ldO1xuICAgICAgICBpZiAoZW50cnkudHJ5TG9jIDw9IHRoaXMucHJldiAmJlxuICAgICAgICAgICAgaGFzT3duLmNhbGwoZW50cnksIFwiZmluYWxseUxvY1wiKSAmJlxuICAgICAgICAgICAgdGhpcy5wcmV2IDwgZW50cnkuZmluYWxseUxvYykge1xuICAgICAgICAgIHZhciBmaW5hbGx5RW50cnkgPSBlbnRyeTtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICBpZiAoZmluYWxseUVudHJ5ICYmXG4gICAgICAgICAgKHR5cGUgPT09IFwiYnJlYWtcIiB8fFxuICAgICAgICAgICB0eXBlID09PSBcImNvbnRpbnVlXCIpICYmXG4gICAgICAgICAgZmluYWxseUVudHJ5LnRyeUxvYyA8PSBhcmcgJiZcbiAg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cmQuYXJnO1xuICAgICAgICB0aGlzLm1ldGhvZCA9IFwicmV0dXJuXCI7XG4gICAgICAgIHRoaXMubmV4dCA9IFwiZW5kXCI7XG4gICAgICB9IGVsc2UgaWYgKHJlY29yZC50eXBlID09PSBcIm5vcm1hbFwiICYmIGFmdGVyTG9jKSB7XG4gICAgICAgIHRoaXMubmV4dCA9IGFmdGVyTG9jO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gQ29udGludWVTZW50aW5lbDtcbiAgICB9LFxuXG4gICAgZmluaXNoOiBmdW5jdGlvbihmaW5hbGx5TG9jKSB7XG4gICAgICBmb3IgKHZhciBpID0gdGhpcy50cnlFbnRyaWVzLmxlbmd0aCAtIDE7IGkgPj0gMDsgLS1pKSB7XG4gICAgICAgIHZhciBlbnRyeSA9IHRoaXMudHJ5RW50cmllc1tpXTtcbiAgICAgICAgaWYgKGVudHJ5LmZpbmFsbHlMb2MgPT09IGZpbmFsbHlMb2MpIHtcbiAgICAgICAgICB0aGlzLmNvbXBsZXRlKGVudHJ5LmNvbXBsZXRpb24sIGVudHJ5LmFmdGVyTG9jKTtcbiAgICAgICAgICByZXNldFRyeUVudHJ5KGVudHJ5KTtcbiAgICAgICAgICByZXR1cm4gQ29udGludWVTZW50aW5lbDtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH0sXG5cbiAgICBcImNhdGNoXCI6IGZ1bmN0aW9uKHRyeUxvYykge1xuICAgICAgZm9yICh2YXIgaSA9IHRoaXMudHJ5RW50cmllcy5sZW5ndGggLSAxOyBpID49IDA7IC0taSkge1xuICAgICAgICB2YXIgZW50cnkgPSB0aGlzLnRyeUVudHJpZXNbaV07XG4gICAgICAgIGlmIChlbnRyeS50cnlMb2MgPT09IHRyeUxvYykge1xuICAgICAgICAgIHZhciByZWNvcmQgPSBlbnRyeS5jb21wbGV0aW9uO1xuICAgICAgICAgIGlmIChyZWNvcmQudHlwZSA9PT0gXCJ0aHJvd1wiKSB7XG4gICAgICAgICAgICB2YXIgd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Bpbml0aWFsU3RhdGUsIGFjdGlvbikgPT4ge1xuICAvKlxuICAgKiBEcml6emxlIFN0YXR1c1xuICAgKi9cblxuICBpZiAoYWN0aW9uLnR5cGUgPT09ICdEUklaWkxFX0lOSVRJQUxJWkVEJylcbiAge1xuICAgIHJldHVybiB7XG4gICAgICAuLi5zdGF0ZSxcbiAgICAgIGluaXRpYWxpemVkOiB0cnVlXG4gICAgfVxuICB9XG4gIHJldHVybiBzdGF0ZVxufVxuXG5leHBvcnQgZGVmYXVsdCBkcml6emxlU3RhdHVzUmVkdWNlclxuXG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIC4vc3JjL2RyaXp6bGVTdGF0dXMvZHJpenpsZVN0YXR1c1JlZHVjZXIuanMiLCJjb25zdCBpbml0aWFsU3RhdGUgPSB7fVxuICBcbmNvbnN0IHRyYW5zYWN0aW9uc1JlZHVjZXIgPSAoc3RhdGUgPSBpbml0aWFsU3RhdGUsIGFjdGlvbikgPT4ge1xuICAgIGlmIChhY3Rpb24udHlwZSA9PT0gJ1RYX0JST0FEQ0FTVEVEJylcbiAgICB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAuLi5zdGF0ZSxcbiAgICAgICAgICAgIFthY3Rpb24udHhIYXNoXToge1xuICAgICAgICAgICAgICAgIHN0YXR1czogJ3BlbmRpbmcnLFxuICAgICAgICAgICAgICAgIGNvbmZpcm1hdGlvbnM6IFtdXG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBpZiAoYWN0aW9uLnR5cGUgPT09ICdUWF9DT05GSVJNQUlUT04nKVxuICAgIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIC4uLnN0YXRlLFxuICAgICAgICAgICAgW2FjdGlvbi50eEhhc2hdOiB7XG4gICAgICAgICAgICAgICAgLi4uc3RhdGVbYWN0aW9uLnR4SGFzaF0sXG4gICAgICAgICAgICAgICAgY29uZmlybWF0aW9uczogW1xuICAgICAgICAgICAgICAgICAgICAuLi5zdGF0ZVthY3Rpb24udHhIYXNoXS5jb25maXJtYXRpb25zLFxuICAgICAgICAgICAgICAgICAgICBhY3Rpb24uY29uZmlybWF0aW9uUmVjZWlwdFxuICAgICAgICAgICAgICAgIF1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIGlmIChhY3Rpb24udHlwZSA9PT0gJ1RYX1NVQ0NFU1NGVUwnKVxuICAgIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIC4uLnN0YXRlLFxuICAgICAgICAgICAgW2FjdGlvbi50eEhhc2hdOiB7XG4gICAgICAgICAgICAgICAgLi4uc3RhdGVbYWN0aW9uLnR4SGFzaF0sXG4gICAgICAgICAgICAgICAgc3RhdHVzOiAnc3VjY2VzcycsXG4gICAgICAgICAgICAgICAgcmVjZWlwdDogYWN0aW9uLnJlY2VpcHRcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuXG4gICAgaWYgKGFjdGlvbi50eXBlID09PSAnVFhfRVJST1InKVxuICAgIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIC4uLnN0YXRlLFxuICAgICAgICAgICAgW2FjdGlvbi50eEhhc2hdOiB7XG4gICAgICAgICAgICAgICAgLi4uc3RhdGVbYWN0aW9uLnR4SGFzaF0sXG4gICAgICAgICAgICAgICAgc3RhdHVzOiAnZXJyb3InLFxuICAgICAgICAgICAgICAgIGVycm9yOiBhY3Rpb24uZXJyb3JcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIHJldHVybiBzdGF0ZVxufVxuXG5leHBvcnQgZGVmYXVsdCB0cmFuc2FjdGlvbnNSZWR1Y2VyXG5cblxuXG4vLyBXRUJQQUNLIEZPT1RFUiAvL1xuLy8gLi9zcmMvdHJhbnNhY3Rpb25zL3RyYW5zYWN0aW9uc1JlZHVjZXIuanMiLCJjb25zdCBpbml0aWFsU3RhdGUgP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ICB2YXIgZGVsZWdhdGUgPSBjb250ZXh0LmRlbGVnYXRlO1xuICAgICAgICBpZiAoZGVsZWdhdGUpIHtcbiAgICAgICAgICB2YXIgZGVsZWdhdGVSZXN1bHQgPSBtYXliZUludm9rZURlbGVnYXRlKGRlbGVnYXRlLCBjb250ZXh0KTtcbiAgICAgICAgICBpZiAoZGVsZWdhdGVSZXN1bHQpIHtcbiAgICAgICAgICAgIGlmIChkZWxlZ2F0ZVJlc3VsdCA9PT0gQ29udGludWVTZW50aW5lbCkgY29udGludWU7XG4gICAgICAgICAgICByZXR1cm4gZGVsZWdhdGVSZXN1bHQ7XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGNvbnRleHQubWV0aG9kID09PSBcIm5leHRcIikge1xuICAgICAgICAgIC8vIFNldHRpbmcgY29udGV4dC5fc2VudCBmb3IgbGVnYWN5IHN1cHBvcnQgb2YgQmFiZWwnc1xuICAgICAgICAgIC8vIGZ1bmN0aW9uLnNlbnQgaW1wbGVtZW50YXRpb24uXG4gICAgICAgICAgY29udGV4dC5zZW50ID0gY29udGV4dC5fc2VudCA9IGNvbnRleHQuYXJnO1xuXG4gICAgICAgIH0gZWxzZSBpZiAoY29udGV4dC5tZXRob2QgPT09IFwidGhyb3dcIikge1xuICAgICAgICAgIGlmIChzdGF0ZSA9PT0gR2VuU3RhdGVTdXNwZW5kZWRTdGFydCkge1xuICAgICAgICAgICAgc3RhdGUgPSBHZW5TdGF0ZUNvbXBsZXRlZDtcbiAgICAgICAgICAgIHRocm93IGNvbnRleHQuYXJnO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGNvbnRleHQuZGlzcGF0Y2hFeGNlcHRpb24oY29udGV4dC5hcmcpO1xuXG4gICAgICAgIH0gZWxzZSBpZiAoY29udGV4dC5tZXRob2QgPT09IFwicmV0dXJuXCIpIHtcbiAgICAgICAgICBjb250ZXh0LmFicnVwdChcInJldHVyblwiLCBjb250ZXh0LmFyZyk7XG4gICAgIC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AgICAgICAgIC8vIGNoYW5jZSB0byBjbGVhbiB1cC5cbiAgICAgICAgICBjb250ZXh0Lm1ldGhvZCA9IFwicmV0dXJuXCI7XG4gICAgICAgICAgY29udGV4dC5hcmcgPSB1bmRlZmluZWQ7XG4gICAgICAgICAgbWF5YmVJbnZva2VEZWxlZ2F0ZShkZWxlZ2F0ZSwgY29udGV4dCk7XG5cbiAgICAgICAgICBpZiAoY29udGV4dC5tZXRob2QgPT09IFwidGhyb3dcIikge1xuICAgICAgICAgICAgLy8gSWYgbWF5YmVJbnZva2VEZWxlZ2F0ZShjb250ZXh0KSBjaGFuZ2VkIGNvbnRleHQubWV0aG9kIGZyb21cbiAgICAgICAgICAgIC8vIFwicmV0dXJuXCIgdG8gXCJ0aHJvd1wiLCBsZXQgdGhhdCBvdmVycmlkZSB0aGUgVHlwZUVycm9yIGJlbG93LlxuICAgICAgICAgICAgcmV0dXJuIENvbnRpbnVlU2VudGluZWw7XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgY29udGV4dC5tZXRob2QgPSBcInRocm93XCI7XG4gICAgICAgIGNvbnRleHQuYXJnID0gbmV3IFR5cGVFcnJvcihcbiAgICAgICAgICBcIlRoZSBpdGVyYXRvciBkb2VzIG5vdCBwcm92aWRlIGEgJ3Rocm93JyBtZXRob2RcIik7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBDb250aW51ZVNlbnRpbmVsO1xuICAgIH1cblxuICAgIHZhciByZWNvcmQgPSB0cnlDYXRjaChtZXRob2QsIGRlbGVnYXRlLml0ZXJhdG9yLCBjb250ZXh0LmFyZyk7XG5cbiAgICBpZiAocmVjb3JkLnR5cGUgPT09IFwidGhyb3dcIikge1xuICAgICAgY29udGV4dC5tZXRob2QgPSBcInRocm93XCI7XG4gICAgICBjb250ZXh0LmFyZyA9IHJlY29yZC5hcmc7XG4gICAgICBjb250ZXh0LmRlbGVnYXRlID0gbnVsbDtcbiAgICAgIHJldHVybiBDb250aW51ZVNlbnR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2F0ZSA9IG51bGw7XG5cbiAgICAgIHRoaXMubWV0aG9kID0gXCJuZXh0XCI7XG4gICAgICB0aGlzLmFyZyA9IHVuZGVmaW5lZDtcblxuICAgICAgdGhpcy50cnlFbnRyaWVzLmZvckVhY2gocmVzZXRUcnlFbnRyeSk7XG5cbiAgICAgIGlmICghc2tpcFRlbXBSZXNldCkge1xuICAgICAgICBmb3IgKHZhciBuYW1lIGluIHRoaXMpIHtcbiAgICAgICAgICAvLyBOb3Qgc3VyZSBhYm91dCB0aGUgb3B0aW1hbCBvcmRlciBvZiB0aGVzZSBjb25kaXRpb25zOlxuICAgICAgICAgIGlmIChuYW1lLmNoYXJBdCgwKSA9PT0gXCJ0XCIgJiZcbiAgICAgICAgICAgICAgaGFzT3duLmNhbGwodGhpcywgbmFtZSkgJiZcbiAgICAgICAgICAgICAgIWlzTmFOKCtuYW1lLnNsaWNlKDEpKSkge1xuICAgICAgICAgICAgdGhpc1tuYW1lXSA9IHVuZGVmaW5lZDtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9LFxuXG4gICAgc3RvcDogZnVuY3Rpb24oKSB7XG4gICAgICB0aGlzLmRvbmUgPSB0cnVlO1xuXG4gICAgICB2YXIgcm9vdEVudHJ5ID0gdGhpcy50cnlFbnRyaWVzWzBdO1xuICAgICAgdmFyIHJvb3RSZWNvcmQgPSByb290RW50cnkuY29tcGxldGlvbjtcbiAgICAgIGlmIChyb290UmVjb3JkLnR5cGUgPT09IFwidGhyb3dcIikge1xuICAgICAgICB0aHJvdyByb290UmVjb3JkLmFyZztcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIHRoaXMucnZhbDtcbiAgICB9LFxuXG4gICAgZGlzcGF0Y2hFeGNlcHRpb246IGZ1bmN0aW9uKGV4Y2VwdGlvbikge1xuICAgICAgaWYgKHRoaXMuZG9uZSkge1xuICAgICAgICB0aHJvdyBleGNlcHRpb247XG4gICAgICB9XG5cbiAgICAgIHZhciBjb250ZX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ZW5kXCIpO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGVudHJ5LnRyeUxvYyA8PSB0aGlzLnByZXYpIHtcbiAgICAgICAgICB2YXIgaGFzQ2F0Y2ggPSBoYXNPd24uY2FsbChlbnRyeSwgXCJjYXRjaExvY1wiKTtcbiAgICAgICAgICB2YXIgaGFzRmluYWxseSA9IGhhc093bi5jYWxsKGVudHJ5LCBcImZpbmFsbHlMb2NcIik7XG5cbiAgICAgICAgICBpZiAoaGFzQ2F0Y2ggJiYgaGFzRmluYWxseSkge1xuICAgICAgICAgICAgaWYgKHRoaXMucHJldiA8IGVudHJ5LmNhdGNoTG9jKSB7XG4gICAgICAgICAgICAgIHJldHVybiBoYW5kbGUoZW50cnkuY2F0Y2hMb2MsIHRydWUpO1xuICAgICAgICAgICAgfSBlbHNlIGlmICh0aGlzLnByZXYgPCBlbnRyeS5maW5hbGx5TG9jKSB7XG4gICAgICAgICAgICAgIHJldHVybiBoYW5kbGUoZW50cnkuZmluYWxseUxvYyk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICB9IGVsc2UgaWYgKGhhc0NhdGNoKSB7XG4gICAgICAgICAgICBpZiAodGhpcy5wcmV2IDwgZW50cnkuY2F0Y2hMb2MpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZShlbnRyeS5jYXRjaExvYywgdHJ1ZSk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICB9IGVsc2UgaWYgKGhhc0ZpbmFsbHkpIHtcbiAgICAgICAgICAgIGlmICh0aGlzLnByZXYgPCBlbnRyeS5maW5hbGx5TG9jKSB7XG4gICAgICAgICAgICAgIHJldHVybiBoYW5kbGUoZW50cnkuZmluYWxseUxvYyk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFwidHJ5IHN0YXRlbWVudCB3aXRob3V0IGNhdGNoIG9yIGZpbmFsbHlcIik7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgfSxcblxuICAgIGFicnVwdDogZnVuY3Rpb24odHlwZSwgYXJnKSB7XG4gICAgICBmb3IgKHZhciBpID0gdGhpcy50cnlFbnRyaWVzLmxlbmd0aCAtIDE7IGkgPj0gMDsgLS1pKSB7XG4gICAgICAgIHZhciBlbnRyeSA9IHRoaXMudHJ5RW50cmllc1tpXTtcbiAgICAgICAgaWYgKGVudHJ5LnRyeUxvYyA8PSB0aGlzLnByZXYgJiZcbiAgICAgICAgICAgIGhhc093bi5jYWxsKGVudHJ5LCBcImZpbmFsbHlMb2NcIikgJiZcbiAgICAgICAgICAgIHRoaXMucHJldiA8IGVudHJ5LmZpbmFsbHlMb2MpIHtcbiAgICAgICAgICB2YXIgZmluYWxseUVudHJ5ID0gZW50cnk7XG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgaWYgKGZpbmFsbHlFbnRyeSAmJlxuICAgICAgICAgICh0eXBlID09PSBcImJyZWFrXCIgfHxcbiAgICAgICAgICAgdHlwZSA9PT0gXCJjb250aW51ZVwiKSAmJlxuICAgICAgICAgIGZpbmFsbHlFbnRyeS50cnlMb2MgPD0gYXJnICYmXG4gICAgICAgICAgYXJnIDw9IGZpbmFsbHlFbnRyeS5maW5hbGx5TG9jKSB7XG4gICAgICAgIC8vIElnbm9yZSB0aGUgZmluYWxseSBlbnRyeSBpZiBjb250cm9sIGlzIG5vdCBqdW1waW5nIHRvIGFcbiAgICAgICAgLy8gbG9jYXRpb24gb3V0c2lkZSB0aGUgdHJ5L2NhdGNoIGJsb2NrLlxuICAgICAgICBmaW5hbGx5RW50cnkgPSBudWxsO1xuICAgICAgfVxuXG4gICAgICB2YXIgcmVjb3JkID0gZmluYWxseUVudHJ5ID8gZmluYWxseUVudHJ5LmNvbXBsZXRpb24gOiB7fTtcbiAgICAgIHJlY29yZC50eXBlID0gdHlwZTtcbiAgICAgIHJlY29yZC5hcmcgPSBhcmc7XG5cbiAgICAgIGlmIChmaW5hbGx5RW50cnkpIHtcbiAgICAgICAgdGhpcy5tZXRob2QgPSBcIm5leHRcIjtcbiAgICAgICAgdGhpcy5uZXh0ID0gZmluYWxseUVudHJ5LmZpbmFsbHlMb2M7XG4gICAgICAgIHJldHVybiBDb250aW51ZVNlbnRpbmVsO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gdGhpcy5jb21wbGV0ZShyZWNvcmQpO1xuICAgIH0sXG5cbiAgICBjb21wbGV0ZTogZnVuY3Rpb24ocmVjb3JkLCBhZnRlckxvYykge1xuICAgICAgaWYgKHJlY29yZC50eXBlID09PSBcInRocm93XCIpIHtcbiAgICAgICAgdGhyb3cgcmVjb3JkLmFyZztcbiAgICAgIH1cblxuICAgICAgaWYgKHJlY29yZC50eXBlID09PSBcImJyZWFrXCIgfHxcbiAgICAgICAgICByZWNvcmQudHlwZSA9PT0gXCJjb250aW51ZVwiKSB7XG4gICAgICAgIHRoaXMubmV4dCA9IHJlY29yZC5hcmc7XG4gICAgICB9IGVsc2UgaWYgKHJlY29yZC50eXBlID09PSBcInJldHVyblwiKSB7XG4gICAgICAgIHRoaXMucnZhbCA9IHRoaXMuYXJnID0gcmVjb3JkLmFyZztcbiAgICAgICAgdGhpcy5tZXRob2QgPSBcInJldHVyblwiO1xuICAgICAgICB0aGlzLm5leHQgPSBcImVuZFwiO1xuICAgICAgfSBlbHNlIGlmIChyZWNvcmQudHlwZSA9PT0gXCJub3JtYWxcIiAmJiBhZnRlckxvYykge1xuICAgICAgICB0aGlzLm5leHQgPSBhZnRlckxvYztcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIENvbnRpbnVlU2VudGluZWw7XG4gICAgfSxcblxuICAgIGZpbmlzaDogZnVuY3Rpb24oZmluYWxseUxvYykge1xuICAgICAgZm9yICh2YXIgaSA9IHRoaXMudHJ5RW50cmllcy5sZW5ndGggLSAxOyBpID49IDA7IC0taSkge1xuICAgICAgICB2YXIgZW50cnkg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nMuY29udHJhY3RzW2ldLmNvbnRyYWN0TmFtZVxuXG4gICAgY29udHJhY3RzSW5pdGlhbFN0YXRlW2NvbnRyYWN0TmFtZV0gPSB7XG4gICAgICBpbml0aWFsaXplZDogZmFsc2UsXG4gICAgICBzeW5jZWQ6IGZhbHNlXG4gICAgfVxuXG4gICAgLy8gQ29uc3RhbnQgZ2V0dGVyc1xuICAgIGZvciAodmFyIGkyID0gMDsgaTIgPCBvcHRpb25zLmNvbnRyYWN0c1tpXS5hYmkubGVuZ3RoOyBpMisrKSB7XG4gICAgICB2YXIgaXRlbSA9IG9wdGlvbnMuY29udHJhY3RzW2ldLmFiaVtpMl07XG5cbiAgICAgIGlmIChpdGVtLnR5cGUgPT0gXCJmdW5jdGlvblwiICYmIGl0ZW0uY29uc3RhbnQgPT09IHRydWUpIHtcbiAgICAgICAgY29udHJhY3RzSW5pdGlhbFN0YXRlW2NvbnRyYWN0TmFtZV1baXRlbS5uYW1lXSA9IHt9XG4gICAgICB9XG4gICAgfVxuICB9XG5cbiAgcmV0dXJuIGNvbnRyYWN0c0luaXRpYWxTdGF0ZVxufVxuXG5tb2R1bGUuZXhwb3J0cyA9IGdlbmVyYXRlQ29udHJhY3RzSW5pdGlhbFN0YXRlXG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIC4vc3JjL2dlbmVyYXRlQ29udHJhY3RzSW5pdGlhbFN0YXRlLmpzIl0sInNvdXJjZVJvb3QiOiIifQ== \ No newline at end of file diff --git a/src/drizzleStatus/drizzleStatusSaga.js b/src/drizzleStatus/drizzleStatusSaga.js index 5549044e..cb1f1061 100644 --- a/src/drizzleStatus/drizzleStatusSaga.js +++ b/src/drizzleStatus/drizzleStatusSaga.js @@ -15,6 +15,11 @@ function* initializeDrizzle(action) { // Initialize web3 and get the current network ID. var web3 = yield call(initializeWeb3, {options: web3Options}) + + if (!web3) { + throw("Web3 could not be initialized") + } + action.drizzle.web3 = web3 yield call(getNetworkId, {web3}) diff --git a/src/web3/web3Saga.js b/src/web3/web3Saga.js index eaf5f166..51fd2642 100644 --- a/src/web3/web3Saga.js +++ b/src/web3/web3Saga.js @@ -7,55 +7,51 @@ var Web3 = require('web3') */ export function* initializeWeb3({options}) { - var web3 = {} - // Checking if Web3 has been injected by the browser (Mist/MetaMask) - if (typeof window.web3 !== 'undefined') { - // Use Mist/MetaMask's provider. - web3 = new Web3(window.web3.currentProvider) - web3.eth.cacheSendTransaction = (txObject) => put({type: 'SEND_WEB3_TX', txObject, stackId, web3}) + try { + var web3 = {} - console.log('Injected web3 detected.') + // Checking if Web3 has been injected by the browser (Mist/MetaMask) + if (typeof window.web3 !== 'undefined') { + // Use Mist/MetaMask's provider. + web3 = new Web3(window.web3.currentProvider) + web3.eth.cacheSendTransaction = (txObject) => put({type: 'SEND_WEB3_TX', txObject, stackId, web3}) - yield put({type: 'WEB3_INITIALIZED'}) - - return web3 - } else { - if (options.fallback) { - // Attempt fallback if no web3 injection. - console.log('No web3 instance injected, using fallback.') + console.log('Injected web3 detected.') - switch (options.fallback.type) { - case 'ws': - var provider = new Web3.providers.WebsocketProvider(options.fallback.url) - web3 = new Web3(provider) + yield put({type: 'WEB3_INITIALIZED'}) + + return web3 + } else { + if (options.fallback) { + // Attempt fallback if no web3 injection. + console.log('No web3 instance injected, using fallback.') - // Attach drizzle functions - web3.eth['cacheSendTransaction'] = (txObject) => put({type: 'SEND_WEB3_TX', txObject, stackId, web3}) + switch (options.fallback.type) { + case 'ws': + var provider = new Web3.providers.WebsocketProvider(options.fallback.url) + web3 = new Web3(provider) - yield put({type: 'WEB3_INITIALIZED'}) + // Attach drizzle functions + web3.eth['cacheSendTransaction'] = (txObject) => put({type: 'SEND_WEB3_TX', txObject, stackId, web3}) - return web3 + yield put({type: 'WEB3_INITIALIZED'}) - break - default: - // Invalid options; throw. - throw "Invalid web3 fallback provided." - } - } + return web3 - // Out of web3 options; throw. - throw "Cannot find injected web3 or valid fallback." - } -} + break + default: + // Invalid options; throw. + throw "Invalid web3 fallback provided." + } + } -function* callInitializeWeb3(action) { - try { - const web3 = yield call(initializeWeb3, {options: action.options}) - return web3 + // Out of web3 options; throw. + throw "Cannot find injected web3 or valid fallback." + } } catch (error) { - store.dispatch({type: 'WEB3_FAILED', error}) + yield put({type: 'WEB3_FAILED', error}) console.error('Error intializing web3:') console.error(error) } @@ -130,7 +126,6 @@ function* callSendTx({txObject, stackId, web3}) { } function* web3Saga() { - yield takeLatest('WEB3_INITIALIZING', callInitializeWeb3) yield takeLatest('NETWORK_ID_FETCHING', getNetworkId) yield takeEvery('SEND_WEB3_TX', callSendTx) } From acdf499108001657300f6935a2c7559218eaa774 Mon Sep 17 00:00:00 2001 From: Sebastian Klingler Date: Sun, 13 May 2018 11:43:54 -0500 Subject: [PATCH 2/2] Follow standards for throw statement --- src/drizzleStatus/drizzleStatusSaga.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/drizzleStatus/drizzleStatusSaga.js b/src/drizzleStatus/drizzleStatusSaga.js index cb1f1061..682bff57 100644 --- a/src/drizzleStatus/drizzleStatusSaga.js +++ b/src/drizzleStatus/drizzleStatusSaga.js @@ -17,7 +17,7 @@ function* initializeDrizzle(action) { var web3 = yield call(initializeWeb3, {options: web3Options}) if (!web3) { - throw("Web3 could not be initialized") + throw 'Web3 could not be initialized.' } action.drizzle.web3 = web3