-
Notifications
You must be signed in to change notification settings - Fork 41
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 initial version of Wallet Class #13
Conversation
- new eslint rules for JSDocs - base_sepolia usage replaced with Coinbase.networkList.BaseSepolia - Adding base Wallet class and test cases
9aa8a2b
to
3e39c02
Compare
3e39c02
to
13e9211
Compare
src/coinbase/coinbase.ts
Outdated
* @constant | ||
*/ | ||
static networkList = { | ||
BaseSepolia: "base_sepolia", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BaseSepolia: "base_sepolia", | |
BaseSepolia: "base-sepolia", |
src/coinbase/tests/wallet_test.ts
Outdated
it("should return the correct string representation", async () => { | ||
const wallet = await Wallet.init(VALID_WALLET_MODEL, client); | ||
expect(wallet.toString()).toBe( | ||
`Wallet{id: '${VALID_WALLET_MODEL.id}', networkId: 'base_sepolia'}`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
`Wallet{id: '${VALID_WALLET_MODEL.id}', networkId: 'base_sepolia'}`, | |
`Wallet{id: '${VALID_WALLET_MODEL.id}', networkId: 'base-sepolia'}`, |
src/coinbase/types.ts
Outdated
* @param {CreateWalletRequest} [createWalletRequest] - The wallet creation request. | ||
* @param {RawAxiosRequestConfig} [options] - Axios request options. | ||
* @throws {APIError} If the request fails. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no longer necessary to type the JSDOC
src/coinbase/types.ts
Outdated
* @param {string} walletId - The ID of the wallet the address belongs to. | ||
* @param {string} addressId - The onchain address of the address that is being fetched. | ||
* @param {AxiosRequestConfig} [options] - Axios request options. | ||
* @throws {APIError} If the request fails. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
types no longer necessary in JSDOC
src/coinbase/types.ts
Outdated
* @returns {AxiosPromise<UserModel>} - A promise resolvindg to the User model. | ||
* @throws {APIError} If the request fails. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
types no longer necessary in JSDOC
src/coinbase/utils.ts
Outdated
* @param {Uint8Array} key - The key to convert. | ||
* @returns {string} The converted hex string. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no longer need typing in the JSDOC param and return
What changed? Why?
Updated ESLint rules to enforce proper JSDoc comments.
New format for JSDoc comments:
base_sepolia
usage changedInitial Version of Wallet Class and Test Cases
Qualified Impact