Skip to content

Conversation

@NueloSE
Copy link

@NueloSE NueloSE commented Nov 24, 2024

closes #458

@NueloSE NueloSE marked this pull request as ready for review November 24, 2024 06:03
Copy link
Member

@h0ngcha0 h0ngcha0 left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution. Only minor comments.

const wallet = PrivateKeyWallet.Random()
expect(wallet.address).toBeDefined()
expect(wallet.publicKey).toBeDefined()
expect(wallet.address.length).toBeGreaterThan(0)
Copy link
Member

Choose a reason for hiding this comment

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

Lets verify the exact length of address and publicKey here.


expect(signature).toBeDefined()
expect(typeof signature).toBe('string')
// Optionally add more checks to validate the signature
Copy link
Member

Choose a reason for hiding this comment

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

Please verify if the signature is valid, we can use the verifySignature function.

@NueloSE NueloSE requested a review from h0ngcha0 November 27, 2024 14:05
Copy link
Member

@h0ngcha0 h0ngcha0 left a comment

Choose a reason for hiding this comment

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

LGTM 👍

})

it('should handle large messages for encryption and decryption', () => {
const largeMessage = 'A'.repeat(1_000_000) // 1 MB of data
Copy link

@pragmaxim pragmaxim Dec 3, 2024

Choose a reason for hiding this comment

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

I'd be happy with 500_000 since this single test takes 700ms (on CI it could be twice as much) and it would add up a lot in the big picture, I guess that supporting 0.5MB messages is enough

@NueloSE NueloSE requested a review from pragmaxim December 3, 2024 10:38
@NueloSE
Copy link
Author

NueloSE commented Dec 3, 2024

changed @pragmaxim

Copy link

@pragmaxim pragmaxim left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@NueloSE
Copy link
Author

NueloSE commented Dec 3, 2024

okay ser will it be merged? @pragmaxim

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.

Improve Test Coverage for packages/web3-wallet/src

3 participants