Skip to content

Commit

Permalink
Merge pull request #2214 from blocknative/release/2.26.0
Browse files Browse the repository at this point in the history
* Update WC versions

* Feature - Replace internal Ethers functionality with Viem - Add WAGMI support module (#2203)

* Replaced isAddress check from ethers

* Replace Ethers BigNumber usage with browser native BigInt

* Remove ethers from common

* Testing package size

* Working as expected!

* Disable ums

* Cleanup chain usage

* More cleanup

* Ens avatar testing

* Some ethers swapped out for viem in Trezor and import map expanded

* Alittle cleanup in Trezor

* revert Trezor changes

* All is working from old commit

* Fix conflict

* Remove logs

* Return Address type to official check

* Update versions and handle type issues

* Bump Viem to latest

* Add node version check and min set to 16.15.1

* Add npmrc files with engine-strict set to true to core, react and vue to ensure the node engine check is enforced

* Added function for converting wei in both hex and string to eth, updated chain usage for ens and l2s, added function for handling decimel resolution with bigints

* Return bignumber to core for now

* cleanup and testing, removing unused code, refactor and rename to properly reflect functionality

* Remove bignumber from core again

* Fix merge issue with unstoppable resolution

* Return getText function for ens and update to viem

* Refine ci changes scope to core and related packages

* Final pass of PR for cleanup and refactor

* Remove ethers from tp

* Update to latest viem

* Update cede and WC docs

* resolve conflict

* Update config to publish viem test branches

* Update tsconfig and types

* Update node version in core

* Bump versions for release and Remove console.log

* ENS working again

* Progress within hw wallets

* Progress on chain imports

* Further refinement on viem usage of public client

* refine ledger, deprecate v1

* Update TS, revert viem changes to HW-wallets

* Handle ts errors

* Update packages for test release

* Handle all ts errors!

* Cleanup

* Making progress

* Wagmi core

* Refine imports and test a whole bunch

* Fix build errors

* Try later version of node in CI

* Add sass types to common

* Update tsconfig

* Update imports from common

* Refine types

* Update core imports

* Update svelte preprocess

* Bump common version

* More refinements to core

* Remove log

* Update tsconfig for hw-common to resolve build error

* Ensure new utils file is part of commit

* Remove unnecessary commonjs as the issue was fixed by viem team

* Use viem utils in common

* Changes to versioning and ready for testing

* Bump version

* Merge in changes from viem branch

* More updates from viem branch

* Refine package intialization and wagmi init

* testing signing

* Update wagmi disconnect

* Update viem versions

* Yarn it

* Update publish workflow to publish all packages

* Fix issue and redeploy

* Update solid node build version

* Handle build errors

* Update configs for build

* Update ci build config

* Bump arcana  node version in CI

* Fix arcana

* Fix venly

* Update gnosis pakcage.json

* Get all of the changes from viem merged and stablelized

* Use toHex function, switch chain now working

* Handle multiple wallets correctly

* Still working thru MM sdk issues

* Working through issues

* Still working through MM issues

* Connect working for sdks

* wagmi support stabilized

* Cleanup logs

* More updates to wagmi on disconnect

* Refine disconnect

* Create and test wagmi module

* Create wagmi module

* Add wagmi docs

* Update examples

* Update disconnect to handle wagmi

* Handle ts errors in wagmi package

* Refine examples and more ts fixes

* Handle more errors

* Update tags to be named as wagmi

* Update CI for deployment

* Fix CI build for wagmi

* Update tsconfig

* Update tsconfig again

* Update docs examples

* Fix build error

* cleanup exports and hook within react and document

* Refine docs

* Capsule is working!

* Add note about init object to docs and readme

* Export all wagmi functions from wagmi package

* Update docs

* Fix examples

* Bump to latest versions of wagmi and viem

* bump common version

* Bump versions for latest deps

* Bump versions for pub

* Version from wagmi to alpha flag

* Revert testing ci changes

* update CI to remove testing flow

* Remove log

* Remove capsule for failing build from demo

* Fix wagmi versioning (#2206)

* Add sunset warnings to tx preview (#2205)

* Add sunset warnings to tx preview

* Update versioning and merge in develop

* Update wagmi usage docs (#2207)

* Update wagmi usage docs

* Refine example imports

* Refine wagmi API

* Refine docs, examples and use of wallet state to pass wagmiConnector

* Merge in develop

* Update wagmi docs

* Fix - Core import of wagmi module version  (#2210)

* Update versions to publish with exact version of core

* Yarn it

* Update hw-wallet packages for type alignment (#2211)

* Update packages for type alignment

* Docs building again!

* Update .github/workflows/docs.yml

* Revert unnecessary change

* Remove alpha.1 flags

* Update versions for release

* Update docs versions

* Remove log
  • Loading branch information
Adamj1232 authored May 31, 2024
2 parents 9b780b9 + 419e8bc commit 0ea0fed
Show file tree
Hide file tree
Showing 160 changed files with 3,488 additions and 2,863 deletions.
51 changes: 35 additions & 16 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ commands:
jobs:
build-core:
docker:
- image: cimg/node:16.13.1
- image: cimg/node:16.15.1
working_directory: ~/web3-onboard-monorepo/packages/core
steps:
- node-build-steps
Expand Down Expand Up @@ -275,7 +275,7 @@ jobs:
- node-build-steps
build-react:
docker:
- image: cimg/node:16.13.1
- image: cimg/node:16.15.1
working_directory: ~/web3-onboard-monorepo/packages/react
steps:
- node-build-steps
Expand All @@ -293,7 +293,7 @@ jobs:
- node-build-steps
build-web3auth:
docker:
- image: cimg/node:16.18.1
- image: cimg/node:18.0.0
working_directory: ~/web3-onboard-monorepo/packages/web3auth
steps:
- node-build-steps
Expand All @@ -305,7 +305,7 @@ jobs:
- node-build-steps
build-vue:
docker:
- image: cimg/node:16.13.1
- image: cimg/node:16.15.1
working_directory: ~/web3-onboard-monorepo/packages/vue
steps:
- node-build-steps
Expand Down Expand Up @@ -341,7 +341,7 @@ jobs:
- node-build-steps
build-uauth:
docker:
- image: cimg/node:16.13.1
- image: cimg/node:18.0.0
working_directory: ~/web3-onboard-monorepo/packages/uauth
steps:
- node-build-steps
Expand Down Expand Up @@ -395,7 +395,7 @@ jobs:
- node-build-steps
build-arcana-auth:
docker:
- image: cimg/node:16.13.1
- image: cimg/node:18.0.0
working_directory: ~/web3-onboard-monorepo/packages/arcana-auth
steps:
- node-build-steps
Expand All @@ -407,7 +407,7 @@ jobs:
- node-build-steps
build-venly:
docker:
- image: cimg/node:16.13.1
- image: cimg/node:18.18.2
working_directory: ~/web3-onboard-monorepo/packages/venly
steps:
- node-build-steps
Expand All @@ -432,7 +432,7 @@ jobs:
resource_class: large
build-solid:
docker:
- image: cimg/node:16.14.2
- image: cimg/node:16.15.1
working_directory: ~/web3-onboard-monorepo/packages/solid
steps:
- node-build-steps
Expand All @@ -448,6 +448,12 @@ jobs:
working_directory: ~/web3-onboard-monorepo/packages/particle-network
steps:
- node-build-steps
build-wagmi:
docker:
- image: cimg/node:18.0.0
working_directory: ~/web3-onboard-monorepo/packages/wagmi
steps:
- node-build-steps
build-passport:
docker:
- image: cimg/node:18.0.0
Expand All @@ -458,7 +464,7 @@ jobs:
# Build staging/Alpha releases
build-staging-core:
docker:
- image: cimg/node:16.13.1
- image: cimg/node:16.15.1
working_directory: ~/web3-onboard-monorepo/packages/core
steps:
- node-staging-build-steps
Expand Down Expand Up @@ -566,7 +572,7 @@ jobs:
- node-staging-build-steps
build-staging-react:
docker:
- image: cimg/node:16.13.1
- image: cimg/node:16.15.1
working_directory: ~/web3-onboard-monorepo/packages/react
steps:
- node-staging-build-steps
Expand All @@ -584,7 +590,7 @@ jobs:
- node-staging-build-steps
build-staging-web3auth:
docker:
- image: cimg/node:16.18.1
- image: cimg/node:18.0.0
working_directory: ~/web3-onboard-monorepo/packages/web3auth
steps:
- node-staging-build-steps
Expand All @@ -596,7 +602,7 @@ jobs:
- node-staging-build-steps
build-staging-vue:
docker:
- image: cimg/node:16.13.1
- image: cimg/node:16.15.1
working_directory: ~/web3-onboard-monorepo/packages/vue
steps:
- node-staging-build-steps
Expand Down Expand Up @@ -632,7 +638,7 @@ jobs:
- node-staging-build-steps
build-staging-uauth:
docker:
- image: cimg/node:16.13.1
- image: cimg/node:18.0.0
working_directory: ~/web3-onboard-monorepo/packages/uauth
steps:
- node-staging-build-steps
Expand Down Expand Up @@ -686,7 +692,7 @@ jobs:
- node-staging-build-steps
build-staging-arcana-auth:
docker:
- image: cimg/node:16.13.1
- image: cimg/node:18.0.0
working_directory: ~/web3-onboard-monorepo/packages/arcana-auth
steps:
- node-staging-build-steps
Expand All @@ -698,7 +704,7 @@ jobs:
- node-staging-build-steps
build-staging-venly:
docker:
- image: cimg/node:16.13.1
- image: cimg/node:18.18.2
working_directory: ~/web3-onboard-monorepo/packages/venly
steps:
- node-staging-build-steps
Expand All @@ -722,7 +728,7 @@ jobs:
- node-staging-build-steps
build-staging-solid:
docker:
- image: cimg/node:16.14.2
- image: cimg/node:16.15.1
working_directory: ~/web3-onboard-monorepo/packages/solid
steps:
- node-staging-build-steps
Expand All @@ -738,6 +744,12 @@ jobs:
working_directory: ~/web3-onboard-monorepo/packages/particle-network
steps:
- node-staging-build-steps
build-staging-wagmi:
docker:
- image: cimg/node:18.0.0
working_directory: ~/web3-onboard-monorepo/packages/wagmi
steps:
- node-staging-build-steps
build-staging-passport:
docker:
- image: cimg/node:18.0.0
Expand All @@ -753,6 +765,7 @@ workflows:
<<: *deploy_production_filters
- build-staging-common:
<<: *deploy_staging_filters

core:
jobs:
- build-core:
Expand Down Expand Up @@ -1030,6 +1043,12 @@ workflows:
<<: *deploy_production_filters
- build-staging-particle:
<<: *deploy_staging_filters
wagmi:
jobs:
- build-wagmi:
<<: *deploy_production_filters
- build-staging-wagmi:
<<: *deploy_staging_filters
passport:
jobs:
- build-passport:
Expand Down
80 changes: 39 additions & 41 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"format": "prettier --plugin-search-dir . --write .",
"prepare": "svelte-kit sync",
"test": "playwright test",
"w3o-latest-prod": "yarn add '@web3-onboard/core' '@web3-onboard/coinbase' '@web3-onboard/transaction-preview' '@web3-onboard/dcent' '@web3-onboard/frontier' '@web3-onboard/fortmatic' '@web3-onboard/frame' '@web3-onboard/gas' '@web3-onboard/gnosis' '@web3-onboard/keepkey' '@web3-onboard/keystone' '@web3-onboard/ledger' '@web3-onboard/infinity-wallet' '@web3-onboard/injected-wallets' '@web3-onboard/magic' '@web3-onboard/phantom' '@web3-onboard/portis' '@web3-onboard/sequence' '@web3-onboard/trezor' '@web3-onboard/trust' '@web3-onboard/torus' '@web3-onboard/taho' '@web3-onboard/web3auth' '@web3-onboard/walletconnect' '@web3-onboard/enkrypt' '@web3-onboard/mew-wallet' '@web3-onboard/xdefi' '@web3-onboard/uauth' '@web3-onboard/zeal' '@web3-onboard/cede-store' '@web3-onboard/blocto'",
"w3o-latest-alpha": "yarn add '@web3-onboard/core@next' '@web3-onboard/coinbase@next' '@web3-onboard/transaction-preview@next' '@web3-onboard/dcent@next' '@web3-onboard/frontier@next' '@web3-onboard/fortmatic@next' '@web3-onboard/frame@next' '@web3-onboard/gas@next' '@web3-onboard/gnosis@next' '@web3-onboard/keepkey@next' '@web3-onboard/keystone@next' '@web3-onboard/ledger@next' '@web3-onboard/infinity-wallet@next' '@web3-onboard/injected-wallets@next' '@web3-onboard/magic@next' '@web3-onboard/phantom@next' '@web3-onboard/portis@next' '@web3-onboard/sequence@next' '@web3-onboard/trezor@next' '@web3-onboard/trust@next' '@web3-onboard/torus@next' '@web3-onboard/taho@next' '@web3-onboard/web3auth@next' '@web3-onboard/walletconnect@next' '@web3-onboard/enkrypt@next' '@web3-onboard/mew-wallet@next' '@web3-onboard/xdefi@next' '@web3-onboard/uauth@next' '@web3-onboard/zeal@next' '@web3-onboard/cede-store@next' '@web3-onboard/blocto@next'"
"w3o-latest-prod": "yarn add '@web3-onboard/core' '@web3-onboard/coinbase' '@web3-onboard/transaction-preview' '@web3-onboard/dcent' '@web3-onboard/frontier' '@web3-onboard/fortmatic' '@web3-onboard/frame' '@web3-onboard/gas' '@web3-onboard/gnosis' '@web3-onboard/keepkey' '@web3-onboard/keystone' '@web3-onboard/ledger' '@web3-onboard/infinity-wallet' '@web3-onboard/injected-wallets' '@web3-onboard/magic' '@web3-onboard/phantom' '@web3-onboard/portis' '@web3-onboard/sequence' '@web3-onboard/trezor' '@web3-onboard/trust' '@web3-onboard/torus' '@web3-onboard/taho' '@web3-onboard/web3auth' '@web3-onboard/walletconnect' '@web3-onboard/enkrypt' '@web3-onboard/mew-wallet' '@web3-onboard/xdefi' '@web3-onboard/uauth' '@web3-onboard/zeal' '@web3-onboard/cede-store' '@web3-onboard/blocto' '@web3-onboard/capsule' '@web3-onboard/particle-network' '@web3-onboard/metamask' '@web3-onboard/bitget' '@web3-onboard/arcana-auth' '@web3-onboard/venly'",
"w3o-latest-alpha": "yarn add '@web3-onboard/core@next' '@web3-onboard/coinbase@next' '@web3-onboard/transaction-preview@next' '@web3-onboard/dcent@next' '@web3-onboard/frontier@next' '@web3-onboard/fortmatic@next' '@web3-onboard/frame@next' '@web3-onboard/gas@next' '@web3-onboard/gnosis@next' '@web3-onboard/keepkey@next' '@web3-onboard/keystone@next' '@web3-onboard/ledger@next' '@web3-onboard/infinity-wallet@next' '@web3-onboard/injected-wallets@next' '@web3-onboard/magic@next' '@web3-onboard/phantom@next' '@web3-onboard/portis@next' '@web3-onboard/sequence@next' '@web3-onboard/trezor@next' '@web3-onboard/trust@next' '@web3-onboard/torus@next' '@web3-onboard/taho@next' '@web3-onboard/web3auth@next' '@web3-onboard/walletconnect@next' '@web3-onboard/enkrypt@next' '@web3-onboard/mew-wallet@next' '@web3-onboard/xdefi@next' '@web3-onboard/uauth@next' '@web3-onboard/zeal@next' '@web3-onboard/cede-store@next' '@web3-onboard/blocto@next' '@web3-onboard/capsule@next' '@web3-onboard/metamask@next' '@web3-onboard/bitget@next' '@web3-onboard/arcana-auth@next' '@web3-onboard/venly@next' '@web3-onboard/particle-network@next'"
},
"devDependencies": {
"@algolia/client-search": "^4.17.0",
Expand All @@ -36,59 +36,57 @@
"prettier-plugin-svelte": "^2.8.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"rollup-plugin-polyfill-node": "^0.12.0",
"rollup-plugin-polyfill-node": "^0.13.0",
"shiki": "^0.12.0",
"stream-browserify": "^3.0.0",
"stream-http": "^3.2.0",
"svelte": "^3.54.0",
"svelte-check": "^3.0.1",
"svelte-preprocess": "^5.0.3",
"tslib": "^2.4.1",
"typescript": "^5.0.4",
"typescript": "^5.4.5",
"unplugin-icons": "^0.14.0",
"vite": "^4.5.3"
},
"type": "module",
"dependencies": {
"@safe-global/safe-apps-provider": "^0.18.0",
"@safe-global/safe-apps-sdk": "^8.1.0",
"@web3-onboard/arcana-auth": "^2.0.0",
"@web3-onboard/bitget": "^2.0.0",
"@web3-onboard/blocto": "^2.0.0",
"@web3-onboard/capsule": "^2.0.3",
"@web3-onboard/cede-store": "^2.2.0",
"@web3-onboard/coinbase": "^2.2.7",
"@web3-onboard/core": "^2.21.6",
"@web3-onboard/dcent": "^2.2.7",
"@web3-onboard/enkrypt": "^2.0.4",
"@web3-onboard/fortmatic": "^2.0.19",
"@web3-onboard/frame": "^2.0.2",
"@web3-onboard/frontier": "^2.0.4",
"@web3-onboard/gas": "^2.1.8",
"@web3-onboard/gnosis": "^2.2.2",
"@web3-onboard/infinity-wallet": "^2.0.4",
"@web3-onboard/injected-wallets": "^2.10.17",
"@web3-onboard/keepkey": "^2.3.7",
"@web3-onboard/keystone": "^2.3.7",
"@web3-onboard/ledger": "^2.6.0",
"@web3-onboard/magic": "^2.1.7",
"@web3-onboard/metamask": "^2.0.7",
"@web3-onboard/mew-wallet": "^2.0.4",
"@web3-onboard/phantom": "^2.0.3",
"@web3-onboard/portis": "^2.1.7",
"@web3-onboard/sequence": "^2.0.8",
"@web3-onboard/taho": "^2.0.5",
"@web3-onboard/torus": "^2.2.6",
"@web3-onboard/transaction-preview": "^2.0.8",
"@web3-onboard/trezor": "^2.4.3",
"@web3-onboard/trust": "^2.0.4",
"@web3-onboard/uauth": "^2.1.1",
"@web3-onboard/venly": "^2.0.0",
"@web3-onboard/walletconnect": "^2.5.5",
"@web3-onboard/web3auth": "^2.2.3",
"@web3-onboard/xdefi": "^2.0.4",
"@web3-onboard/zeal": "^2.0.4",
"@web3-onboard/particle-network": "^2.0.1",
"@web3-onboard/bitget": "^2.1.0",
"@web3-onboard/blocto": "^2.1.0",
"@web3-onboard/cede-store": "^2.3.0",
"@web3-onboard/coinbase": "^2.3.0",
"@web3-onboard/core": "^2.22.0",
"@web3-onboard/dcent": "^2.2.8",
"@web3-onboard/enkrypt": "^2.1.0",
"@web3-onboard/fortmatic": "^2.1.0",
"@web3-onboard/frame": "^2.1.0",
"@web3-onboard/frontier": "^2.1.0",
"@web3-onboard/gas": "^2.2.0",
"@web3-onboard/gnosis": "^2.3.0",
"@web3-onboard/infinity-wallet": "^2.1.0",
"@web3-onboard/injected-wallets": "^2.11.0",
"@web3-onboard/keepkey": "^2.3.8",
"@web3-onboard/keystone": "^2.3.8",
"@web3-onboard/ledger": "^2.7.0",
"@web3-onboard/magic": "^2.2.0",
"@web3-onboard/metamask": "^2.1.0",
"@web3-onboard/mew-wallet": "^2.1.0",
"@web3-onboard/particle-network": "^2.1.0",
"@web3-onboard/phantom": "^2.1.0",
"@web3-onboard/portis": "^2.2.0",
"@web3-onboard/sequence": "^2.1.0",
"@web3-onboard/taho": "^2.1.0",
"@web3-onboard/torus": "^2.3.0",
"@web3-onboard/transaction-preview": "^2.1.0",
"@web3-onboard/trezor": "^2.4.4",
"@web3-onboard/trust": "^2.1.0",
"@web3-onboard/uauth": "^2.2.0",
"@web3-onboard/venly": "^2.1.0",
"@web3-onboard/walletconnect": "^2.6.0",
"@web3-onboard/web3auth": "^2.3.0",
"@web3-onboard/xdefi": "^2.1.0",
"@web3-onboard/zeal": "^2.1.0",
"animejs": "^3.2.1",
"bnc-sdk": "^4.6.6",
"ethers": "^5.7.0",
Expand Down
24 changes: 11 additions & 13 deletions docs/src/lib/services/onboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,19 +54,19 @@ const intiOnboard = async (theme) => {
const { default: xdefiModule } = await import('@web3-onboard/xdefi')
const { default: cedeModule } = await import('@web3-onboard/cede-store')
const { default: frameModule } = await import('@web3-onboard/frame')
const { default: arcanaModule } = await import('@web3-onboard/arcana-auth')
// const { default: arcanaModule } = await import('@web3-onboard/arcana-auth')
const { default: bloctoModule } = await import('@web3-onboard/blocto')
const { default: venlyModule } = await import('@web3-onboard/venly')
const { default: bitgetModule } = await import('@web3-onboard/bitget')
const { default: capsuleModule, Environment } = await import('@web3-onboard/capsule')
// // const { default: capsuleModule, Environment } = await import('@web3-onboard/capsule')
const { default: particleAuthModule } = await import('@web3-onboard/particle-network')
const INFURA_ID = '8b60d52405694345a99bcb82e722e0af'

const injected = injectedModule()
const infinityWallet = infinityWalletModule()
const arcanaWallet = arcanaModule({
clientID: 'xar_test_c9c3bc702eb13255c58dab0e74cfa859711c13cb'
})
// const arcanaWallet = arcanaModule({
// clientID: 'xar_test_c9c3bc702eb13255c58dab0e74cfa859711c13cb'
// })
const coinbase = coinbaseModule()
const metamask = metamaskModule({
options: {
Expand Down Expand Up @@ -131,10 +131,10 @@ const intiOnboard = async (theme) => {
environment: 'staging'
})

const capsule = capsuleModule({
environment: Environment.DEVELOPMENT,
apiKey: '992bbd9146d5de8ad0419f141d9a7ca7'
})
// // const capsule = capsuleModule({
// // environment: Environment.DEVELOPMENT,
// // apiKey: '992bbd9146d5de8ad0419f141d9a7ca7'
// // })

const particle = particleAuthModule({
projectId: 'b385ccf0-73c3-485a-9941-159b7855b806',
Expand All @@ -158,7 +158,7 @@ const intiOnboard = async (theme) => {
xdefi,
uauth,
cede,
arcanaWallet,
// arcanaWallet,
torus,
sequence,
dcent,
Expand All @@ -172,11 +172,9 @@ const intiOnboard = async (theme) => {
frame,
infinityWallet,
blocto,
capsule,
particle,
venly
// capsule

// venly
],
chains: [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ const MAINNET_RPC_URL = 'https://mainnet.infura.io/v3/<INFURA_KEY>'
const injected = injectedModule()

const onboard = Onboard({
// This javascript object is unordered meaning props do not require a certain order
wallets: [injected],
chains: [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ const appMetadata = {

```ts
const onboard = Onboard({
// This javascript object is unordered meaning props do not require a certain order
wallets,
chains,
appMetadata
Expand Down
Loading

0 comments on commit 0ea0fed

Please sign in to comment.