Skip to content

Commit

Permalink
chore: use latest broadcast-channel package for timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
jiafuei committed Jul 12, 2022
1 parent 785d471 commit edb5d33
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 6 deletions.
44 changes: 39 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"@solana/spl-token": "0.2.0",
"@solana/web3.js": "^1.42.0",
"@toruslabs/base-controllers": "^2.1.0",
"@toruslabs/broadcast-channel": "^5.0.2",
"@toruslabs/broadcast-channel": "^6.1.0",
"@toruslabs/eccrypto": "^1.1.8",
"@toruslabs/http-helpers": "^3.0.0",
"@toruslabs/loglevel-sentry": "^4.0.0",
Expand Down
2 changes: 2 additions & 0 deletions src/utils/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,8 @@ export const getLogoutBcChannelName = (origin: string, userInfo: UserInfo) => {

export const logoutWithBC = async (origin: string, _instanceId: string, userInfo: UserInfo) => {
const channelName = getLogoutBcChannelName(origin, userInfo);
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
const bc = new BroadcastChannel<LogoutMessage>(`${channelName}`, { server: { timeout: 5 } });
const timestamp = new Date().getTime();
const instanceId = _instanceId.slice(0, 8);
Expand Down

0 comments on commit edb5d33

Please sign in to comment.