Add build instructions
junderw opened this issue · 5 comments
I am looking into modifying the Ethereum Chrome app to manage multiple addresses (We have a use for this under full knowledge that Ethereum works differently than bitcoin)
while I have a good idea of where to modify for our purposes, I have yet to succeed in building the app.
Any simple explanation would suffice.
Thanks.
We are using sbt in order to build the project. You can download SBT here http://www.scala-sbt.org/, once it's installed you just have to run "sbt build" on the command line.
We have a very very experimental version of the application supporting multiple accounts for ethereum available here https://github.com/LedgerHQ/ledger-wallet-ethereum-chrome/tree/feature/multiple_account. There is no work done on either the UX or the UI it works following BIP 44 convention (i.e. you always have one empty account, this means that if you have 1 account and you start receiving on a second account, the application will synchronize 3 accounts).
I will look into that branch. I have been struggling with modifying the master branch, as so many classes are intricately intertwined... but no luck.
I have something sort of working where I can type in an account index on the ETH ETC select screen and I messed around with routes to get it printing on console.log... but the parts that talk to the Ledger API are probably not getting the info correctly...
I am sure it will be easier to modify your multiple account branch as a starting point.
Thanks for the pointer.
@pollastri-pierre That branch looks like a good idea, and is similar to what I was trying to do.
A few things:
- I found a bug, when you tap max in the send screen it will subtract the fee from the total balance of all accounts, and trying to send will get an error. I changed balance() to take
accountIndex: Int = -1
passed in by the button on send/index.html and within the balance adding loopresult = result + balance
by instead saying i <- 0 to balances.length and saying balances(i) ifaccountIndex == -1 || accountIndex == i
- For my use case, the sync is way too slow... for example in Copay we can query 200 addresses with a response time of 200ms and parse the output to show the user within a few seconds... it took me about ten minutes to sync up to address index 145. Since we already have the balance info on our end, rather than learn more scala and rewrite syncing, I think I will fix it so I can specify the account number on the ETC ETH select screen and it will only sync from that account index onward.
Another thing I am thinking of implementing: Allow send from multiple addresses at once (multiple transactions generated and signed all at once) Which would make it very easy to implement a cold wallet for generating deposit addresses for an exchange, and make sending from multiple addresses to hot wallet much easier...
But for now, the multiple account branch is very good for starting off from.
Thank you.
Glad to know it is working for you. This branch is quite unstable and I didn't finish the integration of multi account support on the UI. 10 minutes for 145 addresses seems to be a lot (we have trouble scaling our API right now due to the increasing traffic). You could speed this up by doing only one request for your 145 addresses.
@pollastri-pierre I couldn't get it to work, I was able to compile successfully but when I try to run the application I get an error saying I'm missing angular, is there something else I need to do? I apologize if I am missing something really basic, I am not a Scala programmer..
[error] (compile:run) Exception while running JS code: java.lang.RuntimeException: Could not find object angular - has the Angular.js library been loaded? (Lbiz_enef_angulate_Angular$.sjsir#18)