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

Implementing wallet.createWallet #16

Merged
merged 4 commits into from
May 17, 2024
Merged

Conversation

erdimaden
Copy link
Contributor

What changed? Why?

Implementing wallet.createWallet

Qualified Impact

expect(user.toString()).toBe("User{ userId: 123 }");
});

it("should able to get faucet funds", async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
it("should able to get faucet funds", async () => {
it("should be able to get faucet funds", async () => {

/**
* Returns the wallet model with the given ID.
*
* @param walletId - The ID of the wallet to fetch
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* @param walletId - The ID of the wallet to fetch
* @param walletId - The ID of the wallet to fetch.

*
* @param walletId - The ID of the wallet to fetch
* @param options - Override http request option.
* @throws {APIError}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* @throws {APIError}
* @throws {APIError} If the request fails.

Comment on lines +31 to +32
* @throws {InternalError} - If address derivation or caching fails.
* @returns the new Wallet
Copy link
Contributor

Choose a reason for hiding this comment

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

Lets be consistent on if we add the - or not. Also for ending doc strings with period

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No need to use - for @throws or @return. However, it is necessary to use - for @params. I will investigate how we can extend this functionality.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Tracking with PSDK-135

Comment on lines -91 to +100
private deriveKey(): ETHWallet {
private deriveKey(): HDKey {
Copy link
Contributor

Choose a reason for hiding this comment

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

Not blocking but it would be nice for us to continue using ethers.Wallet for the Key since that is what will be required to pass to the Address constructor. We can come up with a story for this in the Address.Transfer PR if you prefer not to block.

Comment on lines -69 to -70
*/
public getPublicKey(): string {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@yuga-cb's feedback

Comment on lines +31 to +32
* @throws {InternalError} - If address derivation or caching fails.
* @returns the new Wallet
Copy link
Contributor Author

Choose a reason for hiding this comment

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

No need to use - for @throws or @return. However, it is necessary to use - for @params. I will investigate how we can extend this functionality.

@John-peterson-coinbase John-peterson-coinbase merged commit 2670112 into master May 17, 2024
4 checks passed
@erdimaden erdimaden deleted the feat/create-Wallet branch June 21, 2024 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants