12 Commits

Author SHA1 Message Date
emizzle
536a4029ba feat(@cockpit): Pass tx value as wei and add validation
For payable methods inside of the contract interatction section of cockpit, the value input has been updated to pass wei to the API. The input field now accepts value like `100 ether` or 25 szabo`. The value entered is automatically converted to wei and shown to the user in real time.

Additionally, the input is validated for a correct value, with an error shown to the user for incorrectly entered values.

A tooltip has been added to help the user enter correct values.

UI updates can be seen in video here: https://monosnap.com/file/642cHH2HxDeiFLzB2VLqHP9GuqoRfz
2019-07-08 10:00:34 -05:00
Pascal Precht
70ff3c1825 fix(@embark/contracts-manager): ensure ETH values sent through APIs are converted to string
This is due to a bug that has been introduced in d10c0b7951 where we end up
sending values as numbers to web3's `toWei()` utility. The `value` is always sent as number
and in fact always defined, so we just need to check for it's type and convert it to a string
according to `toWei()`'s API.
2019-07-08 10:00:34 -05:00
Jonathan Rainville
198a5dc3f4 fix(@embark/solidity): show a better error message in debug 2019-06-27 14:10:53 -05:00
Michael Bradley, Jr
d264070069 style(@embark/contracts-manager): add semicolon to end of statement 2019-06-06 15:49:53 -05:00
Pascal Precht
d10c0b7951 feat(@cockpit/explorer): enable users to send ether through payable methods (#1649) 2019-06-06 12:52:01 -04:00
Pascal Precht
3df7f81732
refactor: move dappPath, ipcPath and embarkPath into @embark/utils 2019-05-17 11:25:40 +02:00
Pascal Precht
e3ecf68fbc refactor: move embarkPath, ipcPath and dappPath into embark-core
This enables removing unnecessary `core/fs` dependencies which can be
replaced with `fs-extra`.

This commit also fixes a bug introduced in f868d1216d
where methods from `embark.fs` weren't available.

The reason for that is because we have several *Process instances
that are created through child process communication, specifically
process.send() APIs. Using those APIs, we can only send data structures
however, methods attached on any of those will get lost.

This is the case when sending embark.fs through process.send().

We still need fs in those places though, mostly because they are relying
on embarkPath and dappPath().

These places are now importing those functions from `embark-core`. Other
API such as writeFile or mkdirp() can be accessed through fs-extra
or fs modules.
2019-05-15 12:20:22 +02:00
Jonathan Rainville
f9d7a3f41b feat(@embark/test-runner): show interface contract message in tests
But only show it if the contract was in the contract config
2019-05-10 09:49:34 -04:00
Jonathan Rainville
334d3bcdc5 feat(@embar/contracts-manager): add message for interface contracts 2019-05-10 09:49:34 -04:00
Michael Bradley, Jr
2eb5617443 refactor: use explicit codes with process.exit so intent is clear and errors don't exit cleanly 2019-05-08 15:55:06 -05:00
Michael Bradley, Jr
8b94419670 refactor(@embark/i18n): expose __ from embark-i18n, drop global __ 2019-05-08 11:01:16 +02:00
Michael Bradley, Jr
436cfcbca0 refactor(@embark/contracts-manager): move contracts_manager into embark-contracts-manager package 2019-04-30 13:03:48 -05:00