Skip to content

Piyal dev#3

Merged
piyalbasu merged 3 commits into
masterfrom
piyal-dev
May 21, 2020
Merged

Piyal dev#3
piyalbasu merged 3 commits into
masterfrom
piyal-dev

Conversation

@piyalbasu
Copy link
Copy Markdown
Contributor

No description provided.

`/index.html#/sign-transaction?${encodetransactionInfo}`,
),
"Lyra: Sign Transaction",
WINDOW_DIMENSIONS,
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

open these views in a new mini window instead of just a new tab

Comment thread src/Router.tsx
<HomeRoute />
<RecoverAccount />
</Route>
<HomeRoute />
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixing some routing issues when jumping back into auth flow

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops! My b

Comment thread src/api/index.ts
@@ -1,15 +1,227 @@
import connect from "./connect";
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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";
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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";
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will end up being where we stylize all error messages


&:hover + ${StyledTooltip} {
visibility: visible;
}
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blur the public key by default; we'll show the tooltip to let the user know clicking will reveal it

Copy link
Copy Markdown
Contributor

@vcarl vcarl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, look good!

@piyalbasu piyalbasu merged commit da8ac1f into master May 21, 2020
piyalbasu added a commit that referenced this pull request Apr 1, 2026
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants