-
Notifications
You must be signed in to change notification settings - Fork 33
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
Comments and minor improvements for utils.ts #83
base: staging
Are you sure you want to change the base?
Commits on Sep 6, 2023
-
feat(utils): improve error handling in checkResponseError
Refactored the checkResponseError function to handle Axios errors more effectively. Now, if an error response contains either an "error" or a "detail" property, it will throw an Error with the corresponding message. This change improves the error reporting and makes the code more robust. Closes cashubtc#123
Constantin Vennekel committedSep 6, 2023 Configuration menu - View commit details
-
Copy full SHA for 99b4083 - Browse repository at this point
Copy the full SHA 99b4083View commit details -
feat(utils): improve type checking in isObj function
The `isObj` function in the `utils.ts` file has been updated to provide more accurate type checking. Instead of simply checking if the value is an object, it now checks if the value is an object with a string key and unknown value. This change improves the reliability of type checking in the codebase, because in TypeScript, null is considered an object, which can lead to unexpected behavior.
Constantin Vennekel committedSep 6, 2023 Configuration menu - View commit details
-
Copy full SHA for cbed4b2 - Browse repository at this point
Copy the full SHA cbed4b2View commit details -
- added explainer comments - made check response error more concise
Constantin Vennekel committedSep 6, 2023 Configuration menu - View commit details
-
Copy full SHA for 985bcb3 - Browse repository at this point
Copy the full SHA 985bcb3View commit details
Commits on Sep 29, 2023
-
Merge branch 'main' into fix/ErrorHandling
Constantin Vennekel committedSep 29, 2023 Configuration menu - View commit details
-
Copy full SHA for 97f8924 - Browse repository at this point
Copy the full SHA 97f8924View commit details
Commits on Oct 9, 2023
-
Merge branch 'main' into fix/ErrorHandling
Constantin Vennekel committedOct 9, 2023 Configuration menu - View commit details
-
Copy full SHA for d2f4e41 - Browse repository at this point
Copy the full SHA d2f4e41View commit details -
feat(utils): add documentation
changes: - Exported `splitAmount`, `getDefaultAmountPreference`, `bytesToNumber`, `hexToNumber`, and `bigIntStringify` functions. - Added JSDoc comments for new functions: `isPowerOfTwo`, `getPreference`, and other utility functions. - Improved code readability by adding line breaks and indentation.
Constantin Vennekel committedOct 9, 2023 Configuration menu - View commit details
-
Copy full SHA for c4118e3 - Browse repository at this point
Copy the full SHA c4118e3View commit details
Commits on Apr 12, 2024
-
Merge branch 'main' into fix/ErrorHandling
Constantin Vennekel committedApr 12, 2024 Configuration menu - View commit details
-
Copy full SHA for 5559488 - Browse repository at this point
Copy the full SHA 5559488View commit details -
Fix error handling in splitAmount function
Added try-catch block to handle errors when getting preferences. Log error message if an exception occurs during preference retrieval.
Constantin Vennekel committedApr 12, 2024 Configuration menu - View commit details
-
Copy full SHA for 3d3d0e6 - Browse repository at this point
Copy the full SHA 3d3d0e6View commit details -
Refactor token decoding and prefix removal
- Refactored code to separate prefix removal logic into a new function. Updated getDecodedToken to utilize this function for removing prefixes before handling tokens.
Constantin Vennekel committedApr 12, 2024 Configuration menu - View commit details
-
Copy full SHA for a789bdc - Browse repository at this point
Copy the full SHA a789bdcView commit details -
Refactor keyset id derivation, proofs sorting, URL joining,
and invoice decoding functions. Add type annotations and cleanup code.
Constantin Vennekel committedApr 12, 2024 Configuration menu - View commit details
-
Copy full SHA for 130ce07 - Browse repository at this point
Copy the full SHA 130ce07View commit details -
Refactor isPowerOfTwo function for type safety
The isPowerOfTwo function in utils.ts was updated to include type annotations for better type safety. The return value now explicitly states the boolean type.
Constantin Vennekel committedApr 12, 2024 Configuration menu - View commit details
-
Copy full SHA for 53eb605 - Browse repository at this point
Copy the full SHA 53eb605View commit details -
Refactor bigIntStringify to handle non-bigint values
The function bigIntStringify now returns a stringified value using JSON.stringify for non-bigint values.
Constantin Vennekel committedApr 12, 2024 Configuration menu - View commit details
-
Copy full SHA for 8910261 - Browse repository at this point
Copy the full SHA 8910261View commit details
Commits on Apr 22, 2024
-
Merge remote-tracking branch 'cashubtc/staging' into fix/ErrorHandling
Constantin Vennekel committedApr 22, 2024 Configuration menu - View commit details
-
Copy full SHA for 31d61a2 - Browse repository at this point
Copy the full SHA 31d61a2View commit details