chore: fix typos across codebase#3195
Conversation
Run typos spell checker across the entire codebase, fixing ~150 genuine typos in comments, docs, error messages, and variable names. Configure _typos.toml with allowlists for base58/hex false positives and legacy identifiers that cannot be renamed without breaking changes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Accidentally created by typos auto-fix. The original IndentityIdReplaceError.js is the file in use. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
✅ gRPC Query Coverage Report |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (13)
🚧 Files skipped from review as they are similar to previous changes (5)
📝 WalkthroughWalkthroughThis pull request comprehensively fixes spelling and typographical errors across the monorepo, spanning documentation, comments, variable names, test descriptions, and error messages. Changes are distributed across 60+ files with no functional or control-flow modifications. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
✅ DashSDKFFI.xcframework built for this PR.
SwiftPM (host the zip at a stable URL, then use): .binaryTarget(
name: "DashSDKFFI",
url: "https://your.cdn.example/DashSDKFFI.xcframework.zip",
checksum: "d627c12f99f9dbf4a74fb52c447403002764900ffa1df82a3d55a10d86399fd4"
)Xcode manual integration:
|
There was a problem hiding this comment.
Actionable comments posted: 12
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
packages/wallet-lib/src/types/Account/methods/getUnusedAddress.js (1)
11-11:⚠️ Potential issue | 🔴 CriticalCritical: Skip parameter functionality is not implemented correctly.
The
skipparameter is intended to skip a number of unused addresses, but the implementation has a logic error:
- Line 11:
skippedis initialized to0and never modified- Lines 37-50: The loop finds the first unused address without any skip logic
- Line 52: The condition
if (skipped < skip)will always beif (0 < skip)sinceskippednever changes- Line 53: Calls
this.getAddress(0)which doesn't match the intended skip behaviorThis means the
skipparameter has no effect. The loop should increment a counter and only return an address after skipping the specified number of unused addresses.🔧 Suggested fix to implement skip functionality
- let unused = { - address: '', - }; - const skipped = 0; + let unused = { + address: '', + }; + let skipped = 0; const { walletId } = this; const accountIndex = this.index; const { addresses } = this.storage.getWalletStore(walletId).getPathState(this.accountPath); const chainStore = this.storage.getChainStore(this.network); // We sort by type const sortedAddresses = { external: {}, internal: {}, }; Object .keys(addresses) .forEach((path) => { const splittedPath = path.split('/'); let pathType = 'external'; if (splittedPath.length > 1) { pathType = (splittedPath[splittedPath.length - 2] === '0') ? 'external' : 'internal'; } sortedAddresses[pathType][path] = addresses[path]; }); const keys = Object.keys(sortedAddresses[type]); for (let i = 0; i < keys.length; i += 1) { const key = keys[i]; const address = (sortedAddresses[type][key]); const addressState = chainStore.getAddress(address); if (!addressState || addressState.transactions.length === 0) { + if (skipped < skip) { + skipped += 1; + continue; + } const keychainData = this.keyChainStore.getMasterKeyChain().getForPath(key); unused = { address: keychainData.address.toString(), path: key, index: parseInt(key.split('/').splice(-1)[0], 10), }; break; } } - if (skipped < skip) { - unused = this.getAddress(skipped); - } if (unused.address === '') { return this.getAddress(accountIndex, type); } return unused;Also applies to: 37-54
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/wallet-lib/src/types/Account/methods/getUnusedAddress.js` at line 11, The getUnusedAddress method's skip logic is broken because the local variable skipped is initialized but never incremented, so the skip parameter has no effect; update the loop inside getUnusedAddress to increment skipped each time you encounter an unused address and only return (or call this.getAddress(index)) once skipped >= skip, ensuring you use the current iteration/index (e.g., the loop index or the found address index) when calling this.getAddress instead of hardcoding 0; adjust control flow so the method continues scanning until it has skipped the requested number of unused addresses and then returns the next unused one.
🧹 Nitpick comments (2)
packages/wallet-lib/src/types/Account/methods/getTransactionHistory.js (1)
7-8: Optional: Consider fixing camelCase inconsistency.
sortbyTimeDescending(line 7) uses a lowercase 'b', whilesortByHeightDescending(line 8) correctly uses uppercase 'B'. Since this PR is about fixing typos, this naming inconsistency could also be addressed. The function is internal (not exported), so renaming is safe.♻️ Proposed fix
-const sortbyTimeDescending = (a, b) => (b.time - a.time); +const sortByTimeDescending = (a, b) => (b.time - a.time);Also update the reference on line 81:
- return transactionHistory.sort(sortbyTimeDescending); + return transactionHistory.sort(sortByTimeDescending);As per coding guidelines: "Use camelCase for variables and functions in JS/TS".
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/wallet-lib/src/types/Account/methods/getTransactionHistory.js` around lines 7 - 8, Rename the mis-cased function sortbyTimeDescending to camelCase sortByTimeDescending and update all its usages (e.g., the call site that currently references sortbyTimeDescending near where sorting is applied) so it matches the correct identifier; keep sortByHeightDescending as-is for consistency with camelCase naming. Ensure only the internal function name and its references are changed (no API/export changes).packages/wallet-lib/src/types/Account/methods/getUnusedAddress.js (1)
27-27: Consider renamingsplittedPathto fix grammatical error.The variable name uses "splitted", but the correct past tense of "split" is "split". Consider renaming to
splitPathorpathPartsfor grammatical correctness. Since this is a local variable, the change wouldn't introduce breaking changes.📝 Suggested naming improvements
- const splittedPath = path.split('/'); + const splitPath = path.split('/'); let pathType = 'external'; - if (splittedPath.length > 1) { - pathType = (splittedPath[splittedPath.length - 2] === '0') ? 'external' : 'internal'; + if (splitPath.length > 1) { + pathType = (splitPath[splitPath.length - 2] === '0') ? 'external' : 'internal'; }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/wallet-lib/src/types/Account/methods/getUnusedAddress.js` at line 27, Rename the local variable `splittedPath` to a grammatically correct name (e.g., `splitPath` or `pathParts`) inside the getUnusedAddress function in getUnusedAddress.js; update every occurrence (declaration and uses) of `splittedPath` to the chosen name so references like `const splittedPath = path.split('/')` become `const splitPath = path.split('/')` (and subsequent indexing or operations use `splitPath`) to avoid breaking behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/dapi/doc/architecture.md`:
- Line 210: Fix the typo "officaially" to "officially" in the sentence that
begins "DAPI is designed to be deployed on masternode. The preferred and
officaially supported way is to use [dashmate]..." (update the string in the
markdown content so it reads "officially"); ensure the corrected sentence now
reads "The preferred and officially supported way is to use [dashmate]..." to
match the prior "preferred" correction.
In `@packages/dashmate/docs/services/dashmate_helper.md`:
- Around line 5-6: Replace the ungrammatical sentence "Both CLI and Helper using
Docker to manage containers and services defined in docker-compose files." in
the docs entry so it includes a verb; for example change it to "Both the CLI and
the Helper use Docker to manage containers and services defined in
docker-compose files." Ensure the definite article "the" and the plural verb
"use" are applied to "CLI" and "Helper" to fix subject–verb agreement.
In `@packages/js-dapi-client/lib/transport/ReconnectableStream.js`:
- Line 217: In ReconnectableStream.js, update the inline comment inside the
ReconnectableStream retry/error-handling logic (around the UNKNOWN error
handling) to fix the typo: change "HASH" (and any "HACH") to "HACK" so the
comment correctly reads that this is a hack/workaround for grpc-web behavior;
locate the comment within the ReconnectableStream class's error handling (e.g.,
the method handling UNKNOWN errors/retries) and replace the word only.
In `@packages/js-grpc-common/lib/utils/semanticVersioningConversion.js`:
- Line 2: Update the docstring in
packages/js-grpc-common/lib/utils/semanticVersioningConversion.js to fix the
grammatical typo: replace "an 32-bit integer" with "a 32-bit integer" in the top
comment describing the conversion function (the comment that begins "Convert a
semantic versioning string into ...").
In `@packages/rs-drive-abci/src/platform_types/mod.rs`:
- Line 5: Fix the documentation comment that contains a duplicated word by
changing "/// A clean version of the the request to finalize a block" to "/// A
clean version of the request to finalize a block"; locate the doc comment in
mod.rs (the triple-slash comment immediately above the type or item describing
the "clean version" of the request) and update the text accordingly.
In `@packages/rs-sdk/tests/fetch/config.rs`:
- Around line 20-22: Update the doc comment to reflect the actual .env location:
change the path reference from `${CARGO_MANIFEST_DIR}/.env` to
`${CARGO_MANIFEST_DIR}/tests/.env` in the comment that documents Config::new()
and retain mention of the DASH_SDK_ prefix (Config::CONFIG_PREFIX) so the
documentation matches the runtime behavior in Config::new().
In `@packages/rs-sdk/tests/fetch/contested_resource.rs`:
- Around line 373-374: Fix the typo in the doc comment for the helper: change
the misspelled word "prerequsities" to "prerequisites" in the comment above the
function check_mn_voting_prerequisites so the summary line correctly reads
"Ensure prerequisites for masternode voting tests are met".
- Around line 374-375: The fixture directory name does not match the updated
namespace used by the test: update the fixtures so
setup_api("check_mn_voting_prerequisites") can find them by renaming the
mis‑spelled fixture folder to the corrected name
"check_mn_voting_prerequisites"; ensure the directory name exactly matches the
string passed to setup_api and that any CI/offline test references are updated
to the corrected folder name so the vectors load during tests (look for the
fixtures used by the check_mn_voting_prerequisites test and the setup_api
helper).
In `@packages/wallet-lib/docs/wallet/exportWallet.md`:
- Line 2: Reword the description sentence for the exportWallet documentation to
clearly state that the wallet will be exported in a default format determined by
how the wallet was initialized (for example, "mnemonic" or "HDPubKey"), e.g.
replace the existing line with a concise sentence like: "Exports the wallet
using the default output format, which is determined by how the wallet was
initialized (e.g., mnemonic, HDPubKey)." Refer to the exportWallet method/docs
when making this change.
In `@packages/wallet-lib/src/types/Account/methods/broadcastTransaction.js`:
- Line 26: Update the comment in broadcastTransaction.js near the
broadcastTransaction logic to fully correct the grammar: change the line that
currently reads "We iterate out input to subtract their balance." to a clear
phrasing such as "We iterate over the inputs to subtract their balances." —
locate the comment inside the broadcastTransaction function in
packages/wallet-lib/src/types/Account/methods/broadcastTransaction.js and
replace the sentence to use "iterate over inputs" and plural "balances" to match
intent.
In `@packages/wallet-lib/src/types/Account/methods/getAddress.js`:
- Line 4: Fix the JSDoc summary for the getAddress method: replace the phrase
"Get a specific addresses based on the index and type of address." with the
singular form "Get a specific address based on the index and type of address."
so the documentation correctly reflects that getAddress returns one address.
In `@packages/wallet-lib/src/utils/coinSelections/index.js`:
- Line 5: The require currently imports the legacy error class with the
misspelled message ("Unsufficient utxos ..."), so update the actual error class
in the module exported by '../../errors/CoinSelectionUnsufficientUTXOS' to use
the corrected message ("Insufficient utxos ...") in its constructor (or
alternatively revert this file to require the legacy name and message
consistently); ensure the exported class name and constructor message match the
new variable CoinSelectionInsufficientUTXOS and the test expectation in
coinSelection.spec.js.
---
Outside diff comments:
In `@packages/wallet-lib/src/types/Account/methods/getUnusedAddress.js`:
- Line 11: The getUnusedAddress method's skip logic is broken because the local
variable skipped is initialized but never incremented, so the skip parameter has
no effect; update the loop inside getUnusedAddress to increment skipped each
time you encounter an unused address and only return (or call
this.getAddress(index)) once skipped >= skip, ensuring you use the current
iteration/index (e.g., the loop index or the found address index) when calling
this.getAddress instead of hardcoding 0; adjust control flow so the method
continues scanning until it has skipped the requested number of unused addresses
and then returns the next unused one.
---
Nitpick comments:
In `@packages/wallet-lib/src/types/Account/methods/getTransactionHistory.js`:
- Around line 7-8: Rename the mis-cased function sortbyTimeDescending to
camelCase sortByTimeDescending and update all its usages (e.g., the call site
that currently references sortbyTimeDescending near where sorting is applied) so
it matches the correct identifier; keep sortByHeightDescending as-is for
consistency with camelCase naming. Ensure only the internal function name and
its references are changed (no API/export changes).
In `@packages/wallet-lib/src/types/Account/methods/getUnusedAddress.js`:
- Line 27: Rename the local variable `splittedPath` to a grammatically correct
name (e.g., `splitPath` or `pathParts`) inside the getUnusedAddress function in
getUnusedAddress.js; update every occurrence (declaration and uses) of
`splittedPath` to the chosen name so references like `const splittedPath =
path.split('/')` become `const splitPath = path.split('/')` (and subsequent
indexing or operations use `splitPath`) to avoid breaking behavior.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 54d3efa6-82de-47d3-b107-fe1c65033f71
⛔ Files ignored due to path filters (1)
packages/dashmate/templates/platform/drive/tenderdash/config.toml.dotis excluded by!**/*.dot
📒 Files selected for processing (78)
.github/actions/s3-layer-cache-settings/action.yaml.gitignoreDockerfiledocs/DOCKER.mdpackages/dapi/README.mdpackages/dapi/doc/architecture.mdpackages/dapi/test/unit/transactionsFilter/TransactionHashesCache.spec.jspackages/dash-spv/test/index.jspackages/dashmate/configs/getConfigFileMigrationsFactory.jspackages/dashmate/docs/services/dashmate_helper.mdpackages/dashmate/src/listr/tasks/setup/local/enableCoreQuorumsTaskFactory.jspackages/js-dapi-client/.npmignorepackages/js-dapi-client/lib/transport/ReconnectableStream.jspackages/js-dash-sdk/docs/examples/generate-a-new-mnemonic.mdpackages/js-dash-sdk/src/SDK/Client/Platform/methods/documents/get.tspackages/js-grpc-common/lib/server/checks/checkVersionWrapperFactory.jspackages/js-grpc-common/lib/utils/semanticVersioningConversion.jspackages/js-grpc-common/test/integration/loadPackageDefinition.spec.jspackages/platform-test-suite/test/e2e/contacts.spec.jspackages/rs-dapi-client/src/executor.rspackages/rs-dapi-client/src/lib.rspackages/rs-dapi-client/src/transport/grpc.rspackages/rs-dapi/doc/DESIGN.mdpackages/rs-dapi/src/services/streaming_service/zmq_listener.rspackages/rs-dpp/src/util/cbor_value/mod.rspackages/rs-drive-abci/src/abci/handler/info.rspackages/rs-drive-abci/src/abci/handler/prepare_proposal.rspackages/rs-drive-abci/src/abci/handler/process_proposal.rspackages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_identities/mod.rspackages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/tests/document/creation.rspackages/rs-drive-abci/src/platform_types/mod.rspackages/rs-drive-proof-verifier/src/from_request.rspackages/rs-drive/src/config.rspackages/rs-drive/src/error/document.rspackages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_transfer_transition_action/mod.rspackages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_direct_purchase_transition_action/v0/transformer.rspackages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_set_price_for_direct_purchase_transition_action/v0/transformer.rspackages/rs-drive/src/util/batch/drive_op_batch/finalize_task.rspackages/rs-platform-value/src/replace.rspackages/rs-sdk/tests/fetch/config.rspackages/rs-sdk/tests/fetch/contested_resource.rspackages/rs-sdk/tests/fetch/contested_resource_identity_votes.rspackages/rs-sdk/tests/fetch/contested_resource_polls_by_ts.rspackages/rs-sdk/tests/fetch/contested_resource_vote_state.rspackages/rs-sdk/tests/fetch/contested_resource_voters.rspackages/rs-sdk/tests/fetch/prefunded_specialized_balance.rspackages/simple-signer/src/signer.rspackages/wallet-lib/docs/plugins/using-a-plugin.mdpackages/wallet-lib/docs/plugins/writing-a-new-plugin.mdpackages/wallet-lib/docs/usage/events.mdpackages/wallet-lib/docs/wallet/exportWallet.mdpackages/wallet-lib/examples/offline-wallet.jspackages/wallet-lib/src/CONSTANTS.jspackages/wallet-lib/src/plugins/Worker.spec.jspackages/wallet-lib/src/transport/DAPIClientTransport/methods/subscribeToAddressesTransactions.jspackages/wallet-lib/src/transport/FixtureTransport/methods/subscribeToAddressesTransactions.jspackages/wallet-lib/src/types/Account/_sortPlugins.jspackages/wallet-lib/src/types/Account/methods/broadcastTransaction.jspackages/wallet-lib/src/types/Account/methods/createTransaction.spec.jspackages/wallet-lib/src/types/Account/methods/getAddress.jspackages/wallet-lib/src/types/Account/methods/getTransactionHistory.jspackages/wallet-lib/src/types/Account/methods/getUnusedAddress.jspackages/wallet-lib/src/types/Storage/_configureAdapter.jspackages/wallet-lib/src/types/Wallet/methods/sweepWallet.jspackages/wallet-lib/src/utils/bip44/getMissingIndexes.jspackages/wallet-lib/src/utils/bip44/isContiguousPath.jspackages/wallet-lib/src/utils/coinSelection.spec.jspackages/wallet-lib/src/utils/coinSelections/TransactionEstimator.jspackages/wallet-lib/src/utils/coinSelections/index.jspackages/wallet-lib/src/utils/coinSelections/strategies/simpleAscendingAccumulator.jspackages/wallet-lib/src/utils/coinSelections/strategies/simpleAscendingAccumulator.spec.jspackages/wallet-lib/src/utils/coinSelections/strategies/simpleDescendingAccumulator.jspackages/wallet-lib/src/utils/coinSelections/strategies/simpleDescendingAccumulator.spec.jspackages/wallet-lib/tests/integration/types/Wallet.spec.jspackages/wasm-dpp/src/document/extended_document.rspackages/wasm-dpp/src/errors/from.rspackages/wasm-dpp/test/integration/dataContract/validation/validateDataContractFactory.spec.jspackages/wasm-dpp2/tests/unit/DataContract.spec.ts
packages/wallet-lib/src/types/Account/methods/broadcastTransaction.js
Outdated
Show resolved
Hide resolved
- Fix "officaially" -> "officially" in dapi architecture docs - Fix "HASH" -> "HACK" in ReconnectableStream.js comment (workaround) - Fix "the the" -> "the" in rs-drive-abci platform_types doc comment - Fix .env path in rs-sdk config doc comment to match actual code - Fix "prerequsities" -> "prerequisites" in contested_resource doc - Rename fixture directory to match corrected function name - Fix "iterate out input" -> "iterate over the inputs" in broadcastTransaction - Fix "a specific addresses" -> "a specific address" in getAddress JSDoc - Revert variable rename in coinSelections/index.js to match legacy class Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The typos auto-fix incorrectly changed "Whth" to "With" inside a base58-encoded identity ID string, breaking the test assertion. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
QuantumExplorer
left a comment
There was a problem hiding this comment.
Reviewed (PR made by AI)
Issue being fixed or feature implemented
Various typos in comments, docs, error messages, and identifiers across the codebase.
What was done?
Fixed ~150 typos found by the typos spell checker across 80 files. Examples:
compolation->compilationprerequisities->prerequisitesoverriden->overriddenimplemtation->implementationcachable->cacheablebianry->binaryenviroment->environmentthreeshold->thresholdpurchaseing->purchasingsplited->splitLegacy identifiers with typos in their names (
CoinSelectionUnsufficientUTXOS,IndentityIdReplaceError) are left as-is to avoid breaking changes.How Has This Been Tested?
typosspell checker passes with zero errors after fixes.Breaking Changes
None. Only comments, docs, and internal string literals are changed.
Checklist
For repository code-owners and collaborators only
🤖 Generated with Claude Code
Summary by CodeRabbit
Documentation
Chores