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

QA file-restructure #247

Merged
merged 25 commits into from
Oct 22, 2024
Merged

QA file-restructure #247

merged 25 commits into from
Oct 22, 2024

Conversation

mixmix
Copy link
Contributor

@mixmix mixmix commented Oct 1, 2024

  • a script for testing CLI
  • some gotchas!
  • WIP bugs!

PLEASE review + merge #250 first (makes this PR smaller)

@mixmix mixmix marked this pull request as draft October 1, 2024 04:05
tests/cli.test.sh Outdated Show resolved Hide resolved
src/transfer/command.ts Outdated Show resolved Hide resolved
tests/cli.test.sh Outdated Show resolved Hide resolved
@mixmix mixmix requested a review from frankiebee October 2, 2024 03:16
@mixmix mixmix marked this pull request as ready for review October 2, 2024 03:16
Comment on lines +81 to +88
const accounts = await config.get()
.then(storedConfig => EntropyAccount.list(storedConfig))
.catch((err) => {
if (err.message.includes('currently no accounts')) return []

throw err
})

Copy link
Contributor Author

@mixmix mixmix Oct 2, 2024

Choose a reason for hiding this comment

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

CHANGE: entropy account ls

If I don't have any accounts yet I don't expect an error, I expect []

@@ -35,7 +38,8 @@ function entropyAccountCreate () {

cliWrite({
name: newAccount.name,
address: newAccount.address
address: newAccount.address,
verifyingKeys: []
Copy link
Contributor Author

@mixmix mixmix Oct 2, 2024

Choose a reason for hiding this comment

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

PATCH:

entropy account create
entropy account create

Have them output the same format as entropy account ls
✔️ consistency
✔️ set up expectations that there is something interesting/ important meant to go in here

const fullAccount = keyring.getAccount()
// TODO: sdk should create account on constructor
const { admin } = keyring.getAccount()
const data = fixData(fullAccount)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is a bug in the SDK where you are "cloning" with `JSON.parse(JSON.stringify(obj)) and it fucks up the Uint8Array, which then fucks up config, logging etc.

This is a quick hack

@@ -49,7 +49,7 @@ export class EntropyAccount extends EntropyBase {
return accounts.map((account: EntropyAccountConfig) => ({
name: account.name,
address: account.address,
verifyingKeys: account?.data?.admin?.verifyingKeys
verifyingKeys: account?.data?.registration?.verifyingKeys || []
Copy link
Contributor Author

Choose a reason for hiding this comment

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

🔥 CHECK?
I assume verifyingKeys were meant to go under registration and not admin right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

AH tests say no. I don't know what the difference is between `admin + registration.
I changed where vks are being pushed into elsewhere in code too

Copy link
Contributor Author

Choose a reason for hiding this comment

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

changed tests

src/common/masking.ts Outdated Show resolved Hide resolved
src/common/utils-cli.ts Outdated Show resolved Hide resolved
src/common/utils-cli.ts Outdated Show resolved Hide resolved
src/config/encoding.ts Outdated Show resolved Hide resolved
src/config/index.ts Outdated Show resolved Hide resolved
tests/qa.sh Outdated Show resolved Hide resolved
tests/qa.sh Outdated Show resolved Hide resolved
@mixmix mixmix changed the title WIP: QA file-restructure QA file-restructure Oct 2, 2024
@mixmix
Copy link
Contributor Author

mixmix commented Oct 2, 2024

Checklist

  • fix failing CI
    • clarify where the verifyingKeys should be stored on an account
    • probably document account anatomy
  • deal with argParser / default collision

Base automatically changed from naynay/file-restructure to dev October 2, 2024 21:47
@mixmix mixmix changed the base branch from dev to mixmix/fix-masking October 3, 2024 00:26
Base automatically changed from mixmix/fix-masking to dev October 3, 2024 21:39
@rh0delta
Copy link
Contributor

@mixmix similar for this PR, need to rebase off of current version of dev.

@mixmix mixmix changed the base branch from dev to mixmix/fix-cli-opts October 20, 2024 22:31
@mixmix
Copy link
Contributor Author

mixmix commented Oct 20, 2024

@rh0delta DONE!

Base automatically changed from mixmix/fix-cli-opts to dev October 21, 2024 18:04
tests/cli.test.sh Outdated Show resolved Hide resolved
src/config/types.ts Outdated Show resolved Hide resolved
@mixmix mixmix merged commit f5a1fd9 into dev Oct 22, 2024
2 checks passed
@mixmix mixmix deleted the mixmix/file-restructure/QA branch October 22, 2024 00:26
@github-actions github-actions bot locked and limited conversation to collaborators Oct 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants