Skip to content

Commit

Permalink
Merge pull request #2362 from torusresearch/develop
Browse files Browse the repository at this point in the history
Release v4.0.1
  • Loading branch information
chaitanyapotti authored Oct 6, 2023
2 parents a403ed2 + 6ea1b04 commit 83f90b8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@
"@toruslabs/openlogin-subkey": "^4.7.2",
"@toruslabs/openlogin-utils": "^4.7.0",
"@uniswap/default-token-list": "^11.5.0",
"@walletconnect/sign-client": "^2.10.0",
"@walletconnect/utils": "^2.10.0",
"@walletconnect/sign-client": "^2.10.1",
"@walletconnect/utils": "^2.10.1",
"await-semaphore": "^0.1.3",
"bignumber.js": "^9.1.1",
"bn.js": "^5.2.1",
Expand Down
3 changes: 2 additions & 1 deletion src/registerServiceWorker.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export function register(config) {

function registerValidSW(swUrl, config) {
navigator.serviceWorker
.register(swUrl, { updateViaCache: 'all', scope: process.env.BASE_URL })
.register(swUrl, { updateViaCache: 'imports', scope: process.env.BASE_URL })
.then((registration) => {
registration.onupdatefound = () => {
const installingWorker = registration.installing
Expand Down Expand Up @@ -104,6 +104,7 @@ function registerValidSW(swUrl, config) {
function checkValidServiceWorker(swUrl, config) {
// Check if the service worker can be found. If it can't reload the page.
fetch(swUrl, {
cache: 'no-cache',
headers: { 'Service-Worker': 'script' },
})
.then((response) => {
Expand Down
4 changes: 2 additions & 2 deletions src/store/actions.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { isHexString, privateToAddress } from '@ethereumjs/util'
import { isHexString } from '@ethereumjs/util'
import { OpenloginSessionManager } from '@toruslabs/openlogin-session-manager'
import { BrowserStorage, safeatob, safebtoa } from '@toruslabs/openlogin-utils'
import deepmerge from 'deepmerge'
Expand Down Expand Up @@ -255,7 +255,7 @@ export default {
dispatch('subscribeToControllers')
commit('setUserInfo', userInfo)

const selectedAddress = `0x${privateToAddress(Buffer.from(privateKey.padStart(64, '0'), 'hex')).toString('hex')}`
const selectedAddress = generateAddressFromPrivateKey(privateKey)
await dispatch('initTorusKeyring', {
keys: [
{
Expand Down

0 comments on commit 83f90b8

Please sign in to comment.