Skip to content

Commit

Permalink
fix(wagmi-connectors,web3-modal,forge-web3,skillforge-widget,skillfor…
Browse files Browse the repository at this point in the history
…ge-ui): v2-development to v2 release with changes

RELEASE changelog:
* Update wagmi/viem/react-query versions and fix issues (#100)

* fix(wagmi-connectors): remove custom PstlWeb3AuthConnector in favour of new official wagmi Web3AuthConnector

* fix(web3-modal): fixes from viem/wagmi update

1. remove deprecated code
2. update api
3. fix fixtures

* fix(skillforge-widget): fixes from viem/wagmi update

* fix(forge-web3): fixes from viem/wagmi update

* fix(skillforge-ui): viem/wagmi update fixes

* chore(root,skillforge-ui,forge-web3,skillforge-widget,wagmi-connectors,web3-modal): update viem/wagmi and set resolutions and peerDeps

* chore: update yarn.lock

* fix(skillforge-ui): update craco and rewire overrides

* fix(skillforge-ui): fix fixture

* fix(web3-modal): disable focus lock

* fix(web3-modal): fix fixed import path

* styles(web3-modal): mobile updates

* chore(skillforge-ui): set satisfying type to config obj

* styles(web3-modal): remove magic number

* chore(skillforge-widget): fix cosmos test env webpack

* fix(web3-modal): disable structural sharing [to be reverted]

* chore(forge-web3,web3-modal,skillforge-ui,root): fix webpack config files, update react-query version and update root yarn.lock

* chore(forge-web3,wagmi-connectors): lint

* chore: update yarn.lock

* chore: revert @tanstack/react-query update
  • Loading branch information
W3stside authored Sep 5, 2024
2 parents 46f0783 + 6d50876 commit 7014c8b
Show file tree
Hide file tree
Showing 63 changed files with 4,278 additions and 4,829 deletions.
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v18.16.0
v20.9.0
24 changes: 24 additions & 0 deletions apps/pastellelabs-landing-ui/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,30 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [0.4.1-alpha.2](https://github.com/PAST3LLE/past3lle-monorepo/compare/@past3lle/[email protected]...@past3lle/[email protected]) (2024-09-04)

**Note:** Version bump only for package @past3lle/pastellelabs-landing-ui





## [0.4.1-alpha.1](https://github.com/PAST3LLE/past3lle-monorepo/compare/@past3lle/[email protected]...@past3lle/[email protected]) (2024-09-04)

**Note:** Version bump only for package @past3lle/pastellelabs-landing-ui





## [0.4.1-alpha.0](https://github.com/PAST3LLE/past3lle-monorepo/compare/@past3lle/[email protected]...@past3lle/[email protected]) (2024-09-03)

**Note:** Version bump only for package @past3lle/pastellelabs-landing-ui





# [0.4.0](https://github.com/PAST3LLE/past3lle-monorepo/compare/@past3lle/[email protected]...@past3lle/[email protected]) (2024-08-28)

**Note:** Version bump only for package @past3lle/pastellelabs-landing-ui
Expand Down
14 changes: 7 additions & 7 deletions apps/pastellelabs-landing-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
"url": "git+https://github.com/PAST3LLE/past3lle-monorepo.git"
},
"private": true,
"version": "0.4.0",
"version": "0.4.1-alpha.2",
"engines": {
"node": ">=18.12.0"
"node": "^18.8 || >=20"
},
"scripts": {
"analyze": "source-map-explorer 'build/static/js/*.js'",
Expand Down Expand Up @@ -61,12 +61,12 @@
},
"dependencies": {
"@past3lle/assets": "^2.1.0",
"@past3lle/carousel": "^2.1.0",
"@past3lle/components": "^2.1.0",
"@past3lle/carousel": "^2.1.1-alpha.0",
"@past3lle/components": "^2.1.1-alpha.0",
"@past3lle/constants": "^2.1.0",
"@past3lle/hooks": "^2.1.0",
"@past3lle/skillforge-widget": "^2.3.0",
"@past3lle/theme": "^2.1.0",
"@past3lle/hooks": "^2.1.1-alpha.0",
"@past3lle/skillforge-widget": "^2.3.1-alpha.1",
"@past3lle/theme": "^2.1.1-alpha.0",
"@past3lle/types": "^2.1.0",
"@past3lle/utils": "^2.1.0",
"polished": "^4.2.2",
Expand Down
30 changes: 30 additions & 0 deletions apps/skillforge-ui/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,36 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [1.3.1-alpha.2](https://github.com/PAST3LLE/past3lle-monorepo/compare/@past3lle/[email protected]...@past3lle/[email protected]) (2024-09-04)

**Note:** Version bump only for package @past3lle/skillforge-ui





## [1.3.1-alpha.1](https://github.com/PAST3LLE/past3lle-monorepo/compare/@past3lle/[email protected]...@past3lle/[email protected]) (2024-09-04)


### Bug Fixes

* **skillforge-ui:** update skillforge-ui imports and update root yarn lock ([#101](https://github.com/PAST3LLE/past3lle-monorepo/issues/101)) ([d4d714a](https://github.com/PAST3LLE/past3lle-monorepo/commit/d4d714a45c9b9a18b870e218f2b5b4d70c34b744))





## [1.3.1-alpha.0](https://github.com/PAST3LLE/past3lle-monorepo/compare/@past3lle/[email protected]...@past3lle/[email protected]) (2024-09-03)


### Bug Fixes

* **wagmi-connectors,web3-modal,forge-web3,skillforge-widget,skillforge-ui:** Update wagmi/viem/react-query versions and fix issues ([#100](https://github.com/PAST3LLE/past3lle-monorepo/issues/100)) ([44dac72](https://github.com/PAST3LLE/past3lle-monorepo/commit/44dac7223e5d78a0b17bc6ad82c5c21507e39a19))





# [1.3.0](https://github.com/PAST3LLE/past3lle-monorepo/compare/@past3lle/[email protected]...@past3lle/[email protected]) (2024-08-28)

**Note:** Version bump only for package @past3lle/skillforge-ui
Expand Down
9 changes: 9 additions & 0 deletions apps/skillforge-ui/config-overrides.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ module.exports = {
http: require.resolve('stream-http'),
os: require.resolve('os-browserify'),
url: require.resolve('url'),
vm: require.resolve("vm-browserify"),
zlib: require.resolve('browserify-zlib')
})
config.resolve.fallback = fallback
Expand All @@ -35,6 +36,14 @@ module.exports = {
}
})

// fixes "Uncaught TypeError: (0 , superstruct_1.boolean) is not a function" error
config.module.rules.map(rule => {
if (rule.oneOf instanceof Array) {
rule.oneOf[rule.oneOf.length - 1].exclude = [/\.(js|mjs|jsx|cjs|ts|tsx)$/, /\.html$/, /\.json$/];
}
return rule;
});

// Bundle size warning bypass
config.plugins.forEach((plugin) => {
if ('config' in plugin) {
Expand Down
1 change: 1 addition & 0 deletions apps/skillforge-ui/craco.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ module.exports = {
http: require.resolve('stream-http'),
os: require.resolve('os-browserify'),
url: require.resolve('url'),
vm: require.resolve("vm-browserify"),
zlib: require.resolve('browserify-zlib')
})
config.resolve.fallback = fallback
Expand Down
26 changes: 10 additions & 16 deletions apps/skillforge-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
"url": "git+https://github.com/PAST3LLE/past3lle-monorepo.git"
},
"private": true,
"version": "1.3.0",
"version": "1.3.1-alpha.2",
"engines": {
"node": ">=18.12.0"
"node": "^18.8 || >=20"
},
"scripts": {
"analyze": "source-map-explorer 'build/static/js/*.js'",
Expand All @@ -35,26 +35,19 @@
"forge-cli": "npx @past3lle/forge-cli@latest",
"forge-cli:local": "../../node_modules/@past3lle/forge-cli/bin/forge-cli.js"
},
"resolutions": {
"**/*/@tanstack/react-query": "^5.x",
"**/*/viem": "^2.x",
"viem": "^2.x",
"**/*/wagmi": "^2.x",
"wagmi": "^2.x",
"styled-components": "^5.x"
},
"dependencies": {
"@past3lle/forge-web3": "^2.3.0",
"@past3lle/skillforge-widget": "^2.3.0",
"@past3lle/components": "^2.1.1-alpha.0",
"@past3lle/forge-web3": "^2.3.1-alpha.1",
"@past3lle/skillforge-widget": "^2.3.1-alpha.1",
"@past3lle/skilltree-contracts": "^0.1.8",
"@past3lle/theme": "^2.1.0",
"@past3lle/theme": "^2.1.1-alpha.0",
"@past3lle/utils": "^2.1.0",
"@past3lle/wagmi-connectors": "^2.3.1-alpha.1",
"@tanstack/react-query": "^5.17.15",
"@web3auth/torus-wallet-connector-plugin": "7.2.1",
"react-helmet-async": "^1.3.0",
"styled-components": "^5.3.5",
"viem": "^2.3.1",
"wagmi": "^2.2.1"
"viem": "^2.21.1",
"wagmi": "^2.12.8"
},
"devDependencies": {
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.13.8",
Expand Down Expand Up @@ -93,6 +86,7 @@
"stream-browserify": "^3.0.0",
"stream-http": "^3.2.0",
"url": "^0.11.0",
"vm-browserify": "^1.1.2",
"web-vitals": "^3.1.0",
"workbox-webpack-plugin": "^7.0.0"
},
Expand Down
29 changes: 1 addition & 28 deletions apps/skillforge-ui/src/web3/config/chains.ts
Original file line number Diff line number Diff line change
@@ -1,31 +1,4 @@
import { polygon, sepolia } from 'viem/chains'
import { defineChain } from 'viem/utils'

// TODO: remove when viem adds amoy polygon
const amoy = defineChain({
id: 80002,
name: 'Amoy',
nativeCurrency: {
decimals: 18,
name: 'Matic',
symbol: 'MATIC'
},
rpcUrls: {
default: {
http: ['https://rpc-amoy.polygon.technology/'],
webSocket: ['wss://rpc-amoy.polygon.technology/']
}
},
blockExplorers: {
default: { name: 'Explorer', url: 'https://amoy.polygonscan.com/' }
},
contracts: {
multicall3: {
address: '0xcA11bde05977b3631167028862bE2a173976CA11',
blockCreated: 3127388
}
}
})
import { polygon, sepolia, polygonAmoy as amoy } from 'viem/chains'

// Sepolia, Polygon, Amoy Polygon (test)
export type SupportedChainsDevelop = 11155111 | 137 | 80002
Expand Down
14 changes: 7 additions & 7 deletions apps/skillforge-ui/src/web3/connectors/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import METAMASK_ICON from '../../assets/png/metamask.png'
import { ledgerHid, ledgerLive, pstlWeb3Auth, PstlWeb3AuthParameters } from '@past3lle/wagmi-connectors'
import { ForgeWeb3ModalProps } from '@past3lle/forge-web3'
import { ledgerHid, ledgerLive, web3Auth, Web3AuthParameters } from '@past3lle/wagmi-connectors'
import { ASSETS_MAP } from 'assets'
import GOOGLE_APPLE_LOGO from 'assets/png/google-apple.png'
import { skillforgeTheme } from 'theme/skillforge'
Expand All @@ -8,7 +9,7 @@ import { injected } from 'wagmi/connectors'

const IS_SERVER = typeof globalThis?.window === 'undefined'

function _getWhitelistTheme(): PstlWeb3AuthParameters['uiConfig'] {
function _getWhitelistTheme(): Web3AuthParameters['uiConfig'] {
if (!JSON.parse(process.env.REACT_APP_WEB3AUTH_WHITELIST_ENABLED || 'false')) return

return {
Expand Down Expand Up @@ -48,14 +49,13 @@ const connectors = {
}
}
}),
pstlWeb3Auth({
network: process.env.REACT_APP_WEB3_AUTH_NETWORK as PstlWeb3AuthParameters['network'],
web3Auth({
network: process.env.REACT_APP_WEB3_AUTH_NETWORK as Web3AuthParameters['network'],
projectId: process.env.REACT_APP_WEB3AUTH_ID as string,
storageKey: 'session',
preset: 'DISALLOW_EXTERNAL_WALLETS',
mfaLevel: 'none',
uxMode: 'popup',
..._getWhitelistTheme()
uiConfig: _getWhitelistTheme()
})
],
overrides: {
Expand All @@ -82,6 +82,6 @@ const connectors = {
rank: 0
}
}
}
} satisfies ForgeWeb3ModalProps['connectors']
const frameConnectors = [ledgerLive()]
export { connectors, frameConnectors }
25 changes: 0 additions & 25 deletions apps/skillforge-ui/src/web3/connectors/web3authPlugins.ts

This file was deleted.

2 changes: 1 addition & 1 deletion apps/skillforge-ui/src/web3/constants/addresses.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import COLLECTIONS_MANAGER_ADDRESSES from '../../forge-networks.json'
import CONTRACTS_NETWORKS from '@past3lle/skilltree-contracts/networks.json'
import { Address } from '@past3lle/types'
import { Address } from 'viem'

export type ContractAddresses = typeof CONTRACT_ADDRESSES_MAP
export const CONTRACT_ADDRESSES_MAP = {
Expand Down
4 changes: 0 additions & 4 deletions examples/generic/.npmignore

This file was deleted.

Loading

0 comments on commit 7014c8b

Please sign in to comment.