mirror of https://github.com/embarklabs/embark.git
431d366652
If a transaction is sent and the proxy is enabled, but the function hash (identified in the data of the transaction) is not recognized as a function of the contract (ie does not match a function hash in the contract’s ABI), then embark would crash. The fix was to introduce error handling in `transactionUtils.getTransactionParams` that defaults the contract name and params to `UNKNOWN`. This can be replicated by 1. Clone https://github.com/mortimr/ethvtx_embark 2. `embark run` the dapp 3. Connect with Metamask 4. Ensure you have enough funds 5. In the “Tx calls” bubble, enter a new value, then click “Set Value”. 6. When the Metamask dialog appears, the error should have already happened. The console shows: ``` embark/src/lib/utils/transactionUtils.ts:58 const functionName = func.functionName; ^ TypeError: Cannot read property 'functionName' of undefined at functionName (/Users/mortimr/Horyus/ethvtx_embark/node_modules/embark/src/lib/utils/transactionUtils.ts:58:29) at ConsoleListener.getTransactionParams [as _onIpcLogRequest] (/Users/mortimr/Horyus/ethvtx_embark/node_modules/embark/src/lib/modules/console_listener/index.js:102:41) at _onIpcLogRequest (/Users/mortimr/Horyus/ethvtx_embark/node_modules/embark/src/lib/modules/console_listener/index.js:76:12) at Server._done (/Users/mortimr/Horyus/ethvtx_embark/node_modules/embark/src/lib/core/ipc.js:81:7) at Server.emit (/Users/mortimr/Horyus/ethvtx_embark/node_modules/event-pubsub/es5.js:74:21) at Server.gotData (/Users/mortimr/Horyus/ethvtx_embark/node_modules/node-ipc/dao/socketServer.js:194:14) at Socket.emit (events.js:189:13) at Socket.EventEmitter.emit (domain.js:441:20) at addChunk (_stream_readable.js:284:12) at readableAddChunk (_stream_readable.js:261:13) at Socket.Readable.push (_stream_readable.js:220:10) at Pipe.onStreamRead [as onread] (internal/stream_base_commons.js:94:17) ``` |
||
---|---|---|
.. | ||
embark | ||
embark-async-wrapper | ||
embark-compiler | ||
embark-graph | ||
embark-reset | ||
embark-typings | ||
embark-ui | ||
embark-vyper | ||
embarkjs | ||
embarkjs-connector-web3 | ||
.yarnrc |