Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Improvements for Auth module #7832

Closed
Tracked by #7208
bobanm opened this issue Nov 30, 2022 · 0 comments · Fixed by #7864
Closed
Tracked by #7208

Improvements for Auth module #7832

bobanm opened this issue Nov 30, 2022 · 0 comments · Fixed by #7864
Assignees
Milestone

Comments

@bobanm
Copy link
Contributor

bobanm commented Nov 30, 2022

Functionality:

  • Refactor AuthModule.beforeCommandExecute() to always use only 1 get and 1 set store operation, instead of up to 2 gets and 2 sets.
  • RegisterMultisignatureCommand.verify(): Move sorting of optional keys after checking that mandatory keys are sorted

Tests:

  • Rename framework/test/unit/modules/auth/method.ts to method.spec.ts
  • Rename framework/test/unit/modules/auth/auth_module.ts into module.ts
  • Unskip Multi-signature registration transaction from module.spec.ts
  • beforeCommandExecute test initialize senderAccount with default values should use correct value for numberOfSignatures and asert all properties of the account
  • endpoint test suite verifyTransaction actually tests isValidSignature and should be renamed
@bobanm bobanm self-assigned this Nov 30, 2022
@Madhulearn Madhulearn added this to the Sprint 84 milestone Dec 5, 2022
shuse2 pushed a commit that referenced this issue Dec 8, 2022
### What was the problem?

This PR resolves #7832

### How was it solved?

Functionality:

- Refactored `AuthModule.beforeCommandExecute()` to always use only 1
get and 1 set store operation, instead of up to 2 gets and 2 sets.
- `RegisterMultisignatureCommand.verify()`: Moved sorting of optional
keys after checking that mandatory keys are sorted

Tests:

- Renamed `framework/test/unit/modules/auth/method.ts` to
`method.spec.ts`
- Renamed `framework/test/unit/modules/auth/auth_module.ts` into
`module.ts`
- Unskiped _Multi-signature registration transaction_ from
`module.spec.ts`
- `beforeCommandExecute` test _initialize senderAccount with default
values_ now uses correct value for `numberOfSignatures` and asserts all
properties of the account
- endpoint test suite `verifyTransaction` renamed to `isValidSignature`

### How was it tested?

All unit tests passed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants