Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update creator node middleware for new eth contracts (take 2) #897

Merged
merged 11 commits into from
Oct 8, 2020

Conversation

dmanjunath
Copy link
Contributor

@dmanjunath dmanjunath commented Oct 7, 2020

Description

Built off #896. Needed to bump libs to v1.0.0 in the same PR as those changes because those ETH contract libs wrappers do not exist in our current libs version.

For al other context see old PR #896

@dmanjunath dmanjunath changed the title Dm cnode middleware new eth contracts 2 Update creator node middleware for new eth contracts #896 (take 2) Oct 7, 2020
@dmanjunath dmanjunath changed the title Update creator node middleware for new eth contracts #896 (take 2) Update creator node middleware for new eth contracts (take 2) Oct 7, 2020
Copy link
Contributor

@SidSethi SidSethi left a comment

Choose a reason for hiding this comment

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

net new changes (libs v bump) are fine, one question on old code but doesn't block merge

const walletAddress = EthereumWallet.fromPrivateKey(privateKeyBuffer).getAddressString()
if (walletAddress !== config.get('delegateOwnerWallet').toLowerCase()) {
throw new Error('Invalid delegatePrivateKey/delegateOwnerWallet pair')
}
Copy link
Contributor

Choose a reason for hiding this comment

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

looks good, curious why not use web3.eth.accounts.privateKeyToAccount (https://web3js.readthedocs.io/en/v1.3.0/web3-eth-accounts.html#privatekeytoaccount)

Copy link
Contributor Author

@dmanjunath dmanjunath Oct 8, 2020

Choose a reason for hiding this comment

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

this is how identity relay does wallet extraction, so just used the same code honestly

Copy link
Contributor

Choose a reason for hiding this comment

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

ye makes sense. clearly it works

@dmanjunath dmanjunath merged commit 9cf5110 into master Oct 8, 2020
@dmanjunath dmanjunath deleted the dm-cnode-middleware-new-eth-contracts-2 branch October 8, 2020 17:34
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.

None yet

2 participants