-
Notifications
You must be signed in to change notification settings - Fork 42
refactor(db-react): remove db prefix from hooks and helpers #538
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
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
samui-wallet-web | 9cfdc01 | Commit Preview URL Branch Preview URL |
Nov 20 2025, 06:06 PM |
caeeaad to
9fbf6a6
Compare
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.
Important
Looks good to me! 👍
Reviewed everything up to caeeaad in 2 minutes and 54 seconds. Click for details.
- Reviewed
1873lines of code in101files - Skipped
0files when reviewing. - Skipped posting
4draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. packages/settings/src/settings-feature-network-create.tsx:15
- Draft comment:
Navigation is not awaited. Instead of using a .then callback with navigate('/settings/networks'), refactor the async submission to use 'await navigate('/settings/networks')' for consistency with our async navigation guideline. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
2. packages/settings/src/settings-feature-wallet-update.tsx:32
- Draft comment:
The navigate call is used within a .then handler without an 'await'. Update the async submission to await the navigate call so that it properly reflects the promise-based behavior. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
3. packages/settings/src/settings-feature-general-warning-accept-experimental.tsx:15
- Draft comment:
The switch’s checked logic is inverted and relies on string values. Consider using a boolean state instead so that 'checked' directly reflects acceptance. This will simplify the onCheckedChange handler. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
4. packages/db-react/src/use-account-live.tsx:8
- Draft comment:
If a walletId is optionally provided, it should fall back to the activeWalletId from settings. Consider merging the parameter and the setting value (e.g., using 'const effectiveWalletId = walletId ?? activeWalletId') before using it in the query. - Reason this comment was not posted:
Comment was on unchanged code.
Workflow ID: wflow_XCNySfLy9OoodJeS
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
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.
Important
Looks good to me! 👍
Reviewed 9fbf6a6 in 2 minutes and 46 seconds. Click for details.
- Reviewed
1847lines of code in100files - Skipped
0files when reviewing. - Skipped posting
5draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. packages/settings/src/settings-feature-network-create.tsx:15
- Draft comment:
Ensure that the navigation call is awaited. Instead of chaining .then(() => { navigate('/settings/networks') }), refactor the submit handler to use async/await and call 'await navigate("/settings/networks")' for consistency with async navigation requirements. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
2. packages/settings/src/settings-feature-network-update.tsx:33
- Draft comment:
Await the navigation call after mutation completes. Replace the '.then(() => { navigate('/settings/networks') })' pattern with an async/await variant (e.g. 'await navigate("/settings/networks")') to follow the data router's promise requirement. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
3. packages/settings/src/settings-feature-wallet-update.tsx:31
- Draft comment:
Navigation in the async submit function should be awaited. Use 'await navigate(...)' instead of calling navigate directly within a .then() callback. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
4. packages/db-react/src/use-account-live.tsx:8
- Draft comment:
Consider using the activeWalletId obtained from the useSetting hook directly in the query function. Currently, the hook accepts an optional 'walletId' parameter but then retrieves 'activeWalletId' from settings and only uses the (possibly undefined) parameter in the query function. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
5. packages/settings/src/settings-feature-general-warning-accept-experimental.tsx:15
- Draft comment:
The Switch component's checked logic is inverted and may be confusing. It is clearer to use 'checked={warningAccepted === "true"}' and update onCheckedChange accordingly, rather than using 'warningAccepted !== "true"' and then inverting the checked value in the handler. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
Workflow ID: wflow_WBcGGIEMlGN2Ny65
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
92c2d01 to
751c7ad
Compare
9fbf6a6 to
9cfdc01
Compare
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.
Important
Looks good to me! 👍
Reviewed everything up to 9cfdc01 in 12 minutes and 31 seconds. Click for details.
- Reviewed
1817lines of code in98files - Skipped
0files when reviewing. - Skipped posting
5draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. packages/settings/src/settings-feature-network-create.tsx:15
- Draft comment:
Await the navigation promise. Instead of using.then(() => { navigate('/settings/networks') }), consider usingawait navigate('/settings/networks')in an async function. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
2. packages/settings/src/settings-feature-network-update.tsx:32
- Draft comment:
Await the navigate call after mutation. Replace the use of.then(() => { navigate('/settings/networks') })with an explicitawait navigate('/settings/networks')within an async function. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
3. packages/settings/src/settings-feature-wallet-update.tsx:11
- Draft comment:
Await the navigation after wallet update. Similar to network update, ensure that after mutation, the navigate call is awaited. - Reason this comment was not posted:
Comment was on unchanged code.
4. packages/settings/src/settings-feature-general-warning-accept-experimental.tsx:14
- Draft comment:
The switch logic appears inverted. While developer mode enables the switch withchecked={enabled === 'true'}, here the warning switch useschecked={warningAccepted !== 'true'}and toggles with${!checked}. Consider aligning the logic so that the switch’s checked state directly reflects the setting value. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
5. packages/db-react/src/use-account-live.tsx:8
- Draft comment:
Consider using the active wallet ID as a fallback. Currently, the query uses the provided 'walletId' parameter directly, even if it is undefined. Use a fallback likeconst idToUse = walletId ?? activeWalletIdbefore callingaccountFindByWalletId(db, idToUse). - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
Workflow ID: wflow_m7HWilQuMksFpVMr
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
Description
Simplifies naming of the hooks in
db-reactpackage by removing thedbprefix.Eg:
usDbSetting()->useSetting()Important
Refactor
db-reactpackage by removingdbprefix from hooks and helpers, updating file names, imports, and related components.dbprefix from hooks indb-reactpackage, e.g.,useDbSetting()touseSetting().use-account-active.tsx,use-account-create.tsx,use-account-delete.tsx,use-account-find-many.tsx,use-account-find-unique.tsx,use-account-live.tsx,use-account-set-active.tsx,use-account-update.tsx,use-network-active.tsx,use-network-create.tsx,use-network-delete.tsx,use-network-find-many.tsx,use-network-find-unique.tsx,use-network-live.tsx,use-network-update.tsx,use-reset.tsx,use-root-loader-data.tsx,use-setting-get-value-live.tsx,use-setting-get-value.tsx,use-setting-set-value.tsx,use-setting.tsx,use-wallet-create.tsx,use-wallet-delete.tsx,use-wallet-find-many.tsx,use-wallet-find-unique.tsx,use-wallet-live.tsx,use-wallet-set-active.tsx,use-wallet-update.tsx.dbprefix, e.g.,db-get-or-fetch.tsxtoget-or-fetch.tsx,db-account-options.tsxtooptions-account.tsx,db-network-options.tsxtooptions-network.tsx,db-setting-options.tsxtooptions-setting.tsx,db-wallet-options.tsxtooptions-wallet.tsx,db-query-client.tsxtoquery-client.tsx.db-loader.tsxand addroot-loader.tsx.account-schema.tsto use new import paths.solana-address-schema.test.tsto use new import paths.root-route-loader.tsxandshell-providers.tsxto use new import paths.shell-routes.tsxto use new import paths and loader function.This description was created by
for 9cfdc01. You can customize this summary. It will automatically update as commits are pushed.