@multiplatform.one/web3 7.34.3 → 7.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -2
- package/dist/cjs/bundler/metaMaskConnectTimeouts.cjs +15 -6
- package/dist/cjs/bundler/metaMaskConnectTimeouts.native.js +15 -6
- package/dist/cjs/bundler/metaMaskConnectTimeouts.native.js.map +1 -1
- package/dist/cjs/components/NetworkSwitcher.cjs +2 -4
- package/dist/cjs/components/NetworkSwitcher.native.js +2 -7
- package/dist/cjs/components/NetworkSwitcher.native.js.map +1 -1
- package/dist/cjs/components/TransactionStatus.cjs +3 -4
- package/dist/cjs/components/TransactionStatus.native.js +3 -4
- package/dist/cjs/components/TransactionStatus.native.js.map +1 -1
- package/dist/cjs/connectkit/components/BalanceButton/index.cjs +3 -2
- package/dist/cjs/connectkit/components/BalanceButton/index.native.js +3 -2
- package/dist/cjs/connectkit/components/BalanceButton/index.native.js.map +1 -1
- package/dist/cjs/connectkit/components/Common/Chain/index.cjs +3 -2
- package/dist/cjs/connectkit/components/Common/Chain/index.native.js +3 -2
- package/dist/cjs/connectkit/components/Common/Chain/index.native.js.map +1 -1
- package/dist/cjs/connectkit/components/Common/ChainSelectDropdown/index.cjs +3 -2
- package/dist/cjs/connectkit/components/Common/ChainSelectDropdown/index.native.js +3 -2
- package/dist/cjs/connectkit/components/Common/ChainSelectDropdown/index.native.js.map +1 -1
- package/dist/cjs/connectkit/components/Common/ChainSelectList/index.cjs +8 -7
- package/dist/cjs/connectkit/components/Common/ChainSelectList/index.native.js +8 -7
- package/dist/cjs/connectkit/components/Common/ChainSelectList/index.native.js.map +1 -1
- package/dist/cjs/connectkit/components/ConnectButton/index.cjs +9 -8
- package/dist/cjs/connectkit/components/ConnectButton/index.native.js +9 -8
- package/dist/cjs/connectkit/components/ConnectButton/index.native.js.map +1 -1
- package/dist/cjs/connectkit/components/ConnectModal/ConnectWithInjector/CircleSpinner/index.cjs +4 -3
- package/dist/cjs/connectkit/components/ConnectModal/ConnectWithInjector/CircleSpinner/index.native.js +4 -3
- package/dist/cjs/connectkit/components/ConnectModal/ConnectWithInjector/CircleSpinner/index.native.js.map +1 -1
- package/dist/cjs/connectkit/components/ConnectModal/ConnectWithInjector/SquircleSpinner/index.cjs +3 -2
- package/dist/cjs/connectkit/components/ConnectModal/ConnectWithInjector/SquircleSpinner/index.native.js +3 -2
- package/dist/cjs/connectkit/components/ConnectModal/ConnectWithInjector/SquircleSpinner/index.native.js.map +1 -1
- package/dist/cjs/connectkit/components/ConnectModal/ConnectWithInjector/index.cjs +4 -3
- package/dist/cjs/connectkit/components/ConnectModal/ConnectWithInjector/index.native.js +4 -3
- package/dist/cjs/connectkit/components/ConnectModal/ConnectWithInjector/index.native.js.map +1 -1
- package/dist/cjs/connectkit/components/NetworkButton/index.cjs +2 -1
- package/dist/cjs/connectkit/components/NetworkButton/index.native.js +2 -1
- package/dist/cjs/connectkit/components/NetworkButton/index.native.js.map +1 -1
- package/dist/cjs/connectkit/components/Pages/About/graphics.cjs +2 -1
- package/dist/cjs/connectkit/components/Pages/About/graphics.native.js +2 -1
- package/dist/cjs/connectkit/components/Pages/About/graphics.native.js.map +1 -1
- package/dist/cjs/connectkit/components/Pages/About/index.cjs +3 -2
- package/dist/cjs/connectkit/components/Pages/About/index.native.js +3 -2
- package/dist/cjs/connectkit/components/Pages/About/index.native.js.map +1 -1
- package/dist/cjs/connectkit/components/Pages/Profile/index.cjs +3 -2
- package/dist/cjs/connectkit/components/Pages/Profile/index.native.js +3 -2
- package/dist/cjs/connectkit/components/Pages/Profile/index.native.js.map +1 -1
- package/dist/cjs/connectkit/components/Pages/SignInWithEthereum/index.cjs +4 -3
- package/dist/cjs/connectkit/components/Pages/SignInWithEthereum/index.native.js +4 -3
- package/dist/cjs/connectkit/components/Pages/SignInWithEthereum/index.native.js.map +1 -1
- package/dist/cjs/connectkit/openConnector/device.native.js.map +1 -1
- package/dist/cjs/connectkit/profileHeaderAction.cjs +4 -3
- package/dist/cjs/connectkit/profileHeaderAction.native.js +4 -3
- package/dist/cjs/connectkit/profileHeaderAction.native.js.map +1 -1
- package/dist/cjs/examples/LockContract.cjs +9 -11
- package/dist/cjs/examples/LockContract.native.js +9 -11
- package/dist/cjs/examples/LockContract.native.js.map +1 -1
- package/dist/cjs/keycloak/device.cjs +3 -1
- package/dist/cjs/keycloak/device.native.js +4 -2
- package/dist/cjs/keycloak/device.native.js.map +1 -1
- package/dist/cjs/vite.native.js.map +1 -1
- package/dist/esm/bundler/metaMaskConnectTimeouts.mjs +15 -6
- package/dist/esm/bundler/metaMaskConnectTimeouts.mjs.map +1 -1
- package/dist/esm/bundler/metaMaskConnectTimeouts.native.js +15 -6
- package/dist/esm/bundler/metaMaskConnectTimeouts.native.js.map +1 -1
- package/dist/esm/components/NetworkSwitcher.mjs +3 -5
- package/dist/esm/components/NetworkSwitcher.mjs.map +1 -1
- package/dist/esm/components/NetworkSwitcher.native.js +3 -8
- package/dist/esm/components/NetworkSwitcher.native.js.map +1 -1
- package/dist/esm/components/TransactionStatus.mjs +4 -5
- package/dist/esm/components/TransactionStatus.mjs.map +1 -1
- package/dist/esm/components/TransactionStatus.native.js +4 -5
- package/dist/esm/components/TransactionStatus.native.js.map +1 -1
- package/dist/esm/connectkit/components/BalanceButton/index.mjs +3 -2
- package/dist/esm/connectkit/components/BalanceButton/index.mjs.map +1 -1
- package/dist/esm/connectkit/components/BalanceButton/index.native.js +3 -2
- package/dist/esm/connectkit/components/BalanceButton/index.native.js.map +1 -1
- package/dist/esm/connectkit/components/Common/Chain/index.mjs +3 -2
- package/dist/esm/connectkit/components/Common/Chain/index.mjs.map +1 -1
- package/dist/esm/connectkit/components/Common/Chain/index.native.js +3 -2
- package/dist/esm/connectkit/components/Common/Chain/index.native.js.map +1 -1
- package/dist/esm/connectkit/components/Common/ChainSelectDropdown/index.mjs +3 -2
- package/dist/esm/connectkit/components/Common/ChainSelectDropdown/index.mjs.map +1 -1
- package/dist/esm/connectkit/components/Common/ChainSelectDropdown/index.native.js +3 -2
- package/dist/esm/connectkit/components/Common/ChainSelectDropdown/index.native.js.map +1 -1
- package/dist/esm/connectkit/components/Common/ChainSelectList/index.mjs +8 -7
- package/dist/esm/connectkit/components/Common/ChainSelectList/index.mjs.map +1 -1
- package/dist/esm/connectkit/components/Common/ChainSelectList/index.native.js +8 -7
- package/dist/esm/connectkit/components/Common/ChainSelectList/index.native.js.map +1 -1
- package/dist/esm/connectkit/components/ConnectButton/index.mjs +9 -8
- package/dist/esm/connectkit/components/ConnectButton/index.mjs.map +1 -1
- package/dist/esm/connectkit/components/ConnectButton/index.native.js +9 -8
- package/dist/esm/connectkit/components/ConnectButton/index.native.js.map +1 -1
- package/dist/esm/connectkit/components/ConnectModal/ConnectWithInjector/CircleSpinner/index.mjs +4 -3
- package/dist/esm/connectkit/components/ConnectModal/ConnectWithInjector/CircleSpinner/index.mjs.map +1 -1
- package/dist/esm/connectkit/components/ConnectModal/ConnectWithInjector/CircleSpinner/index.native.js +4 -3
- package/dist/esm/connectkit/components/ConnectModal/ConnectWithInjector/CircleSpinner/index.native.js.map +1 -1
- package/dist/esm/connectkit/components/ConnectModal/ConnectWithInjector/SquircleSpinner/index.mjs +3 -2
- package/dist/esm/connectkit/components/ConnectModal/ConnectWithInjector/SquircleSpinner/index.mjs.map +1 -1
- package/dist/esm/connectkit/components/ConnectModal/ConnectWithInjector/SquircleSpinner/index.native.js +3 -2
- package/dist/esm/connectkit/components/ConnectModal/ConnectWithInjector/SquircleSpinner/index.native.js.map +1 -1
- package/dist/esm/connectkit/components/ConnectModal/ConnectWithInjector/index.mjs +4 -3
- package/dist/esm/connectkit/components/ConnectModal/ConnectWithInjector/index.mjs.map +1 -1
- package/dist/esm/connectkit/components/ConnectModal/ConnectWithInjector/index.native.js +4 -3
- package/dist/esm/connectkit/components/ConnectModal/ConnectWithInjector/index.native.js.map +1 -1
- package/dist/esm/connectkit/components/NetworkButton/index.mjs +2 -1
- package/dist/esm/connectkit/components/NetworkButton/index.mjs.map +1 -1
- package/dist/esm/connectkit/components/NetworkButton/index.native.js +2 -1
- package/dist/esm/connectkit/components/NetworkButton/index.native.js.map +1 -1
- package/dist/esm/connectkit/components/Pages/About/graphics.mjs +2 -1
- package/dist/esm/connectkit/components/Pages/About/graphics.mjs.map +1 -1
- package/dist/esm/connectkit/components/Pages/About/graphics.native.js +2 -1
- package/dist/esm/connectkit/components/Pages/About/graphics.native.js.map +1 -1
- package/dist/esm/connectkit/components/Pages/About/index.mjs +3 -2
- package/dist/esm/connectkit/components/Pages/About/index.mjs.map +1 -1
- package/dist/esm/connectkit/components/Pages/About/index.native.js +3 -2
- package/dist/esm/connectkit/components/Pages/About/index.native.js.map +1 -1
- package/dist/esm/connectkit/components/Pages/Profile/index.mjs +3 -2
- package/dist/esm/connectkit/components/Pages/Profile/index.mjs.map +1 -1
- package/dist/esm/connectkit/components/Pages/Profile/index.native.js +3 -2
- package/dist/esm/connectkit/components/Pages/Profile/index.native.js.map +1 -1
- package/dist/esm/connectkit/components/Pages/SignInWithEthereum/index.mjs +4 -3
- package/dist/esm/connectkit/components/Pages/SignInWithEthereum/index.mjs.map +1 -1
- package/dist/esm/connectkit/components/Pages/SignInWithEthereum/index.native.js +4 -3
- package/dist/esm/connectkit/components/Pages/SignInWithEthereum/index.native.js.map +1 -1
- package/dist/esm/connectkit/openConnector/device.mjs.map +1 -1
- package/dist/esm/connectkit/openConnector/device.native.js.map +1 -1
- package/dist/esm/connectkit/profileHeaderAction.mjs +4 -3
- package/dist/esm/connectkit/profileHeaderAction.mjs.map +1 -1
- package/dist/esm/connectkit/profileHeaderAction.native.js +4 -3
- package/dist/esm/connectkit/profileHeaderAction.native.js.map +1 -1
- package/dist/esm/examples/LockContract.mjs +10 -12
- package/dist/esm/examples/LockContract.mjs.map +1 -1
- package/dist/esm/examples/LockContract.native.js +10 -12
- package/dist/esm/examples/LockContract.native.js.map +1 -1
- package/dist/esm/keycloak/device.mjs +3 -1
- package/dist/esm/keycloak/device.mjs.map +1 -1
- package/dist/esm/keycloak/device.native.js +4 -2
- package/dist/esm/keycloak/device.native.js.map +1 -1
- package/dist/esm/vite.mjs.map +1 -1
- package/dist/esm/vite.native.js.map +1 -1
- package/dist/jsx/bundler/metaMaskConnectTimeouts.mjs +15 -6
- package/dist/jsx/bundler/metaMaskConnectTimeouts.mjs.map +1 -1
- package/dist/jsx/bundler/metaMaskConnectTimeouts.native.js +15 -6
- package/dist/jsx/bundler/metaMaskConnectTimeouts.native.js.map +1 -1
- package/dist/jsx/components/NetworkSwitcher.mjs +3 -5
- package/dist/jsx/components/NetworkSwitcher.mjs.map +1 -1
- package/dist/jsx/components/NetworkSwitcher.native.js +2 -7
- package/dist/jsx/components/NetworkSwitcher.native.js.map +1 -1
- package/dist/jsx/components/TransactionStatus.mjs +4 -5
- package/dist/jsx/components/TransactionStatus.mjs.map +1 -1
- package/dist/jsx/components/TransactionStatus.native.js +3 -4
- package/dist/jsx/components/TransactionStatus.native.js.map +1 -1
- package/dist/jsx/connectkit/components/BalanceButton/index.mjs +3 -2
- package/dist/jsx/connectkit/components/BalanceButton/index.mjs.map +1 -1
- package/dist/jsx/connectkit/components/BalanceButton/index.native.js +3 -2
- package/dist/jsx/connectkit/components/BalanceButton/index.native.js.map +1 -1
- package/dist/jsx/connectkit/components/Common/Chain/index.mjs +3 -2
- package/dist/jsx/connectkit/components/Common/Chain/index.mjs.map +1 -1
- package/dist/jsx/connectkit/components/Common/Chain/index.native.js +3 -2
- package/dist/jsx/connectkit/components/Common/Chain/index.native.js.map +1 -1
- package/dist/jsx/connectkit/components/Common/ChainSelectDropdown/index.mjs +3 -2
- package/dist/jsx/connectkit/components/Common/ChainSelectDropdown/index.mjs.map +1 -1
- package/dist/jsx/connectkit/components/Common/ChainSelectDropdown/index.native.js +3 -2
- package/dist/jsx/connectkit/components/Common/ChainSelectDropdown/index.native.js.map +1 -1
- package/dist/jsx/connectkit/components/Common/ChainSelectList/index.mjs +8 -7
- package/dist/jsx/connectkit/components/Common/ChainSelectList/index.mjs.map +1 -1
- package/dist/jsx/connectkit/components/Common/ChainSelectList/index.native.js +8 -7
- package/dist/jsx/connectkit/components/Common/ChainSelectList/index.native.js.map +1 -1
- package/dist/jsx/connectkit/components/ConnectButton/index.mjs +9 -8
- package/dist/jsx/connectkit/components/ConnectButton/index.mjs.map +1 -1
- package/dist/jsx/connectkit/components/ConnectButton/index.native.js +9 -8
- package/dist/jsx/connectkit/components/ConnectButton/index.native.js.map +1 -1
- package/dist/jsx/connectkit/components/ConnectModal/ConnectWithInjector/CircleSpinner/index.mjs +4 -3
- package/dist/jsx/connectkit/components/ConnectModal/ConnectWithInjector/CircleSpinner/index.mjs.map +1 -1
- package/dist/jsx/connectkit/components/ConnectModal/ConnectWithInjector/CircleSpinner/index.native.js +4 -3
- package/dist/jsx/connectkit/components/ConnectModal/ConnectWithInjector/CircleSpinner/index.native.js.map +1 -1
- package/dist/jsx/connectkit/components/ConnectModal/ConnectWithInjector/SquircleSpinner/index.mjs +3 -2
- package/dist/jsx/connectkit/components/ConnectModal/ConnectWithInjector/SquircleSpinner/index.mjs.map +1 -1
- package/dist/jsx/connectkit/components/ConnectModal/ConnectWithInjector/SquircleSpinner/index.native.js +3 -2
- package/dist/jsx/connectkit/components/ConnectModal/ConnectWithInjector/SquircleSpinner/index.native.js.map +1 -1
- package/dist/jsx/connectkit/components/ConnectModal/ConnectWithInjector/index.mjs +4 -3
- package/dist/jsx/connectkit/components/ConnectModal/ConnectWithInjector/index.mjs.map +1 -1
- package/dist/jsx/connectkit/components/ConnectModal/ConnectWithInjector/index.native.js +4 -3
- package/dist/jsx/connectkit/components/ConnectModal/ConnectWithInjector/index.native.js.map +1 -1
- package/dist/jsx/connectkit/components/NetworkButton/index.mjs +2 -1
- package/dist/jsx/connectkit/components/NetworkButton/index.mjs.map +1 -1
- package/dist/jsx/connectkit/components/NetworkButton/index.native.js +2 -1
- package/dist/jsx/connectkit/components/NetworkButton/index.native.js.map +1 -1
- package/dist/jsx/connectkit/components/Pages/About/graphics.mjs +2 -1
- package/dist/jsx/connectkit/components/Pages/About/graphics.mjs.map +1 -1
- package/dist/jsx/connectkit/components/Pages/About/graphics.native.js +2 -1
- package/dist/jsx/connectkit/components/Pages/About/graphics.native.js.map +1 -1
- package/dist/jsx/connectkit/components/Pages/About/index.mjs +3 -2
- package/dist/jsx/connectkit/components/Pages/About/index.mjs.map +1 -1
- package/dist/jsx/connectkit/components/Pages/About/index.native.js +3 -2
- package/dist/jsx/connectkit/components/Pages/About/index.native.js.map +1 -1
- package/dist/jsx/connectkit/components/Pages/Profile/index.mjs +3 -2
- package/dist/jsx/connectkit/components/Pages/Profile/index.mjs.map +1 -1
- package/dist/jsx/connectkit/components/Pages/Profile/index.native.js +3 -2
- package/dist/jsx/connectkit/components/Pages/Profile/index.native.js.map +1 -1
- package/dist/jsx/connectkit/components/Pages/SignInWithEthereum/index.mjs +4 -3
- package/dist/jsx/connectkit/components/Pages/SignInWithEthereum/index.mjs.map +1 -1
- package/dist/jsx/connectkit/components/Pages/SignInWithEthereum/index.native.js +4 -3
- package/dist/jsx/connectkit/components/Pages/SignInWithEthereum/index.native.js.map +1 -1
- package/dist/jsx/connectkit/openConnector/device.mjs.map +1 -1
- package/dist/jsx/connectkit/openConnector/device.native.js.map +1 -1
- package/dist/jsx/connectkit/profileHeaderAction.mjs +4 -3
- package/dist/jsx/connectkit/profileHeaderAction.mjs.map +1 -1
- package/dist/jsx/connectkit/profileHeaderAction.native.js +4 -3
- package/dist/jsx/connectkit/profileHeaderAction.native.js.map +1 -1
- package/dist/jsx/examples/LockContract.mjs +10 -12
- package/dist/jsx/examples/LockContract.mjs.map +1 -1
- package/dist/jsx/examples/LockContract.native.js +9 -11
- package/dist/jsx/examples/LockContract.native.js.map +1 -1
- package/dist/jsx/keycloak/device.mjs +3 -1
- package/dist/jsx/keycloak/device.mjs.map +1 -1
- package/dist/jsx/keycloak/device.native.js +4 -2
- package/dist/jsx/keycloak/device.native.js.map +1 -1
- package/dist/jsx/vite.mjs.map +1 -1
- package/dist/jsx/vite.native.js.map +1 -1
- package/dist/keycloak/login.iife.js +421 -421
- package/package.json +6 -6
- package/src/bundler/metaMaskConnectTimeouts.spec.ts +82 -7
- package/src/bundler/metaMaskConnectTimeouts.ts +29 -10
- package/src/components/NetworkSwitcher.tsx +4 -9
- package/src/components/TransactionStatus.tsx +4 -4
- package/src/connectkit/components/BalanceButton/index.tsx +4 -3
- package/src/connectkit/components/Common/Chain/index.tsx +3 -2
- package/src/connectkit/components/Common/ChainSelectDropdown/index.tsx +3 -2
- package/src/connectkit/components/Common/ChainSelectList/index.tsx +8 -7
- package/src/connectkit/components/ConnectButton/index.tsx +9 -8
- package/src/connectkit/components/ConnectModal/ConnectWithInjector/CircleSpinner/index.tsx +6 -3
- package/src/connectkit/components/ConnectModal/ConnectWithInjector/SquircleSpinner/index.tsx +5 -2
- package/src/connectkit/components/ConnectModal/ConnectWithInjector/index.tsx +4 -3
- package/src/connectkit/components/NetworkButton/index.tsx +2 -1
- package/src/connectkit/components/Pages/About/graphics.tsx +2 -1
- package/src/connectkit/components/Pages/About/index.tsx +3 -2
- package/src/connectkit/components/Pages/Profile/index.tsx +3 -2
- package/src/connectkit/components/Pages/SignInWithEthereum/index.tsx +4 -3
- package/src/connectkit/connectors/metaMaskConnectConnector.spec.ts +32 -0
- package/src/connectkit/openConnector/context.tsx +3 -3
- package/src/connectkit/openConnector/device.spec.ts +27 -0
- package/src/connectkit/openConnector/device.ts +5 -4
- package/src/connectkit/profileHeaderAction.tsx +10 -3
- package/src/esbuild.ts +3 -3
- package/src/examples/LockContract.tsx +9 -9
- package/src/keycloak/device.spec.ts +39 -0
- package/src/keycloak/device.ts +5 -1
- package/src/vite.ts +5 -3
- package/types/bundler/metaMaskConnectTimeouts.d.ts +6 -4
- package/types/bundler/metaMaskConnectTimeouts.d.ts.map +1 -1
- package/types/components/NetworkSwitcher.d.ts.map +1 -1
- package/types/connectkit/components/BalanceButton/index.d.ts.map +1 -1
- package/types/connectkit/components/Common/Chain/index.d.ts.map +1 -1
- package/types/connectkit/components/Common/ChainSelectDropdown/index.d.ts.map +1 -1
- package/types/connectkit/components/Common/ChainSelectList/index.d.ts.map +1 -1
- package/types/connectkit/components/ConnectButton/index.d.ts.map +1 -1
- package/types/connectkit/components/ConnectModal/ConnectWithInjector/CircleSpinner/index.d.ts.map +1 -1
- package/types/connectkit/components/ConnectModal/ConnectWithInjector/SquircleSpinner/index.d.ts.map +1 -1
- package/types/connectkit/components/ConnectModal/ConnectWithInjector/index.d.ts.map +1 -1
- package/types/connectkit/components/NetworkButton/index.d.ts.map +1 -1
- package/types/connectkit/components/Pages/About/graphics.d.ts.map +1 -1
- package/types/connectkit/components/Pages/About/index.d.ts.map +1 -1
- package/types/connectkit/components/Pages/Profile/index.d.ts.map +1 -1
- package/types/connectkit/components/Pages/SignInWithEthereum/index.d.ts.map +1 -1
- package/types/connectkit/openConnector/context.d.ts +3 -3
- package/types/connectkit/openConnector/device.d.ts +5 -4
- package/types/connectkit/openConnector/device.d.ts.map +1 -1
- package/types/connectkit/profileHeaderAction.d.ts.map +1 -1
- package/types/esbuild.d.ts +3 -3
- package/types/keycloak/device.d.ts +1 -0
- package/types/keycloak/device.d.ts.map +1 -1
- package/types/vite.d.ts +5 -3
- package/types/vite.d.ts.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@multiplatform.one/web3",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.35.0",
|
|
4
4
|
"description": "Web3 wallet integration for multiplatform.one ecosystem with ConnectKit and wagmi",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"connectkit",
|
|
@@ -120,10 +120,10 @@
|
|
|
120
120
|
"@aave/account": "^0.2.1",
|
|
121
121
|
"@coinbase/wallet-sdk": "^4.4.0",
|
|
122
122
|
"@metamask/connect-evm": "^2.1.1",
|
|
123
|
-
"@multiplatform.one/connectkit": "^7.
|
|
124
|
-
"@multiplatform.one/gpg": "^7.
|
|
125
|
-
"@multiplatform.one/platform": "^7.
|
|
126
|
-
"@multiplatform.one/theme": "^7.
|
|
123
|
+
"@multiplatform.one/connectkit": "^7.35.0",
|
|
124
|
+
"@multiplatform.one/gpg": "^7.35.0",
|
|
125
|
+
"@multiplatform.one/platform": "^7.35.0",
|
|
126
|
+
"@multiplatform.one/theme": "^7.35.0",
|
|
127
127
|
"@noble/ciphers": "^1.3.0",
|
|
128
128
|
"@noble/curves": "^1.9.7",
|
|
129
129
|
"@solana/kit": "^8.5.0",
|
|
@@ -146,7 +146,7 @@
|
|
|
146
146
|
"wagmi": "^3.7.1"
|
|
147
147
|
},
|
|
148
148
|
"devDependencies": {
|
|
149
|
-
"@multiplatform.one/config": "7.
|
|
149
|
+
"@multiplatform.one/config": "7.35.0",
|
|
150
150
|
"@tamagui/build": "2.7.6",
|
|
151
151
|
"@tanstack/react-query": "^5.104.3",
|
|
152
152
|
"@testing-library/jest-dom": "^7.0.1",
|
|
@@ -49,6 +49,9 @@ const multichainFiles = exportedFiles(multichainDir);
|
|
|
49
49
|
const dappClientFiles = exportedFiles(dappClientDir);
|
|
50
50
|
const read = (file: string) => readFileSync(file, "utf8");
|
|
51
51
|
|
|
52
|
+
const iPadCheck =
|
|
53
|
+
/if \(window\.navigator\.maxTouchPoints > 1 && \/Macintosh\/\.test\(window\.navigator\.userAgent\)\) return true;/g;
|
|
54
|
+
|
|
52
55
|
const pageLoadResume =
|
|
53
56
|
/resumeSession_fn = function\(session, options\)[\s\S]*?isContinuingPriorAttempt \? this\.options\.resumeTimeout : options \? this\.options\.connectionTimeout : 120 \* 1e3/;
|
|
54
57
|
const stockConnectionTimer =
|
|
@@ -96,6 +99,18 @@ describe("the timer patches on the installed MetaMask Connect", () => {
|
|
|
96
99
|
}
|
|
97
100
|
});
|
|
98
101
|
|
|
102
|
+
it("adds the iPad touch check to the platform check once", () => {
|
|
103
|
+
for (const file of multichainFiles) {
|
|
104
|
+
const code = read(file);
|
|
105
|
+
expect(code).not.toContain("maxTouchPoints");
|
|
106
|
+
const patched = patchMetaMaskConnectTimeouts(file, code)!.code;
|
|
107
|
+
expect(patched.match(iPadCheck)).toHaveLength(1);
|
|
108
|
+
expect(patched).toMatch(
|
|
109
|
+
/function isMobile\d*\(\) \{\n {2}if \(window\.navigator\.maxTouchPoints > 1/,
|
|
110
|
+
);
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
|
|
99
114
|
it("fails the build when a package renames the marker it looks for", () => {
|
|
100
115
|
const [multichain] = multichainFiles;
|
|
101
116
|
const [dappClient] = dappClientFiles;
|
|
@@ -109,9 +124,7 @@ describe("the timer patches on the installed MetaMask Connect", () => {
|
|
|
109
124
|
),
|
|
110
125
|
).toBeUndefined();
|
|
111
126
|
renamedGrace.patch(dappClient!, read(dappClient!));
|
|
112
|
-
expect(renamedGrace.problem()).toMatch(
|
|
113
|
-
/left the timers in @metamask\/connect-multichain unpatched/,
|
|
114
|
-
);
|
|
127
|
+
expect(renamedGrace.problem()).toMatch(/left @metamask\/connect-multichain unpatched/);
|
|
115
128
|
|
|
116
129
|
const renamedHandshake = createMetaMaskConnectTimeoutTracker();
|
|
117
130
|
renamedHandshake.see(connectEvmEntry);
|
|
@@ -121,7 +134,7 @@ describe("the timer patches on the installed MetaMask Connect", () => {
|
|
|
121
134
|
read(dappClient!).replaceAll("HANDSHAKE_TIMEOUT", "HANDSHAKE_GRACE"),
|
|
122
135
|
);
|
|
123
136
|
expect(renamedHandshake.problem()).toMatch(
|
|
124
|
-
/left
|
|
137
|
+
/left @metamask\/mobile-wallet-protocol-dapp-client unpatched/,
|
|
125
138
|
);
|
|
126
139
|
});
|
|
127
140
|
|
|
@@ -142,6 +155,12 @@ describe("the timer patches on the installed MetaMask Connect", () => {
|
|
|
142
155
|
read(dappClient!).replace("HANDSHAKE_TIMEOUT = 60 * 1e3;", "HANDSHAKE_TIMEOUT = 45 * 1e3;"),
|
|
143
156
|
),
|
|
144
157
|
).toThrow(/timer HANDSHAKE_TIMEOUT not found/);
|
|
158
|
+
expect(() =>
|
|
159
|
+
patchMetaMaskConnectTimeouts(
|
|
160
|
+
multichain!,
|
|
161
|
+
code.replace(/function isMobile(\d*)\(\)/, "function isPhone$1()"),
|
|
162
|
+
),
|
|
163
|
+
).toThrow(/platform check isMobile not found .* would lose the MetaMask app on an iPad/);
|
|
145
164
|
// A resume that no longer reads the connection timer must not send the
|
|
146
165
|
// rewrite on to startSession's copy of the expression.
|
|
147
166
|
expect(() =>
|
|
@@ -259,6 +278,61 @@ describe("the patched MetaMask Connect transport", () => {
|
|
|
259
278
|
});
|
|
260
279
|
});
|
|
261
280
|
|
|
281
|
+
const userAgents = {
|
|
282
|
+
iPadSafari:
|
|
283
|
+
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.0 Safari/605.1.15",
|
|
284
|
+
iPhone:
|
|
285
|
+
"Mozilla/5.0 (iPhone; CPU iPhone OS 18_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.0 Mobile/15E148 Safari/604.1",
|
|
286
|
+
windows:
|
|
287
|
+
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36",
|
|
288
|
+
};
|
|
289
|
+
|
|
290
|
+
/** connect-multichain's getPlatformType from its node build, with the patch applied or not. */
|
|
291
|
+
function loadGetPlatformType(patched: boolean): () => string {
|
|
292
|
+
const file = requireHere.resolve(multichainPkg);
|
|
293
|
+
const code = patched ? patchMetaMaskConnectTimeouts(file, read(file))!.code : read(file);
|
|
294
|
+
const wrapper = runInThisContext(
|
|
295
|
+
`(function (module, exports, require, __filename, __dirname) {${code}\nreturn (init_platform(), getPlatformType);\n})`,
|
|
296
|
+
{ filename: file },
|
|
297
|
+
);
|
|
298
|
+
const module = { exports: {} };
|
|
299
|
+
return wrapper(module, module.exports, createRequire(file), file, dirname(file));
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
describe("the patched MetaMask Connect platform check", () => {
|
|
303
|
+
const stock = loadGetPlatformType(false);
|
|
304
|
+
const patched = loadGetPlatformType(true);
|
|
305
|
+
|
|
306
|
+
function on(userAgent: string, maxTouchPoints: number) {
|
|
307
|
+
const navigator = { userAgent, maxTouchPoints, product: "Gecko" };
|
|
308
|
+
vi.stubGlobal("navigator", navigator);
|
|
309
|
+
vi.stubGlobal("window", { navigator });
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
afterEach(() => vi.unstubAllGlobals());
|
|
313
|
+
|
|
314
|
+
it("takes an iPad on Safari's desktop site for mobile web, which stock MetaMask Connect does not", () => {
|
|
315
|
+
on(userAgents.iPadSafari, 5);
|
|
316
|
+
expect(stock()).toBe("web-desktop");
|
|
317
|
+
expect(patched()).toBe("web-mobile");
|
|
318
|
+
});
|
|
319
|
+
|
|
320
|
+
it("keeps a Mac, which reports no touch points, on desktop web", () => {
|
|
321
|
+
on(userAgents.iPadSafari, 0);
|
|
322
|
+
expect(patched()).toBe("web-desktop");
|
|
323
|
+
});
|
|
324
|
+
|
|
325
|
+
it("keeps a touch-screen Windows laptop on desktop web", () => {
|
|
326
|
+
on(userAgents.windows, 10);
|
|
327
|
+
expect(patched()).toBe("web-desktop");
|
|
328
|
+
});
|
|
329
|
+
|
|
330
|
+
it("still takes an iPhone for mobile web", () => {
|
|
331
|
+
on(userAgents.iPhone, 5);
|
|
332
|
+
expect(patched()).toBe("web-mobile");
|
|
333
|
+
});
|
|
334
|
+
});
|
|
335
|
+
|
|
262
336
|
const entryId = "mpo-web3-timer-entry";
|
|
263
337
|
const entrySource = 'export { createEVMClient } from "@metamask/connect-evm";';
|
|
264
338
|
|
|
@@ -285,6 +359,7 @@ function expectLongTimers(code: string) {
|
|
|
285
359
|
expect(code).toMatch(/resumeTimeout : [\w$]+ \? this\.options\.connectionTimeout : 120 \* 1e3/);
|
|
286
360
|
expect(code).not.toMatch(/DEFAULT_REQUEST_TIMEOUT[\w$]* = 60 \* 1e3;\s+CONNECTION_GRACE_PERIOD/);
|
|
287
361
|
expect(code).not.toMatch(/HANDSHAKE_TIMEOUT[\w$]* = 60 \* 1e3;/);
|
|
362
|
+
expect(code.match(iPadCheck)).toHaveLength(1);
|
|
288
363
|
}
|
|
289
364
|
|
|
290
365
|
function viteBuild(plugins: Plugin[]) {
|
|
@@ -315,7 +390,7 @@ describe("the bundler plugins", () => {
|
|
|
315
390
|
|
|
316
391
|
it("fails a vite build that bundles MetaMask Connect with a marker gone", async () => {
|
|
317
392
|
await expect(viteBuild([entry, renameGracePeriod, metaMaskConnectTimeouts()])).rejects.toThrow(
|
|
318
|
-
/left
|
|
393
|
+
/left @metamask\/connect-multichain unpatched/,
|
|
319
394
|
);
|
|
320
395
|
}, 120_000);
|
|
321
396
|
|
|
@@ -351,7 +426,7 @@ describe("the bundler plugins", () => {
|
|
|
351
426
|
|
|
352
427
|
it("fails the dev server's pre-bundle when a marker is gone", async () => {
|
|
353
428
|
await expect(preBundle([renameGracePeriod])).rejects.toThrow(
|
|
354
|
-
/left
|
|
429
|
+
/left @metamask\/connect-multichain unpatched/,
|
|
355
430
|
);
|
|
356
431
|
}, 120_000);
|
|
357
432
|
|
|
@@ -387,7 +462,7 @@ describe("the bundler plugins", () => {
|
|
|
387
462
|
},
|
|
388
463
|
};
|
|
389
464
|
await expect(esbuildBundle([renamed])).rejects.toThrow(
|
|
390
|
-
/left
|
|
465
|
+
/left @metamask\/connect-multichain unpatched/,
|
|
391
466
|
);
|
|
392
467
|
}, 120_000);
|
|
393
468
|
});
|
|
@@ -13,16 +13,25 @@
|
|
|
13
13
|
// MetaMask and connector calls wait on the resume. The resume made without
|
|
14
14
|
// connect options (the page-load one) keeps the stock 120 s.
|
|
15
15
|
//
|
|
16
|
+
// The same patch makes MetaMask Connect's platform check count an iPad. iPadOS
|
|
17
|
+
// Safari sends a Mac user agent by default, so MetaMask Connect took it for a
|
|
18
|
+
// desktop and showed its install/QR modal instead of opening the MetaMask app.
|
|
19
|
+
// A Mac reports no touch points, so it keeps the extension and QR path.
|
|
20
|
+
//
|
|
16
21
|
// A pattern that stops matching fails the build instead of quietly shipping the
|
|
17
|
-
// short timers again.
|
|
22
|
+
// short timers, or the desktop iPad, again.
|
|
18
23
|
|
|
19
24
|
export type MetaMaskConnectTimerRewrite = {
|
|
20
|
-
/**
|
|
21
|
-
|
|
25
|
+
/** What the rewrite changes, as a build error names it. */
|
|
26
|
+
target: string;
|
|
27
|
+
/** What a build without the rewrite would lose, as a build error names it. */
|
|
28
|
+
lost: string;
|
|
22
29
|
pattern: RegExp;
|
|
23
30
|
replacement: string;
|
|
24
31
|
};
|
|
25
32
|
|
|
33
|
+
const longTimers = "the long Android timers";
|
|
34
|
+
|
|
26
35
|
export type MetaMaskConnectTimeoutPatch = {
|
|
27
36
|
pkg: string;
|
|
28
37
|
marker: string;
|
|
@@ -35,16 +44,25 @@ export const metaMaskConnectTimeoutPatches: readonly MetaMaskConnectTimeoutPatch
|
|
|
35
44
|
marker: "CONNECTION_GRACE_PERIOD",
|
|
36
45
|
rewrites: [
|
|
37
46
|
{
|
|
38
|
-
|
|
47
|
+
target: "timer DEFAULT_REQUEST_TIMEOUT",
|
|
48
|
+
lost: longTimers,
|
|
39
49
|
pattern: /(DEFAULT_REQUEST_TIMEOUT\d*) = 60 \* 1e3;(\s+CONNECTION_GRACE_PERIOD =)/,
|
|
40
50
|
replacement: "$1 = 600 * 1e3;$2",
|
|
41
51
|
},
|
|
42
52
|
{
|
|
43
|
-
|
|
53
|
+
target: "timer the page-load session resume",
|
|
54
|
+
lost: longTimers,
|
|
44
55
|
pattern:
|
|
45
56
|
/(resumeSession_fn = function\((\w+), (\w+)\)(?:(?!startSession_fn)[\s\S])*?isContinuingPriorAttempt \? this\.options\.resumeTimeout : )this\.options\.connectionTimeout/,
|
|
46
57
|
replacement: "$1$3 ? this.options.connectionTimeout : 120 * 1e3",
|
|
47
58
|
},
|
|
59
|
+
{
|
|
60
|
+
target: "platform check isMobile",
|
|
61
|
+
lost: "the MetaMask app on an iPad",
|
|
62
|
+
pattern: /(function isMobile\d*\(\) \{)(?=[^}]*?\.parse\(window\.navigator\.userAgent\))/,
|
|
63
|
+
replacement:
|
|
64
|
+
"$1\n if (window.navigator.maxTouchPoints > 1 && /Macintosh/.test(window.navigator.userAgent)) return true;",
|
|
65
|
+
},
|
|
48
66
|
],
|
|
49
67
|
},
|
|
50
68
|
{
|
|
@@ -52,7 +70,8 @@ export const metaMaskConnectTimeoutPatches: readonly MetaMaskConnectTimeoutPatch
|
|
|
52
70
|
marker: "HANDSHAKE_TIMEOUT",
|
|
53
71
|
rewrites: [
|
|
54
72
|
{
|
|
55
|
-
|
|
73
|
+
target: "timer HANDSHAKE_TIMEOUT",
|
|
74
|
+
lost: longTimers,
|
|
56
75
|
pattern: /(HANDSHAKE_TIMEOUT) = 60 \* 1e3;/,
|
|
57
76
|
replacement: "$1 = 540 * 1e3;",
|
|
58
77
|
},
|
|
@@ -89,7 +108,7 @@ export function patchMetaMaskConnectTimeouts(
|
|
|
89
108
|
for (const rewrite of patch.rewrites) {
|
|
90
109
|
if (!rewrite.pattern.test(patched))
|
|
91
110
|
throw new Error(
|
|
92
|
-
`MetaMask Connect
|
|
111
|
+
`MetaMask Connect ${rewrite.target} not found in ${id}: ${patch.pkg} changed its source, and a build without this rewrite would lose ${rewrite.lost}`,
|
|
93
112
|
);
|
|
94
113
|
patched = patched.replace(rewrite.pattern, rewrite.replacement);
|
|
95
114
|
}
|
|
@@ -98,7 +117,7 @@ export function patchMetaMaskConnectTimeouts(
|
|
|
98
117
|
|
|
99
118
|
/**
|
|
100
119
|
* Counts what one build patched, so the build can refuse to ship MetaMask Connect
|
|
101
|
-
* with a
|
|
120
|
+
* with a patch left out (a package renamed the marker the patch looks for).
|
|
102
121
|
*/
|
|
103
122
|
export function createMetaMaskConnectTimeoutTracker() {
|
|
104
123
|
const patched = new Map<string, number>();
|
|
@@ -113,14 +132,14 @@ export function createMetaMaskConnectTimeoutTracker() {
|
|
|
113
132
|
if (result) patched.set(result.pkg, (patched.get(result.pkg) ?? 0) + 1);
|
|
114
133
|
return result;
|
|
115
134
|
},
|
|
116
|
-
/** Error text when the build bundles MetaMask Connect with a
|
|
135
|
+
/** Error text when the build bundles MetaMask Connect with a patch left out. */
|
|
117
136
|
problem(): string | undefined {
|
|
118
137
|
if (!bundlesMetaMaskConnect) return undefined;
|
|
119
138
|
const missing = metaMaskConnectTimeoutPatches
|
|
120
139
|
.map((patch) => patch.pkg)
|
|
121
140
|
.filter((pkg) => !patched.get(pkg));
|
|
122
141
|
if (!missing.length) return undefined;
|
|
123
|
-
return `the build bundles ${metaMaskConnectPkg} but left
|
|
142
|
+
return `the build bundles ${metaMaskConnectPkg} but left ${missing.join(", ")} unpatched`;
|
|
124
143
|
},
|
|
125
144
|
};
|
|
126
145
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useResolvedKnobs } from "@multiplatform.one/theme";
|
|
1
|
+
import { transitionProps, PopoverContent, useResolvedKnobs } from "@multiplatform.one/theme";
|
|
2
2
|
import { Button, Popover, Text, XStack, YStack, type ButtonProps } from "tamagui";
|
|
3
3
|
import { useState } from "react";
|
|
4
4
|
import { useAccount, useChains, useSwitchChain } from "wagmi";
|
|
@@ -31,15 +31,10 @@ export function NetworkSwitcher({ showTestnets = false, ...buttonProps }: Networ
|
|
|
31
31
|
</Button>
|
|
32
32
|
</Popover.Trigger>
|
|
33
33
|
|
|
34
|
-
<
|
|
35
|
-
{...knobProps.
|
|
36
|
-
// LC-24: enter/exit styles are dead code without a resolved token.
|
|
37
|
-
// web3 does not depend on @multiplatform.one/components, so the knob
|
|
38
|
-
// token is threaded here rather than adopting the PopoverContent wrapper.
|
|
39
|
-
transition={knobProps.transition}
|
|
34
|
+
<PopoverContent
|
|
35
|
+
{...transitionProps(knobProps.motion.overlay)}
|
|
40
36
|
enterStyle={{ y: -10, opacity: 0 }}
|
|
41
37
|
exitStyle={{ y: -10, opacity: 0 }}
|
|
42
|
-
elevation="$4"
|
|
43
38
|
>
|
|
44
39
|
<YStack gap="$2" padding="$2" minWidth={200}>
|
|
45
40
|
<Text fontWeight="bold" fontSize="$3" paddingBottom="$2">
|
|
@@ -63,7 +58,7 @@ export function NetworkSwitcher({ showTestnets = false, ...buttonProps }: Networ
|
|
|
63
58
|
))}
|
|
64
59
|
</YStack>
|
|
65
60
|
<Popover.Arrow borderWidth={1} borderColor="$borderColor" />
|
|
66
|
-
</
|
|
61
|
+
</PopoverContent>
|
|
67
62
|
</Popover>
|
|
68
63
|
);
|
|
69
64
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Hash, TransactionReceipt } from "viem";
|
|
2
|
-
import { XStack, YStack, Text, Spinner, Button } from "tamagui";
|
|
2
|
+
import { XStack, YStack, SizableText, Text, Spinner, Button } from "tamagui";
|
|
3
3
|
import { openUrl } from "@multiplatform.one/platform";
|
|
4
4
|
import type { TransactionStatus as TxStatusType } from "../hooks/useContractWrite";
|
|
5
5
|
|
|
@@ -69,9 +69,9 @@ export function TransactionStatus({
|
|
|
69
69
|
</Text>
|
|
70
70
|
)}
|
|
71
71
|
<YStack flex={1}>
|
|
72
|
-
<
|
|
72
|
+
<SizableText fontFamily="$heading" size="$4" color={statusConfig.color}>
|
|
73
73
|
{statusConfig.title}
|
|
74
|
-
</
|
|
74
|
+
</SizableText>
|
|
75
75
|
<Text fontSize="$2" color="$gray10">
|
|
76
76
|
{statusConfig.description}
|
|
77
77
|
</Text>
|
|
@@ -140,7 +140,7 @@ export function TransactionStatus({
|
|
|
140
140
|
{/* Error Details */}
|
|
141
141
|
{error && (
|
|
142
142
|
<YStack gap="$1" paddingTop="$2" borderTopWidth={1} borderTopColor="$red5">
|
|
143
|
-
<Text fontSize="$2" color="$red11"
|
|
143
|
+
<Text fontSize="$2" color="$red11">
|
|
144
144
|
Error Details
|
|
145
145
|
</Text>
|
|
146
146
|
<Text fontSize="$2" color="$red10" numberOfLines={3}>
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { motionSeconds } from "@multiplatform.one/theme/motion";
|
|
1
2
|
import React, { useEffect, useState } from "react";
|
|
2
3
|
import { All, styled, useIsMounted, ThemedButton, nFormatter } from "@multiplatform.one/connectkit";
|
|
3
4
|
import { useQueryClient } from "@tanstack/react-query";
|
|
@@ -97,7 +98,7 @@ export const Balance: React.FC<BalanceProps> = ({ hideIcon, hideSymbol }) => {
|
|
|
97
98
|
bottom: 0,
|
|
98
99
|
}}
|
|
99
100
|
transition={{
|
|
100
|
-
duration:
|
|
101
|
+
duration: motionSeconds("400ms"),
|
|
101
102
|
ease: [0.25, 1, 0.5, 1],
|
|
102
103
|
delay: 0.4,
|
|
103
104
|
}}
|
|
@@ -142,7 +143,7 @@ export const Balance: React.FC<BalanceProps> = ({ hideIcon, hideSymbol }) => {
|
|
|
142
143
|
opacity: balance?.formatted !== undefined ? 1 : 0,
|
|
143
144
|
}}
|
|
144
145
|
transition={{
|
|
145
|
-
duration: balance && isInitial ?
|
|
146
|
+
duration: balance && isInitial ? motionSeconds("0ms") : motionSeconds("400ms"),
|
|
146
147
|
ease: [0.25, 1, 0.5, 1],
|
|
147
148
|
}}
|
|
148
149
|
>
|
|
@@ -163,7 +164,7 @@ const BalanceButton: React.FC<All & BalanceProps> = ({
|
|
|
163
164
|
}) => {
|
|
164
165
|
return (
|
|
165
166
|
<ThemedButton
|
|
166
|
-
duration={
|
|
167
|
+
duration={motionSeconds("400ms")}
|
|
167
168
|
variant={"secondary"}
|
|
168
169
|
theme={theme}
|
|
169
170
|
mode={mode}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { motionSeconds } from "@multiplatform.one/theme/motion";
|
|
1
2
|
import React from "react";
|
|
2
3
|
|
|
3
4
|
import { ChainContainer, LoadingContainer, LogoContainer, Unsupported } from "./styles";
|
|
@@ -95,7 +96,7 @@ const Chain: React.FC<{
|
|
|
95
96
|
initial={{ opacity: 0 }}
|
|
96
97
|
animate={{ opacity: 1 }}
|
|
97
98
|
exit={{ opacity: 0 }}
|
|
98
|
-
transition={{ duration:
|
|
99
|
+
transition={{ duration: motionSeconds("300ms") }}
|
|
99
100
|
>
|
|
100
101
|
{chain?.logo ?? <Chains.UnknownChain />}
|
|
101
102
|
</LogoContainer>
|
|
@@ -105,7 +106,7 @@ const Chain: React.FC<{
|
|
|
105
106
|
initial={{ opacity: 0 }}
|
|
106
107
|
animate={{ opacity: 1 }}
|
|
107
108
|
exit={{ opacity: 0 }}
|
|
108
|
-
transition={{ duration:
|
|
109
|
+
transition={{ duration: motionSeconds("300ms") }}
|
|
109
110
|
>
|
|
110
111
|
{Spinner}
|
|
111
112
|
</LoadingContainer>
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { motionSeconds } from "@multiplatform.one/theme/motion";
|
|
1
2
|
import React, { useCallback, useEffect, useLayoutEffect, useRef, useState } from "react";
|
|
2
3
|
import {
|
|
3
4
|
useContext,
|
|
@@ -180,7 +181,7 @@ const ChainSelectDropdown: React.FC<{
|
|
|
180
181
|
y: -4,
|
|
181
182
|
x: 0,
|
|
182
183
|
transition: {
|
|
183
|
-
duration:
|
|
184
|
+
duration: motionSeconds("100ms"),
|
|
184
185
|
},
|
|
185
186
|
},
|
|
186
187
|
open: {
|
|
@@ -193,7 +194,7 @@ const ChainSelectDropdown: React.FC<{
|
|
|
193
194
|
x: 0,
|
|
194
195
|
transition: {
|
|
195
196
|
ease: [0.76, 0, 0.24, 1],
|
|
196
|
-
duration:
|
|
197
|
+
duration: motionSeconds("quick"),
|
|
197
198
|
},
|
|
198
199
|
},
|
|
199
200
|
}}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { motionSeconds } from "@multiplatform.one/theme/motion";
|
|
1
2
|
import { useState } from "react";
|
|
2
3
|
import { useAccount, useSwitchChain } from "wagmi";
|
|
3
4
|
import { chainConfigs } from "../../../constants/chainConfigs";
|
|
@@ -113,7 +114,7 @@ const ChainSelectList = ({ variant }: { variant?: "primary" | "secondary" }) =>
|
|
|
113
114
|
}}
|
|
114
115
|
transition={{
|
|
115
116
|
ease: [0.76, 0, 0.24, 1],
|
|
116
|
-
duration:
|
|
117
|
+
duration: motionSeconds("quick"),
|
|
117
118
|
delay: 0.1,
|
|
118
119
|
}}
|
|
119
120
|
>
|
|
@@ -156,11 +157,11 @@ const ChainSelectList = ({ variant }: { variant?: "primary" | "secondary" }) =>
|
|
|
156
157
|
exit={{
|
|
157
158
|
opacity: 0,
|
|
158
159
|
x: 4,
|
|
159
|
-
transition: { duration:
|
|
160
|
+
transition: { duration: motionSeconds("100ms"), delay: 0 },
|
|
160
161
|
}}
|
|
161
162
|
transition={{
|
|
162
163
|
ease: [0.76, 0, 0.24, 1],
|
|
163
|
-
duration:
|
|
164
|
+
duration: motionSeconds("300ms"),
|
|
164
165
|
delay: 0.2,
|
|
165
166
|
}}
|
|
166
167
|
>
|
|
@@ -183,7 +184,7 @@ const ChainSelectList = ({ variant }: { variant?: "primary" | "secondary" }) =>
|
|
|
183
184
|
exit={{ opacity: 0, x: 4 }}
|
|
184
185
|
transition={{
|
|
185
186
|
ease: [0.76, 0, 0.24, 1],
|
|
186
|
-
duration:
|
|
187
|
+
duration: motionSeconds("300ms"),
|
|
187
188
|
delay: 0.1,
|
|
188
189
|
}}
|
|
189
190
|
>
|
|
@@ -211,7 +212,7 @@ const ChainSelectList = ({ variant }: { variant?: "primary" | "secondary" }) =>
|
|
|
211
212
|
opacity: ch.id === chain?.id ? 1 : 0,
|
|
212
213
|
}}
|
|
213
214
|
transition={{
|
|
214
|
-
duration:
|
|
215
|
+
duration: motionSeconds("300ms"),
|
|
215
216
|
ease: "easeOut",
|
|
216
217
|
}}
|
|
217
218
|
/>
|
|
@@ -222,7 +223,7 @@ const ChainSelectList = ({ variant }: { variant?: "primary" | "secondary" }) =>
|
|
|
222
223
|
layoutId="activeChain"
|
|
223
224
|
layout="position"
|
|
224
225
|
transition={{
|
|
225
|
-
duration:
|
|
226
|
+
duration: motionSeconds("300ms"),
|
|
226
227
|
ease: "easeOut",
|
|
227
228
|
}}
|
|
228
229
|
/>
|
|
@@ -241,7 +242,7 @@ const ChainSelectList = ({ variant }: { variant?: "primary" | "secondary" }) =>
|
|
|
241
242
|
exit={{ opacity: 0 }}
|
|
242
243
|
transition={{
|
|
243
244
|
ease: [0.76, 0, 0.24, 1],
|
|
244
|
-
duration:
|
|
245
|
+
duration: motionSeconds("300ms"),
|
|
245
246
|
}}
|
|
246
247
|
onAnimationStart={triggerResize}
|
|
247
248
|
onAnimationComplete={triggerResize}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { motionSeconds } from "@multiplatform.one/theme/motion";
|
|
1
2
|
import React from "react";
|
|
2
3
|
import { useAccount, useEnsName } from "wagmi";
|
|
3
4
|
import {
|
|
@@ -37,7 +38,7 @@ const contentVariants: Variants = {
|
|
|
37
38
|
opacity: 1,
|
|
38
39
|
x: 0.1,
|
|
39
40
|
transition: {
|
|
40
|
-
duration:
|
|
41
|
+
duration: motionSeconds("400ms"),
|
|
41
42
|
ease: [0.25, 1, 0.5, 1],
|
|
42
43
|
},
|
|
43
44
|
},
|
|
@@ -48,7 +49,7 @@ const contentVariants: Variants = {
|
|
|
48
49
|
pointerEvents: "none",
|
|
49
50
|
position: "absolute",
|
|
50
51
|
transition: {
|
|
51
|
-
duration:
|
|
52
|
+
duration: motionSeconds("400ms"),
|
|
52
53
|
ease: [0.25, 1, 0.5, 1],
|
|
53
54
|
},
|
|
54
55
|
},
|
|
@@ -64,7 +65,7 @@ const addressVariants: Variants = {
|
|
|
64
65
|
x: 0.2,
|
|
65
66
|
opacity: 1,
|
|
66
67
|
transition: {
|
|
67
|
-
duration:
|
|
68
|
+
duration: motionSeconds("400ms"),
|
|
68
69
|
ease: [0.25, 1, 0.5, 1],
|
|
69
70
|
},
|
|
70
71
|
},
|
|
@@ -75,7 +76,7 @@ const addressVariants: Variants = {
|
|
|
75
76
|
pointerEvents: "none",
|
|
76
77
|
position: "absolute",
|
|
77
78
|
transition: {
|
|
78
|
-
duration:
|
|
79
|
+
duration: motionSeconds("400ms"),
|
|
79
80
|
ease: [0.25, 1, 0.5, 1],
|
|
80
81
|
},
|
|
81
82
|
},
|
|
@@ -88,7 +89,7 @@ const textVariants: Variants = {
|
|
|
88
89
|
animate: {
|
|
89
90
|
opacity: 1,
|
|
90
91
|
transition: {
|
|
91
|
-
duration:
|
|
92
|
+
duration: motionSeconds("300ms"),
|
|
92
93
|
ease: [0.25, 1, 0.5, 1],
|
|
93
94
|
},
|
|
94
95
|
},
|
|
@@ -96,7 +97,7 @@ const textVariants: Variants = {
|
|
|
96
97
|
position: "absolute",
|
|
97
98
|
opacity: 0,
|
|
98
99
|
transition: {
|
|
99
|
-
duration:
|
|
100
|
+
duration: motionSeconds("300ms"),
|
|
100
101
|
ease: [0.25, 1, 0.5, 1],
|
|
101
102
|
},
|
|
102
103
|
},
|
|
@@ -391,7 +392,7 @@ export function ConnectKitButton({
|
|
|
391
392
|
width: "auto",
|
|
392
393
|
marginRight: -24,
|
|
393
394
|
transition: {
|
|
394
|
-
duration:
|
|
395
|
+
duration: motionSeconds("400ms"),
|
|
395
396
|
ease: [0.25, 1, 0.5, 1],
|
|
396
397
|
},
|
|
397
398
|
}}
|
|
@@ -401,7 +402,7 @@ export function ConnectKitButton({
|
|
|
401
402
|
width: 0,
|
|
402
403
|
marginRight: 0,
|
|
403
404
|
transition: {
|
|
404
|
-
duration:
|
|
405
|
+
duration: motionSeconds("400ms"),
|
|
405
406
|
ease: [0.25, 1, 0.5, 1],
|
|
406
407
|
},
|
|
407
408
|
}}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { motionSeconds } from "@multiplatform.one/theme/motion";
|
|
1
2
|
import { LogoContainer, Logo, Spinner, SpinnerContainer, ExpiringSpinner } from "./styles";
|
|
2
3
|
|
|
3
4
|
import { AnimatePresence } from "framer-motion";
|
|
@@ -17,7 +18,9 @@ const CircleSpinner = ({
|
|
|
17
18
|
countdown?: boolean;
|
|
18
19
|
}) => {
|
|
19
20
|
return (
|
|
20
|
-
<LogoContainer
|
|
21
|
+
<LogoContainer
|
|
22
|
+
transition={{ duration: motionSeconds("500ms"), ease: [0.175, 0.885, 0.32, 0.98] }}
|
|
23
|
+
>
|
|
21
24
|
<Logo
|
|
22
25
|
$small={!unavailable && smallLogo}
|
|
23
26
|
style={unavailable ? { borderRadius: 0 } : undefined}
|
|
@@ -34,7 +37,7 @@ const CircleSpinner = ({
|
|
|
34
37
|
exit={{
|
|
35
38
|
opacity: 0,
|
|
36
39
|
transition: {
|
|
37
|
-
duration: countdown ? 1 :
|
|
40
|
+
duration: countdown ? 1 : motionSeconds("0ms"),
|
|
38
41
|
},
|
|
39
42
|
}}
|
|
40
43
|
>
|
|
@@ -75,7 +78,7 @@ const CircleSpinner = ({
|
|
|
75
78
|
initial={{ opacity: 0 }}
|
|
76
79
|
animate={{ opacity: 1 }}
|
|
77
80
|
exit={{ opacity: 0 }}
|
|
78
|
-
transition={{ duration:
|
|
81
|
+
transition={{ duration: motionSeconds("250ms") }}
|
|
79
82
|
>
|
|
80
83
|
<div />
|
|
81
84
|
<div />
|
package/src/connectkit/components/ConnectModal/ConnectWithInjector/SquircleSpinner/index.tsx
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { motionSeconds } from "@multiplatform.one/theme/motion";
|
|
1
2
|
import { LogoContainer, Logo, Spinner, SpinnerContainer } from "./styles";
|
|
2
3
|
import { AnimatePresence } from "framer-motion";
|
|
3
4
|
|
|
@@ -9,7 +10,9 @@ const SquircleSpinner = ({
|
|
|
9
10
|
connecting?: boolean;
|
|
10
11
|
}) => {
|
|
11
12
|
return (
|
|
12
|
-
<LogoContainer
|
|
13
|
+
<LogoContainer
|
|
14
|
+
transition={{ duration: motionSeconds("500ms"), ease: [0.175, 0.885, 0.32, 0.98] }}
|
|
15
|
+
>
|
|
13
16
|
<Logo>{logo}</Logo>
|
|
14
17
|
<SpinnerContainer>
|
|
15
18
|
<AnimatePresence>
|
|
@@ -21,7 +24,7 @@ const SquircleSpinner = ({
|
|
|
21
24
|
exit={{
|
|
22
25
|
opacity: 0,
|
|
23
26
|
transition: {
|
|
24
|
-
duration:
|
|
27
|
+
duration: motionSeconds("0ms"),
|
|
25
28
|
},
|
|
26
29
|
}}
|
|
27
30
|
/>
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { motionSeconds } from "@multiplatform.one/theme/motion";
|
|
1
2
|
import React, { useEffect, useState } from "react";
|
|
2
3
|
import { AnimatePresence, Variants } from "framer-motion";
|
|
3
4
|
import {
|
|
@@ -63,7 +64,7 @@ const contentVariants: Variants = {
|
|
|
63
64
|
scale: 1,
|
|
64
65
|
transition: {
|
|
65
66
|
ease: [0.16, 1, 0.3, 1],
|
|
66
|
-
duration:
|
|
67
|
+
duration: motionSeconds("400ms"),
|
|
67
68
|
delay: 0.05,
|
|
68
69
|
position: { delay: 0 },
|
|
69
70
|
},
|
|
@@ -74,7 +75,7 @@ const contentVariants: Variants = {
|
|
|
74
75
|
scale: 0.95,
|
|
75
76
|
transition: {
|
|
76
77
|
ease: [0.16, 1, 0.3, 1],
|
|
77
|
-
duration:
|
|
78
|
+
duration: motionSeconds("300ms"),
|
|
78
79
|
},
|
|
79
80
|
},
|
|
80
81
|
};
|
|
@@ -287,7 +288,7 @@ const ConnectWithInjector: React.FC<{
|
|
|
287
288
|
animate={{ opacity: 1, scale: 1 }}
|
|
288
289
|
exit={{ opacity: 0, scale: 0.8 }}
|
|
289
290
|
whileTap={{ scale: 0.9 }}
|
|
290
|
-
transition={{ duration:
|
|
291
|
+
transition={{ duration: motionSeconds("100ms") }}
|
|
291
292
|
onClick={runConnect}
|
|
292
293
|
>
|
|
293
294
|
<RetryIconContainer>
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { motionSeconds } from "@multiplatform.one/theme/motion";
|
|
1
2
|
import React, { useState } from "react";
|
|
2
3
|
import {
|
|
3
4
|
All,
|
|
@@ -66,7 +67,7 @@ const NetworkButton: React.FC<NetworkButtonProps & All> = ({
|
|
|
66
67
|
initial={{ opacity: 0 }}
|
|
67
68
|
animate={{ opacity: 1 }}
|
|
68
69
|
exit={{ opacity: 0 }}
|
|
69
|
-
transition={{ duration:
|
|
70
|
+
transition={{ duration: motionSeconds("200ms"), ease: "linear" }}
|
|
70
71
|
>
|
|
71
72
|
<ChainSelectDropdown open={open} onClose={() => setOpen(false)}>
|
|
72
73
|
<ThemedButton
|