Skip to content

Company to User Implementation#68

Merged
gulshanvasnani merged 4 commits intoOpenST:developfrom
abhayks1:company_to_user
Feb 6, 2019
Merged

Company to User Implementation#68
gulshanvasnani merged 4 commits intoOpenST:developfrom
abhayks1:company_to_user

Conversation

@abhayks1
Copy link
Contributor

@abhayks1 abhayks1 commented Feb 5, 2019

PR covers below:

Company to User flow:

  • Deployment of ProxyFactory contract .
  • At the interaction layer method will be createCompanyWallet.
  • Call ProxyFactory.createProxy with below parameters:
    _masterCopy: TH Mater Copy address
    _data: TH Setup executable data

Copy link
Contributor

@gulshanvasnani gulshanvasnani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work 👍
Few inline comments.


const UserWalletFactoryContractName = 'UserWalletFactory';

const ProxyFactoryContractName = 'ProxyFactory';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change it to :-

const UserWalletFactoryContractName = 'UserWalletFactory',
          ProxyFactoryContractName = 'ProxyFactory',
          THMasterCopyContractName = 'TokenHolder';


assert.strictEqual(response.status, true, 'Company wallet creation failed.');

// Fetching the gnosisSafe and tokenholder proxy address for the user.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It verifies only tokenholder proxy address.Please change the comment.

* @param sessionKeysExpirationHeights Array of expiration heights.
* @returns {*}
*/
getTokenHolderSetupData(owner, sessionKeys, sessionKeysSpendingLimits, sessionKeysExpirationHeights) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion getTokenHolderSetupData => getTokenHolderSetupExecutableData

}

/**
* Private method used for creation and configuration of token holder proxy contract for company
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Full stop at the end.

_createCompanyWalletRawTx(proxyFactory, owner, sessionKeys, sessionKeysSpendingLimits, sessionKeysExpirationHeights) {
const oThis = this;

const thSetupData = oThis.getTokenHolderSetupData(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion thSetupData => thSetupExecutableData

Copy link
Contributor

@gulshanvasnani gulshanvasnani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 💯

@gulshanvasnani gulshanvasnani merged commit f60d0c9 into OpenST:develop Feb 6, 2019
@abhayks1 abhayks1 deleted the company_to_user branch February 26, 2019 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants