Conversation
…e some small adjustments to auth flow
| `/index.html#/sign-transaction?${encodetransactionInfo}`, | ||
| ), | ||
| "Lyra: Sign Transaction", | ||
| WINDOW_DIMENSIONS, |
There was a problem hiding this comment.
open these views in a new mini window instead of just a new tab
| <HomeRoute /> | ||
| <RecoverAccount /> | ||
| </Route> | ||
| <HomeRoute /> |
There was a problem hiding this comment.
fixing some routing issues when jumping back into auth flow
| @@ -1,15 +1,227 @@ | |||
| import connect from "./connect"; | |||
There was a problem hiding this comment.
this is just renaming the folder from 'services' to 'api'. since there was already an 'api' folder, it did a diff. ignore!
| @@ -0,0 +1,23 @@ | |||
| import React from "react"; | |||
There was a problem hiding this comment.
added a quick css tooltip component; not sure if we'll end up using it in the long run, but helpful for the moment
| @@ -0,0 +1,15 @@ | |||
| import React from "react"; | |||
There was a problem hiding this comment.
this will end up being where we stylize all error messages
|
|
||
| &:hover + ${StyledTooltip} { | ||
| visibility: visible; | ||
| } |
There was a problem hiding this comment.
blur the public key by default; we'll show the tooltip to let the user know clicking will reveal it
Medium #1 – Remove dead message-based SIDEBAR_REGISTER/UNREGISTER The port-based registration (initSidebarConnectionListener) already handles window-ID tracking with reliable disconnect cleanup. The redundant message-based handlers were dead code and added unnecessary attack surface. Removed the case handlers, the SidebarRegisterMessage / SidebarUnregisterMessage types, their ServiceMessageRequest union entries, and the SIDEBAR_REGISTER/SIDEBAR_UNREGISTER enum values. Medium #2 – openSidebar() no longer closes popup on API failure Moved window.close() inside the try block so the popup only closes after the sidebar API calls succeed. Errors are logged and the popup stays open, leaving the user with usable UI. Medium #3 – isSidebarMode() now requires extension origin Added a protocol check (chrome-extension:// or moz-extension://) before inspecting the ?mode=sidebar query param, preventing the sidebar code path from activating in unexpected non-extension environments (e.g. test runners, web views). Low #1 – Fix unsafe boolean cast in initSidebarBehavior localStorage.getItem returns a string. The previous 'as boolean' cast would coerce any non-empty string (including 'false') to true. Now compared explicitly with === 'true'. Low #2 – Add tests for sidebar message handlers Five new tests in sidebar.test.ts cover: OPEN_SIDEBAR rejection for content-script senders, OPEN_SIDEBAR success for extension-page senders, and sidebarWindowId set/clear lifecycle. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
No description provided.