WIP: Feature/identity


This implements the 'Identity' concept to Copay:

1. One identity (email(or handle)  / password) and multiple wallets
1. Each identity has a Profile, with user's related data.
1. Wallets are NOT derived using the same seed, are independent (we can add same seed wallet in the future easily, but still we need ot support independent wallets)

Wallet test we heavily modified to use sinon. Also compatibility test test moved to test.Wallet

WalletFactory is no longer used.  Identity takes part of it responsabilited.

This is still WIP. Mocha test are passing (more than 30 test were added), but it is NOT  INTEGRATED TO THE UX yet (karma unit test are failing). 
plugin manager was merged before this PR.

The thing is. where we will configure Storage? on the controller?  I would
love to keep them as small as possible.

On Sat, Oct 11, 2014 at 5:08 PM, Yemel Jardi <notifications@github.com>
wrote:

> In js/controllers/createProfile.js:
>
> > +console.log('[createProfile.js.15:anyProfile:]',anyProfile); //TODO
> > +      $scope.anyWallet = anyWallet;
> > +console.log('[createProfile.js.17:anyWallet:]',anyWallet); //TODO
> > +    });
> > +
> > +  });
> > +
> > +
> > +  $scope.createProfile = function(form) {
> > +    if (form && form.$invalid) {
> > +      notification.error('Error', 'Please enter the required fields');
> > +      return;
> > +    }
> > +    $scope.loading = true;
> > +    copay.Identity.create(form.email.$modelValue, form.password.$modelValue, {
> > +      pluginManager: pluginManager,
>
> I don't like that pluginManager. I checked the code and you are using it
> only to get the initial parameters for creating a Storage instance.
>
> The Identity class shouldn't know which implementation of Storage it's
> using, it should only receive an already configured instances of the
> Storage services on it's constructor.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/bitpay/copay/pull/1498/files#r18744060>.
>



-- 
Matías Alejo Garcia
@ematiu
Roads? Where we're going, we don't need roads!