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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keychain: adds support for private keys as non-array #169

Merged
merged 3 commits into from Aug 27, 2020
Merged

Conversation

macor161
Copy link
Contributor

@macor161 macor161 commented Jun 2, 2020

馃 Pull Request Description

  • Adds support for a single key (non-array) from mainnet_key.json or rinkeby_key.json file.

Rational

Multiple users have reported that the Buidler plugin didn't work after switching from aragonCLI. It turns out they had a key file that contained a single key, not in an array.

@macor161 macor161 requested a review from 0xGabi June 2, 2020 23:54
@macor161 macor161 changed the title Adds support for keys as non-array WIP Adds support for keys as non-array Jun 3, 2020
@@ -46,7 +47,9 @@ export const configExtender: ConfigExtender = (finalConfig, userConfig) => {
const { rpc, keys } = byNetworkMnemonic
if (!finalNetwork.url && rpc) finalNetwork.url = rpc
if (!finalNetwork.accounts && keys)
finalNetwork.accounts = ensureHexEncoding(keys)
finalNetwork.accounts = isArray(keys)
Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, rather than importing this from lodash, we can just use Array.isArray().

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point!

@macor161
Copy link
Contributor Author

macor161 commented Jun 3, 2020

Tests seem to be failing because of #168

@sohkai
Copy link
Contributor

sohkai commented Jun 3, 2020

We might need to update their package.jsons/yarn.locks, in a similar manner to aragon/client#1434.

But are we not installing the tests via yarn? The lock files should be preventing errors.

@macor161
Copy link
Contributor Author

macor161 commented Jun 3, 2020

@sohkai

We might need to update their package.jsons/yarn.locks, in a similar manner to aragon/client#1434.

Yes this is exactly the problem.

But are we not installing the tests via yarn? The lock files should be preventing errors.

No we use a pretty old version of the client, which doesn't have any yarn.lock or package-lock.json file unfortunately, commit 775edd606333a111eb2693df53900039722a95dc.
Until issue 1368 is fixed, I could perhaps push a git tag or a branch that contains a patch for this commit.

@sohkai
Copy link
Contributor

sohkai commented Jun 3, 2020

Ohhh gotcha; this is also due to the client?

I thought the tests were having trouble building each app's frontend.

@macor161
Copy link
Contributor Author

macor161 commented Jun 3, 2020

Yes, seems like they fail because of this client bug. We can see the specific error message here: https://github.com/aragon/buidler-aragon/pull/169/checks?check_run_id=735557814#step:7:425

@dapplion
Copy link
Contributor

dapplion commented Jun 6, 2020

Could we pull the built client from somewhere (e.g. IPFS or Github releases) instead of building it locally?

@macor161
Copy link
Contributor Author

macor161 commented Jun 8, 2020

@dapplion Yes I think the idea was to move to Github releases but we currently can't use them as they contain a bug in development. When the issue is fixed, I definitely think it would be a good idea.

@dapplion
Copy link
Contributor

dapplion commented Jun 8, 2020

I'm a firm believer that the client should not have to be built multiple times. Configuration should be handled at another layer, which would allow reusing the content in APM for all possible needs

@sohkai
Copy link
Contributor

sohkai commented Jun 15, 2020

@macor161 I've merged this branch with master, now that we have the hotfix in place.


I'm a firm believer that the client should not have to be built multiple times. Configuration should be handled at another layer, which would allow reusing the content in APM for all possible needs

Definitely agree; I've made #175 for this separately.

@codecov-commenter
Copy link

codecov-commenter commented Jun 15, 2020

Codecov Report

Merging #169 into master will decrease coverage by 1.04%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #169      +/-   ##
==========================================
- Coverage   54.71%   53.66%   -1.05%     
==========================================
  Files          70       71       +1     
  Lines        1380     1407      +27     
  Branches      206      212       +6     
==========================================
  Hits          755      755              
- Misses        564      591      +27     
  Partials       61       61              
Flag Coverage 螖
#unittests 53.66% <0.00%> (-1.05%) 猬囷笍

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage 螖
src/config/mnemonic.ts 58.06% <0.00%> (-1.94%) 猬囷笍
src/utils/appInstaller/index.ts 12.08% <0.00%> (-4.58%) 猬囷笍
.prettierrc.js 0.00% <0.00%> (酶)

Continue to review full report at Codecov.

Legend - Click here to learn more
螖 = absolute <relative> (impact), 酶 = not affected, ? = missing data
Powered by Codecov. Last update b3f52a9...fed0750. Read the comment docs.

@stale stale bot added the abandoned label Jul 15, 2020
@aragon aragon deleted a comment from stale bot Jul 15, 2020
@stale stale bot closed this Jul 23, 2020
@0xGabi 0xGabi reopened this Jul 27, 2020
@stale stale bot removed the abandoned label Jul 27, 2020
@stale stale bot added the abandoned label Aug 27, 2020
@aragon aragon deleted a comment from stale bot Aug 27, 2020
@stale stale bot removed the abandoned label Aug 27, 2020
@sohkai sohkai changed the title WIP Adds support for keys as non-array Keychain: adds support for private keys as non-array Aug 27, 2020
@sohkai sohkai merged commit e86d373 into master Aug 27, 2020
@sohkai sohkai deleted the keys-array branch August 27, 2020 11:33
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

5 participants