Skip to content

Commit

Permalink
Release/2.6.1 (#23)
Browse files Browse the repository at this point in the history
* Update deps

* Update dependencies, port w3m changes
  • Loading branch information
xzilja authored Jul 26, 2023
1 parent a7fc7d5 commit 81e1b5c
Show file tree
Hide file tree
Showing 16 changed files with 486 additions and 401 deletions.
18 changes: 9 additions & 9 deletions laboratory/package.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
{
"name": "laboratory",
"version": "2.6.0",
"version": "2.6.1",
"private": true,
"scripts": {
"dev": "rm -rf .next; next dev",
"build": "next build"
},
"dependencies": {
"@nextui-org/react": "1.0.0-beta.13",
"@walletconnect/ethereum-provider": "2.9.0",
"@walletconnect/modal": "2.6.0",
"@walletconnect/modal-auth-html": "2.6.0",
"@walletconnect/modal-auth-react": "2.6.0",
"@walletconnect/modal-sign-html": "2.6.0",
"@walletconnect/modal-sign-react": "2.6.0",
"next": "13.4.9",
"@walletconnect/ethereum-provider": "2.9.1",
"@walletconnect/modal": "2.6.1",
"@walletconnect/modal-auth-html": "2.6.1",
"@walletconnect/modal-auth-react": "2.6.1",
"@walletconnect/modal-sign-html": "2.6.1",
"@walletconnect/modal-sign-react": "2.6.1",
"next": "13.4.12",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-hot-toast": "2.4.1",
"valtio": "1.10.7"
"valtio": "1.11.0"
}
}
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.6.0",
"version": "2.6.1",
"$schema": "node_modules/lerna/schemas/lerna-schema.json"
}
793 changes: 435 additions & 358 deletions package-lock.json

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,24 @@
"laboratory"
],
"devDependencies": {
"@types/node": "20.4.1",
"@typescript-eslint/eslint-plugin": "6.0.0",
"@typescript-eslint/parser": "6.0.0",
"@types/node": "20.4.5",
"@typescript-eslint/eslint-plugin": "6.2.0",
"@typescript-eslint/parser": "6.2.0",
"@rollup/plugin-replace": "5.0.2",
"@rollup/plugin-commonjs": "25.0.2",
"@rollup/plugin-commonjs": "25.0.3",
"@rollup/plugin-node-resolve": "15.1.0",
"@rollup/plugin-json": "6.0.0",
"rollup-plugin-polyfill-node": "0.12.0",
"@types/react": "18.2.14",
"@types/react-dom": "18.2.6",
"@types/react": "18.2.16",
"@types/react-dom": "18.2.7",
"esbuild": "0.17.9",
"eslint": "8.44.0",
"eslint": "8.45.0",
"eslint-config-prettier": "8.8.0",
"eslint-plugin-react": "7.32.2",
"eslint-plugin-react": "7.33.0",
"eslint-plugin-react-hooks": "4.6.0",
"lerna": "7.1.1",
"lerna": "7.1.4",
"prettier": "3.0.0",
"rollup": "3.26.2",
"rollup": "3.26.3",
"rollup-plugin-esbuild": "5.0.0",
"rollup-plugin-minify-html-literals": "1.2.6",
"rollup-plugin-lit-css": "4.0.1",
Expand Down
4 changes: 2 additions & 2 deletions 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.6.0",
"version": "2.6.1",
"main": "dist/index.js",
"type": "module",
"types": "dist/_types/index.d.ts",
Expand All @@ -16,7 +16,7 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
"valtio": "1.10.7"
"valtio": "1.11.0"
},
"keywords": [
"web3",
Expand Down
2 changes: 2 additions & 0 deletions packages/modal-core/src/controllers/ModalCtrl.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { proxy, subscribe as valtioSub } from 'valtio/vanilla'
import type { ModalCtrlState } from '../types/controllerTypes'
import { CoreUtil } from '../utils/CoreUtil'
import { OptionsCtrl } from './OptionsCtrl'
import { RouterCtrl } from './RouterCtrl'

Expand All @@ -25,6 +26,7 @@ export const ModalCtrl = {
async open(options?: OpenOptions) {
return new Promise<void>(resolve => {
const { isUiLoaded, isDataLoaded } = OptionsCtrl.state
CoreUtil.removeWalletConnectDeepLink()

OptionsCtrl.setWalletConnectUri(options?.uri)
OptionsCtrl.setChains(options?.chains)
Expand Down
9 changes: 6 additions & 3 deletions packages/modal-core/src/utils/ExplorerUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@ import type { ListingParams, ListingResponse } from '../types/controllerTypes'

// -- Helpers -------------------------------------------------------
const W3M_API = 'https://explorer-api.walletconnect.com'
const SDK_TYPE = 'wcm'
const SDK_VERSION = `js-${process.env.ROLLUP_WCM_VERSION}`

async function fetchListings(endpoint: string, params: ListingParams) {
const allParams = { sdkType: SDK_TYPE, sdkVersion: SDK_VERSION, ...params }
const url = new URL(endpoint, W3M_API)
url.searchParams.append('projectId', ConfigCtrl.state.projectId)
Object.entries(params).forEach(([key, value]) => {
Object.entries(allParams).forEach(([key, value]) => {
if (value) {
url.searchParams.append(key, String(value))
}
Expand Down Expand Up @@ -36,10 +39,10 @@ export const ExplorerUtil = {
},

getWalletImageUrl(imageId: string) {
return `${W3M_API}/w3m/v1/getWalletImage/${imageId}?projectId=${ConfigCtrl.state.projectId}`
return `${W3M_API}/w3m/v1/getWalletImage/${imageId}?projectId=${ConfigCtrl.state.projectId}&sdkType=${SDK_TYPE}&sdkVersion=${SDK_VERSION}`
},

getAssetImageUrl(imageId: string) {
return `${W3M_API}/w3m/v1/getAssetImage/${imageId}?projectId=${ConfigCtrl.state.projectId}`
return `${W3M_API}/w3m/v1/getAssetImage/${imageId}?projectId=${ConfigCtrl.state.projectId}&sdkType=${SDK_TYPE}&sdkVersion=${SDK_VERSION}`
}
}
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.6.0",
"version": "2.6.1",
"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.6.0",
"@walletconnect/modal-core": "2.6.1",
"lit": "2.7.6",
"motion": "10.16.2",
"qrcode": "1.5.3"
Expand Down
2 changes: 1 addition & 1 deletion packages/modal-ui/src/components/wcm-wallet-image/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export class WcmWalletImage extends LitElement {
${src.length
? html`
<div>
<img src=${src} alt=${this.id} />
<img crossorigin="anonymous" src=${src} alt=${this.id} />
</div>
`
: SvgUtil.WALLET_PLACEHOLDER}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,13 @@ export class WcmViewAllWalletsButton extends LitElement {
${reversedWallets.map(wallet => {
const explorerImg = UiUtil.getWalletIcon(wallet)
if (explorerImg) {
return html`<img src=${explorerImg} />`
return html`<img crossorigin="anonymous" src=${explorerImg} />`
}
const src = UiUtil.getWalletIcon({ id: wallet.id })
return src ? html`<img src=${src} />` : SvgUtil.WALLET_PLACEHOLDER
return src
? html`<img crossorigin="anonymous" src=${src} />`
: SvgUtil.WALLET_PLACEHOLDER
})}
${[...Array(4 - reversedWallets.length)].map(() => SvgUtil.WALLET_PLACEHOLDER)}
</div>
Expand Down
1 change: 1 addition & 0 deletions packages/modal-ui/src/utils/UiUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export const UiUtil = {
const image = new Image()
image.onload = resolve
image.onerror = reject
image.crossOrigin = 'anonymous'
image.src = src
})

Expand Down
6 changes: 3 additions & 3 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.6.0",
"version": "2.6.1",
"main": "dist/index.js",
"unpkg": "dist/cdn/bundle.js",
"type": "module",
Expand All @@ -18,8 +18,8 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@walletconnect/auth-client": "2.1.0",
"@walletconnect/modal": "2.6.0"
"@walletconnect/auth-client": "2.1.1",
"@walletconnect/modal": "2.6.1"
},
"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.6.0",
"version": "2.6.1",
"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.6.0"
"@walletconnect/modal-auth-html": "2.6.1"
},
"peerDependencies": {
"react": ">=17",
Expand Down
6 changes: 3 additions & 3 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.6.0",
"version": "2.6.1",
"main": "dist/index.js",
"unpkg": "dist/cdn/bundle.js",
"type": "module",
Expand All @@ -18,8 +18,8 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@walletconnect/modal": "2.6.0",
"@walletconnect/sign-client": "2.9.0"
"@walletconnect/modal": "2.6.1",
"@walletconnect/sign-client": "2.9.1"
},
"keywords": [
"web3",
Expand Down
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.6.0",
"version": "2.6.1",
"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.6.0",
"@walletconnect/modal-sign-html": "2.6.1",
"mitt": "3.0.1"
},
"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.6.0",
"version": "2.6.1",
"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.6.0",
"@walletconnect/modal-ui": "2.6.0"
"@walletconnect/modal-core": "2.6.1",
"@walletconnect/modal-ui": "2.6.1"
},
"keywords": [
"web3",
Expand Down

0 comments on commit 81e1b5c

Please sign in to comment.