bitpay/copay — pull request #1315 by isocolsky (2014-09-08 19:45:09+00:00)
Title: Catching errors when trying to create new TXP

Related to #1245
This PR refactors ´´´Wallet#createTx´´´ to:
1. Separate its behavior from ´´´Wallet#createPaymentTx´´´ (arguments were given different meaning depending on the context of the call...)
2. The callback is now passing an ´´´err´´´ argument in addition to the ´´´ntxid´´´argument.
This last change made it possible to catch errors at tx creation time (e.g. Insight server down).