Files
2087a73a06 feat(Hypernative): tx queue scanner (#6998)
* feat(Hypernative): login banner for tx queue (#6997)

* refactor: show HN login card in tx queue

* style(HnLoginCard): adjust alert icon and action padding for improved layout (WA-1182)

* style: enhance HN login card styles for better responsiveness (WA-1207)

* fix(Hypernative): only show login card for Safe signers (WA-1206)

* feat(Hypernative): integrate batch assessment endpoint (#6965)

* refactor(Hypernative): update PKCE cookie handling and mock token expiry

- Renamed TOKEN_EXPIRES_IN to PKCE_COOKIE_EXPIRES_IN for clarity.
- Updated getCookieOptions to getPkceCookieOptions for better specificity.
- Introduced MOCK_AUTH_TOKEN_EXPIRES_IN for mock authentication token expiry.
- Adjusted token setting in mock authentication to use the new expiry constant.

* feat: integrate Hypernative batch assessment endpoint

- Add batch assessment API endpoint (POST /safe/assessments) to retrieve existing assessments by transaction hash
- Create useThreatAnalysisHypernativeBatch hook for batch threat analysis
- Add buildHypernativeBatchRequestData utility to validate and build batch requests
- Implement deep comparison in hook to avoid unnecessary rebuilds when hash values are unchanged
- Update DTOs with batch assessment request/response types and error handling
- Add comprehensive test coverage for batch assessment functionality

The batch endpoint allows fetching multiple assessment results in a single API call, improving performance when analyzing multiple transactions.

* refactor: replace lodash.isEqual with lightweight array comparison

Replace lodash.isEqual with native array comparison for hash arrays to improve
performance. Add tests to verify request deduplication works correctly for
same hashes in different orders and when array references change.

* refactor: replace Map with direct array lookup in batch response processing

Use array.find() instead of creating a Map for small response arrays to avoid
unnecessary object creation on every render.

* refactor: memoize authToken error results in useThreatAnalysisHypernativeBatch

Move missing authToken handling into useMemo to prevent creating new results
objects on every render. Add authToken to dependencies array.

* refactor: replace type assertion with type predicate in buildHypernativeBatchRequestData

Replace unsafe type assertion with explicit type predicate function for safer
type narrowing when filtering transaction hashes.

* feat: update signature state badge (#6968)

* feat: update signature state badge

Signed-off-by: dsh <[email protected]>

* fix: smoke-tests fixtures update

Signed-off-by: dsh <[email protected]>

* Update apps/web/src/components/transactions/TxStatusChip/index.tsx

Co-authored-by: Tim <[email protected]>

* fix: update snapshot

Signed-off-by: dsh <[email protected]>

---------

Signed-off-by: dsh <[email protected]>
Co-authored-by: Tim <[email protected]>

* feat: Expand HN eligibility check to targeted safes (#7002)

* chore(deps): bump actions/upload-artifact from 4 to 6 (#6996)

Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 6.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v4...v6)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* fix(e2e): refactor Add Owner Happy Path (#6988)

* feat: Expand HN eligibility check to targetd safes

Signed-off-by: dsh <[email protected]>

* fix: Missing loading state for outreach query

Signed-off-by: dsh <[email protected]>

* fix: add allowlist check to txreport button

Signed-off-by: dsh <[email protected]>

* fix: rebase hnscanner

Signed-off-by: dsh <[email protected]>

* fix: split guard and allowlist

Signed-off-by: dsh <[email protected]>

---------

Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: dsh <[email protected]>

Co-authored-by: Liliya Soroka <[email protected]>

* feat(Hypernative): tx queue scanning (#7003)

* feat: add useQueueBatchAssessments hook for Hypernative queue assessments

Extract safeTxHashes from queue pages and fetch batch assessments via existing batch API.

* feat(Hypernative): add QueueAssessmentProvider component and context

Introduced the QueueAssessmentProvider component to fetch and provide batch assessments for queue pages via context. This includes the creation of the QueueAssessmentContext for managing assessment data and loading state, enhancing the functionality of the Hypernative feature set.

* feat: enhance pagination with page load callbacks

Added onPageLoaded and onPagesChange callbacks to the PaginatedTxns component to notify parent components when pages are loaded and when the list of pages changes. This improves the handling of transaction pages and allows for better integration with the QueueAssessmentProvider for batch assessments.

* fix: update lock-small.svg and AnalysisGroupCardDisabled component

Modified the lock-small.svg to change the fill color of paths to 'currentColor' for better adaptability in different contexts. Updated the AnalysisGroupCardDisabled component to simplify the SvgIcon usage, ensuring consistent styling with the new color scheme.

* feat(Hypernative): add HnQueueAssessment component and integrate assessment into TxSummary

Introduced the HnQueueAssessment component to display security assessments for transactions. Updated the TxSummary component to conditionally render the assessment based on transaction status and user authentication. Enhanced styles to accommodate the new assessment display in transaction summaries. Added a new hook, useQueueAssessment, to fetch assessment data based on transaction hashes.

* fix: update snapshots

* feat(Hypernative): integrate HnQueueAssessmentBanner and update transaction details

Added the HnQueueAssessmentBanner component to display security assessment alerts in transaction details. Enhanced the TxDetails and TxSummary components to conditionally render the banner based on transaction status and user authentication. Introduced the useShowHypernativeAssessment hook to streamline assessment visibility logic. Updated utility functions for building security report URLs.

* feat(Hypernative): enhance HnQueueAssessmentBanner with login prompt and severity messaging

Updated the HnQueueAssessmentBanner component to include a login prompt for users not authenticated with Hypernative. Introduced severity-based messaging and alert styles to improve user feedback on security assessment results. Refactored the alert rendering logic to utilize new constants for severity messages and alert types.

* fix: code formatting

* fix: update storybook snapshots

* fix: prevent infinite loop in PaginatedTxns TxPage component

Memoize handlePageLoaded callback and add state change check to prevent
unnecessary re-renders that caused "Maximum update depth exceeded" errors.

* fix: prevent infinite loop in useAuthToken hook

Memoize checkAuthState callback and add state change check to prevent
unnecessary re-renders during authentication state polling.

* fix: add missing dependency to useMemo

* fix: adjust grid layout in TxSummary styles for improved responsiveness

Updated CSS variables for grid dimensions in the TxSummary component to enhance layout responsiveness. Adjusted column sizes for better alignment and visual consistency across different screen sizes.

* fix(HnQueueAssessment): wrap unavailable state message in tooltip for better user guidance

Updated the HnQueueAssessment component to display a tooltip with a login prompt for users not authenticated with Hypernative. This enhances user experience by providing clearer instructions on accessing security scan results.

* refactor(Hypernative): simplify assessment URL handling in components

Removed direct dependencies on chainId and safeAddress from HnQueueAssessment and HnQueueAssessmentBanner components. Introduced useAssessmentUrl hook to encapsulate URL construction logic, enhancing code clarity and maintainability. Updated TxDetails and TxSummary components to reflect these changes.

* refactor(TxDetails): remove HnSecurityReportBtn component

Eliminated the HnSecurityReportBtnForTxDetails component from TxDetailsBlock as it is replaced by the new HnQueueAssessment banner.

* fix: code formatting

* refactor(HnQueueAssessment): extract severity logic into custom hook

Introduced useHnAssessmentSeverity hook to encapsulate severity extraction logic from assessment results, simplifying the HnQueueAssessment and HnQueueAssessmentBanner components. This change enhances code readability and maintainability by reducing duplication and centralizing severity management.

* refactor: use new hook for HN eligibility checks

Replaced useIsHypernativeGuard with useIsHypernativeEligible in QueueAssessmentProvider and useShowHypernativeAssessment hooks to improve clarity. Updated logic to utilize the new eligibility hook, ensuring consistent checks across components. Added unit tests for useShowHypernativeAssessment to validate eligibility conditions.

* feat(Hypernative): put queue scanning behind feature flag (#7004)

* feat(Hypernative): add new feature flag HYPERNATIVE_QUEUE_SCAN

Introduced the useIsHypernativeQueueScanFeature hook to check if the Hypernative queue scan feature is enabled on the current chain. Updated the index file to export this new hook, enhancing the Hypernative feature set.

* feat(Hypernative): update QueueAssessmentProvider to utilize new feature flag

Modified the QueueAssessmentProvider component to incorporate the useIsHypernativeQueueScanFeature hook, adjusting the logic for fetching batch assessments based on the new feature flag. This change enhances the conditional rendering of assessments, ensuring that the component behaves correctly based on the feature's availability.

* feat(Hypernative): integrate queue scan feature into assessment logic

Updated the useShowHypernativeAssessment hook to include the useIsHypernativeQueueScanFeature hook, enhancing the conditional checks for displaying assessments. Added corresponding tests to ensure correct behavior when the queue scan feature is enabled or disabled.

* feat(Hypernative): enhance queue logic with Hypernative queue scan feature

Integrated the useIsHypernativeQueueScanFeature hook into the Queue component, refining the conditions for displaying the HnLoginCard based on the new feature's availability. This update improves the user experience by ensuring that the login card is only shown when both eligibility and the queue scan feature are enabled.

---------

Signed-off-by: dsh <[email protected]>
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Dasha Kobzeva <[email protected]>

Co-authored-by: Liliya Soroka <[email protected]>

Co-authored-by: Hanzo Dev <[email protected]>
2026-01-21 10:31:49 +01:00

38 lines
1.1 KiB
JSON

{
"type": {
"general": {
"confirmed": "Confirmed",
"sign": "Sign",
"zeroOftwo": "0/2",
"oneOftwo": "1/2",
"twoOftwo": "2/2"
},
"offChain": {
"walletConnect": "WalletConnect",
"testMessage1": "Test message 1 on-ch…",
"testMessage2": "Test message 2 off-c…",
"testMessage3": "Test message 1 off-c…",
"altTmage": "Message type",
"sign": "Sign",
"oneOftwo": "1/2",
"twoOftwo": "2/2",
"message2": "Test message 2 off-chain",
"message3": "Test message 3 off-chain",
"EIP712Domain": "EIP712Domain",
"name": "EIP-1271 Example DApp",
"testString": "Test message 3 off-chain",
"testStringNested": "testNested(Nested)",
"testNestedArray": "testNestedArray(Nested[])"
},
"onChain": {
"contractName": "Safe: SignMessageLib 1.3.0",
"contractAddress": "sep:0x98FFBBF51bb33A056B08ddf711f289936AafF717",
"delegateCall": "Delegate call",
"signMessage": "signMessage",
"oneOftwo": "1/2",
"altImage": "Safe: SignMessageLib 1.3.0",
"success": "Success"
}
}
}