-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: move request account logic to new file
- Loading branch information
1 parent
f48bf9b
commit bb2c367
Showing
2 changed files
with
17 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { popupCenter } from '@background/popup-center'; | ||
import { SupportedRpcMessages } from '@shared/message-types'; | ||
import { RouteUrls } from '@shared/route-urls'; | ||
|
||
export function requestAccounts(tabId: number, origin: string, message: SupportedRpcMessages) { | ||
const params = new URLSearchParams(); | ||
|
||
params.set('tabId', tabId.toString()); | ||
params.set('id', message.id); | ||
params.set('origin', origin.toString()); | ||
|
||
popupCenter({ | ||
url: `/popup-center.html#${RouteUrls.AccountRequest}?${params.toString()}`, | ||
}); | ||
} |