embark/packages
emizzle 431d366652 fix(@embark/utils): Fix proxy crash with unknown function
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)
```
2019-03-22 13:27:22 -04:00
..
embark fix(@embark/utils): Fix proxy crash with unknown function 2019-03-22 13:27:22 -04:00
embark-async-wrapper chore(release): 4.0.0 2019-03-18 18:26:56 -05:00
embark-compiler chore(release): 4.0.0 2019-03-18 18:26:56 -05:00
embark-graph chore(release): 4.0.0 2019-03-18 18:26:56 -05:00
embark-reset chore(release): 4.0.0 2019-03-18 18:26:56 -05:00
embark-typings chore(release): 4.0.0 2019-03-18 18:26:56 -05:00
embark-ui chore(release): 4.0.0 2019-03-18 18:26:56 -05:00
embark-vyper chore(release): 4.0.0 2019-03-18 18:26:56 -05:00
embarkjs feat(@embark/embarkjs): add bytecode to contract 2019-03-20 13:11:21 -04:00
embarkjs-connector-web3 chore(release): 4.0.0 2019-03-18 18:26:56 -05:00
.yarnrc build: cleanup .yarnrc 2019-02-05 14:15:39 -06:00