Skip to content

Commit

Permalink
Release/2.5.5 (#11)
Browse files Browse the repository at this point in the history
* Update deps, apply canary

* add loading states and tag canary

* Apply web3modal patches

* update to latest monorepo packages

* remove manual metamask

* Use latest monorepo canary

* Update to 2.8.3 monorepo packages

* tag 2.5.3

* Add sourcemap

* Tag 2.5.4

* tag 2.5.5
  • Loading branch information
xzilja authored Jun 28, 2023
1 parent 5d792fe commit a547f4d
Show file tree
Hide file tree
Showing 14 changed files with 90 additions and 63 deletions.
12 changes: 6 additions & 6 deletions laboratory/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "laboratory",
"version": "2.5.4",
"version": "2.5.5",
"private": true,
"scripts": {
"dev": "rm -rf .next; next dev",
Expand All @@ -9,11 +9,11 @@
"dependencies": {
"@nextui-org/react": "1.0.0-beta.13",
"@walletconnect/ethereum-provider": "2.8.3",
"@walletconnect/modal": "2.5.4",
"@walletconnect/modal-auth-html": "2.5.4",
"@walletconnect/modal-auth-react": "2.5.4",
"@walletconnect/modal-sign-html": "2.5.4",
"@walletconnect/modal-sign-react": "2.5.4",
"@walletconnect/modal": "2.5.5",
"@walletconnect/modal-auth-html": "2.5.5",
"@walletconnect/modal-auth-react": "2.5.5",
"@walletconnect/modal-sign-html": "2.5.5",
"@walletconnect/modal-sign-react": "2.5.5",
"next": "13.4.7",
"react": "18.2.0",
"react-code-blocks": "0.0.9-0",
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
"projects/modal-sign-react",
"laboratory"
],
"version": "2.5.4",
"version": "2.5.5",
"$schema": "node_modules/lerna/schemas/lerna-schema.json"
}
40 changes: 20 additions & 20 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 packages/modal-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@walletconnect/modal-core",
"version": "2.5.4",
"version": "2.5.5",
"main": "dist/index.js",
"type": "module",
"types": "dist/_types/index.d.ts",
Expand Down
10 changes: 4 additions & 6 deletions packages/modal-core/src/controllers/ExplorerCtrl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,10 @@ export const ExplorerCtrl = {
}

// Don't fetch recomended wallets, as we already have these
if (!extendedParams.search) {
if (recomendedWallets.length) {
extendedParams.excludedIds = recomendedWallets.map(wallet => wallet.id).join(',')
} else if (CoreUtil.isArray(explorerRecommendedWalletIds)) {
extendedParams.excludedIds = explorerRecommendedWalletIds.join(',')
}
if (recomendedWallets.length) {
extendedParams.excludedIds = recomendedWallets.map(wallet => wallet.id).join(',')
} else if (CoreUtil.isArray(explorerRecommendedWalletIds)) {
extendedParams.excludedIds = explorerRecommendedWalletIds.join(',')
}

// Don't fetch user defined excluded wallets & recomended wallets
Expand Down
35 changes: 25 additions & 10 deletions packages/modal-core/src/utils/CoreUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,25 +79,40 @@ export const CoreUtil = {
},

setWalletConnectDeepLink(href: string, name: string) {
localStorage.setItem(CoreUtil.WALLETCONNECT_DEEPLINK_CHOICE, JSON.stringify({ href, name }))
try {
localStorage.setItem(CoreUtil.WALLETCONNECT_DEEPLINK_CHOICE, JSON.stringify({ href, name }))
} catch {
console.info('Unable to set WalletConnect deep link')
}
},

setWalletConnectAndroidDeepLink(wcUri: string) {
const [href] = wcUri.split('?')

localStorage.setItem(
CoreUtil.WALLETCONNECT_DEEPLINK_CHOICE,
JSON.stringify({ href, name: 'Android' })
)
try {
const [href] = wcUri.split('?')
localStorage.setItem(
CoreUtil.WALLETCONNECT_DEEPLINK_CHOICE,
JSON.stringify({ href, name: 'Android' })
)
} catch {
console.info('Unable to set WalletConnect android deep link')
}
},

removeWalletConnectDeepLink() {
localStorage.removeItem(CoreUtil.WALLETCONNECT_DEEPLINK_CHOICE)
try {
localStorage.removeItem(CoreUtil.WALLETCONNECT_DEEPLINK_CHOICE)
} catch {
console.info('Unable to remove WalletConnect deep link')
}
},

setModalVersionInStorage() {
if (typeof localStorage !== 'undefined') {
localStorage.setItem(CoreUtil.WCM_VERSION, process.env.ROLLUP_WCM_VERSION ?? 'UNKNOWN')
try {
if (typeof localStorage !== 'undefined') {
localStorage.setItem(CoreUtil.WCM_VERSION, process.env.ROLLUP_WCM_VERSION ?? 'UNKNOWN')
}
} catch {
console.info('Unable to set Web3Modal version in storage')
}
},

Expand Down
4 changes: 2 additions & 2 deletions packages/modal-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@walletconnect/modal-ui",
"version": "2.5.4",
"version": "2.5.5",
"main": "dist/index.js",
"type": "module",
"types": "dist/_types/index.d.ts",
Expand All @@ -16,7 +16,7 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@walletconnect/modal-core": "2.5.4",
"@walletconnect/modal-core": "2.5.5",
"lit": "2.7.5",
"motion": "10.16.2",
"qrcode": "1.5.3"
Expand Down
20 changes: 15 additions & 5 deletions packages/modal-ui/src/utils/UiUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,15 +135,25 @@ export const UiUtil = {
},

setRecentWallet(wallet: WalletData) {
localStorage.setItem(UiUtil.WCM_RECENT_WALLET_DATA, JSON.stringify(wallet))
try {
localStorage.setItem(UiUtil.WCM_RECENT_WALLET_DATA, JSON.stringify(wallet))
} catch {
console.info('Unable to set recent wallet')
}
},

getRecentWallet() {
const wallet = localStorage.getItem(UiUtil.WCM_RECENT_WALLET_DATA)
if (wallet) {
const json = JSON.parse(wallet)
try {
const wallet = localStorage.getItem(UiUtil.WCM_RECENT_WALLET_DATA)
if (wallet) {
const json = JSON.parse(wallet)

return json as WalletData
}

return json as WalletData
return undefined
} catch {
console.info('Unable to get recent wallet')
}

return undefined
Expand Down
4 changes: 2 additions & 2 deletions projects/modal-auth-html/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@walletconnect/modal-auth-html",
"version": "2.5.4",
"version": "2.5.5",
"main": "dist/index.js",
"unpkg": "dist/cdn/bundle.js",
"type": "module",
Expand All @@ -19,7 +19,7 @@
},
"dependencies": {
"@walletconnect/auth-client": "2.1.0",
"@walletconnect/modal": "2.5.4"
"@walletconnect/modal": "2.5.5"
},
"keywords": [
"web3",
Expand Down
4 changes: 2 additions & 2 deletions projects/modal-auth-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@walletconnect/modal-auth-react",
"version": "2.5.4",
"version": "2.5.5",
"main": "dist/index.js",
"type": "module",
"types": "dist/_types/index.d.ts",
Expand All @@ -17,7 +17,7 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@walletconnect/modal-auth-html": "2.5.4"
"@walletconnect/modal-auth-html": "2.5.5"
},
"peerDependencies": {
"react": ">=17",
Expand Down
4 changes: 2 additions & 2 deletions projects/modal-sign-html/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@walletconnect/modal-sign-html",
"version": "2.5.4",
"version": "2.5.5",
"main": "dist/index.js",
"unpkg": "dist/cdn/bundle.js",
"type": "module",
Expand All @@ -18,7 +18,7 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@walletconnect/modal": "2.5.4",
"@walletconnect/modal": "2.5.5",
"@walletconnect/sign-client": "2.8.3"
},
"keywords": [
Expand Down
6 changes: 5 additions & 1 deletion projects/modal-sign-html/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,10 @@ export class WalletConnectModalSign {
relayUrl: this.#options.relayUrl
})
const clientId = await this.#signClient.core.crypto.getClientId()
localStorage.setItem('WCM_WALLETCONNECT_CLIENT_ID', clientId)
try {
localStorage.setItem('WCM_WALLETCONNECT_CLIENT_ID', clientId)
} catch {
console.info('Unable to set client id')
}
}
}
4 changes: 2 additions & 2 deletions projects/modal-sign-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@walletconnect/modal-sign-react",
"version": "2.5.4",
"version": "2.5.5",
"main": "dist/index.js",
"type": "module",
"types": "dist/_types/index.d.ts",
Expand All @@ -17,7 +17,7 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@walletconnect/modal-sign-html": "2.5.4",
"@walletconnect/modal-sign-html": "2.5.5",
"mitt": "3.0.0"
},
"peerDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions projects/modal/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@walletconnect/modal",
"version": "2.5.4",
"version": "2.5.5",
"main": "dist/index.js",
"unpkg": "dist/cdn/bundle.js",
"type": "module",
Expand All @@ -18,8 +18,8 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@walletconnect/modal-core": "2.5.4",
"@walletconnect/modal-ui": "2.5.4"
"@walletconnect/modal-core": "2.5.5",
"@walletconnect/modal-ui": "2.5.5"
},
"keywords": [
"web3",
Expand Down

0 comments on commit a547f4d

Please sign in to comment.