Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/MyriadFlow/webxr
Browse files Browse the repository at this point in the history
  • Loading branch information
adetyaz committed Aug 13, 2024
2 parents 546b643 + 7803351 commit f02d147
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 42 deletions.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@react-three/fiber": "^8.16.8",
"@react-three/postprocessing": "^2.16.2",
"@readyplayerme/visage": "^5.2.1",
"@tanstack/react-query": "^5.45.1",
"@tanstack/react-query": "^5.51.23",
"@wagmi/core": "^2.11.5",
"@web3modal/wagmi": "^5.0.11",
"class-variance-authority": "^0.7.0",
Expand All @@ -32,8 +32,8 @@
"tailwind-merge": "^2.3.0",
"tailwindcss-animate": "^1.0.7",
"three": "^0.165.0",
"viem": "^2.16.1",
"wagmi": "^2.10.4"
"viem": "^2.19.4",
"wagmi": "^2.12.5"
},
"devDependencies": {
"@types/node": "^20",
Expand All @@ -46,4 +46,4 @@
"tailwindcss": "^3",
"typescript": "^5"
}
}
}
4 changes: 3 additions & 1 deletion src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ import './globals.css'
import 'react-toastify/dist/ReactToastify.css'
import { cn } from '@/lib/utils'
import Providers from '@/lib/providers'
import { config } from '@/lib/wagmi'
import Web3ModalProvider from '@/lib/providers'
import Script from 'next/script'
import AppKitProvider from '@/lib/providers'

const fontSans = FontSans({
subsets: ['latin'],
Expand Down Expand Up @@ -70,7 +72,7 @@ export default function RootLayout({
fontSans.variable
)}
>
<Web3ModalProvider>{children}</Web3ModalProvider>
<AppKitProvider>{children}</AppKitProvider>
</body>
</Providers>
</html>
Expand Down
2 changes: 1 addition & 1 deletion src/lib/providers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ createWeb3Modal({
enableOnramp: true // Optional - false as default
})

export default function Web3ModalProvider({
export default function AppKitProvider({
children,
initialState
}: {
Expand Down
16 changes: 8 additions & 8 deletions src/lib/wagmi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@
import { defaultWagmiConfig } from '@web3modal/wagmi/react/config'

import { cookieStorage, createStorage } from 'wagmi'
import { baseSepolia } from 'wagmi/chains'
import { base } from 'wagmi/chains'

// Get projectId from https://cloud.walletconnect.com
export const projectId = 'c26b357532f63f7ba31efebac88d0eed'

if (!projectId) throw new Error('Project ID is not defined')

const metadata = {
name: 'Web3Modal',
description: 'Web3Modal Example',
url: 'https://web3modal.com',
icons: ['https://avatars.githubusercontent.com/u/37784886'],
}
export const metadata = {
name: 'AppKit',
description: 'AppKit Example',
url: 'https://web3modal.com', // origin must match your domain & subdomain
icons: ['https://avatars.githubusercontent.com/u/37784886']
}

// Create wagmiConfig
const chains = [baseSepolia] as const
const chains = [base] as const
export const config = defaultWagmiConfig({
chains,
projectId,
Expand Down
6 changes: 3 additions & 3 deletions src/utils/paymasterConfig.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import { createClient, createPublicClient, http } from 'viem'
import { baseSepolia } from 'viem/chains'
import { base } from 'viem/chains'
import { ENTRYPOINT_ADDRESS_V06 } from 'permissionless'
import { paymasterActionsEip7677 } from 'permissionless/experimental'

export const client = createPublicClient({
chain: baseSepolia,
chain: base,
transport: http(),
})

const paymasterService = process.env.PAYMASTER_SERVICE_URL!

export const paymasterClient = createClient({
chain: baseSepolia,
chain: base,
transport: http(paymasterService),
}).extend(paymasterActionsEip7677(ENTRYPOINT_ADDRESS_V06))
4 changes: 2 additions & 2 deletions src/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
decodeAbiParameters,
decodeFunctionData,
} from 'viem'
import { baseSepolia } from 'viem/chains'
import { base } from 'viem/chains'
import { client } from './paymasterConfig'
import {
coinbaseSmartWalletABI,
Expand All @@ -28,7 +28,7 @@ export async function willSponsor({
userOp: UserOperation<'v0.6'>
}) {
// check chain id
if (chainId !== baseSepolia.id) return false
if (chainId !== base.id) return false
// check entrypoint
// not strictly needed given below check on implementation address, but leaving as example
if (entrypoint.toLowerCase() !== ENTRYPOINT_ADDRESS_V06.toLowerCase())
Expand Down
46 changes: 23 additions & 23 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1319,10 +1319,10 @@
resolved "https://registry.yarnpkg.com/@tanstack/query-core/-/query-core-5.51.21.tgz#a510469c6c30d3de2a8b8798e340169a4b0fd08f"
integrity sha512-POQxm42IUp6n89kKWF4IZi18v3fxQWFRolvBA6phNVmA8psdfB1MvDnGacCJdS+EOX12w/CyHM62z//rHmYmvw==

"@tanstack/react-query@^5.45.1":
version "5.51.21"
resolved "https://registry.yarnpkg.com/@tanstack/react-query/-/react-query-5.51.21.tgz#cdd14677bcc809a83e01b6c38842c841ce7420af"
integrity sha512-Q/V81x3sAYgCsxjwOkfLXfrmoG+FmDhLeHH5okC/Bp8Aaw2c33lbEo/mMcMnkxUPVtB2FLpzHT0tq3c+OlZEbw==
"@tanstack/react-query@^5.51.23":
version "5.51.23"
resolved "https://registry.yarnpkg.com/@tanstack/react-query/-/react-query-5.51.23.tgz#83c223f4cb6054b206de8856b73ca7e41a63ba1f"
integrity sha512-CfJCfX45nnVIZjQBRYYtvVMIsGgWLKLYC4xcUiYEey671n1alvTZoCBaU9B85O8mF/tx9LPyrI04A6Bs2THv4A==
dependencies:
"@tanstack/query-core" "5.51.21"

Expand Down Expand Up @@ -1575,10 +1575,10 @@
resolved "https://registry.yarnpkg.com/@vanilla-extract/sprinkles/-/sprinkles-1.6.1.tgz#2c8a832757a0d8104dc6bd5d961db2c70d1dbdcb"
integrity sha512-N/RGKwGAAidBupZ436RpuweRQHEFGU+mvAqBo8PRMAjJEmHoPDttV8RObaMLrJHWLqvX+XUMinHUnD0hFRQISw==

"@wagmi/[email protected].4":
version "5.1.4"
resolved "https://registry.yarnpkg.com/@wagmi/connectors/-/connectors-5.1.4.tgz#cb890b795037f47f885f088451a01513d47a7b87"
integrity sha512-LY8RAHy5ichhc7zknFrfrQ3RYZ/fHGgojBz0zMFae5rRrjkR3fG4gRQ9mauPwykGJmOSZshGiFryG1F1gLBm3A==
"@wagmi/[email protected].5":
version "5.1.5"
resolved "https://registry.yarnpkg.com/@wagmi/connectors/-/connectors-5.1.5.tgz#14acf084809f78aac1f1104344881bd871ac33a2"
integrity sha512-z+UAfwfTqVldoNxUFffHPcc/ets3UP1ehXE6b9k9ZDaih8VdZJRGz84qLjx+GVnI/+FrHfFwPPD9C2YYd2azww==
dependencies:
"@coinbase/wallet-sdk" "4.0.4"
"@metamask/sdk" "0.27.0"
Expand All @@ -1588,10 +1588,10 @@
"@walletconnect/modal" "2.6.2"
cbw-sdk "npm:@coinbase/[email protected]"

"@wagmi/[email protected].3":
version "2.13.3"
resolved "https://registry.yarnpkg.com/@wagmi/core/-/core-2.13.3.tgz#af39e22b0161759b2e9a80c033a7693a37fd1fbf"
integrity sha512-4DqHTeqXHAjwWz6fftLm9zy8Bqy10D3nsCKtaluY0TPw+tSypDSxvzqTauPPasbmJOGfvx2rwXuoI/yqPwwG4w==
"@wagmi/[email protected].4":
version "2.13.4"
resolved "https://registry.yarnpkg.com/@wagmi/core/-/core-2.13.4.tgz#8d5da08e450171bfe34f72a079cfa2b81825410a"
integrity sha512-J6gfxHYr8SCc/BzEa712LnI+qLFs5K2nBLupwQqQl4WiAlCu8SdcpbZokqiwfCMYhIRMj0+YFEP9qe4ypcexmw==
dependencies:
eventemitter3 "5.0.1"
mipd "0.0.7"
Expand Down Expand Up @@ -6616,10 +6616,10 @@ viem@^2.1.1:
webauthn-p256 "0.0.5"
ws "8.17.1"

viem@^2.16.1:
version "2.19.1"
resolved "https://registry.yarnpkg.com/viem/-/viem-2.19.1.tgz#38ccffbacf69d8a2f940ff35be8ea3ac42ea5d61"
integrity sha512-a0ca/ACEz3FRZB3OmiSfRUogWZGQh700wu7Pg3GmAWiGD+0PS9bVaWG67JQ+9azFZLq0BU/m0t2CeWd3xi8IzQ==
viem@^2.19.4:
version "2.19.4"
resolved "https://registry.yarnpkg.com/viem/-/viem-2.19.4.tgz#129a6dfbaf81bfc5664fde62c6a77cdbdebeeff9"
integrity sha512-JdhK3ui3uPD2tnpqGNkJaDQV4zTfOeKXcF+VrU8RG88Dn2e0lFjv6l7m0YNmYLsHm+n5vFFfCLcUrTk6xcYv5w==
dependencies:
"@adraffy/ens-normalize" "1.10.0"
"@noble/curves" "1.4.0"
Expand All @@ -6631,13 +6631,13 @@ viem@^2.16.1:
webauthn-p256 "0.0.5"
ws "8.17.1"

wagmi@^2.10.4:
version "2.12.4"
resolved "https://registry.yarnpkg.com/wagmi/-/wagmi-2.12.4.tgz#316a96bb21fa0a3030b835301b5c71f51ee15774"
integrity sha512-qDyVISKHxqnX87LlkHwBMpfsp6yC7D7Er9BSI8IZlsNthQLN1I3Ih1+JzTBJg1DiLpazxmW8h7Yi4+qYhCgo6Q==
wagmi@^2.12.5:
version "2.12.5"
resolved "https://registry.yarnpkg.com/wagmi/-/wagmi-2.12.5.tgz#8480d363ce8e03492dcb547e71a21f0ea2853252"
integrity sha512-+fpSUsVKyGOumguQirtpyMb7dmDP4/ZdwrTqrBc+WZVTwR9S8WdFPParw/BKXVZjF9euJxu1zKsWQSLBeCROfQ==
dependencies:
"@wagmi/connectors" "5.1.4"
"@wagmi/core" "2.13.3"
"@wagmi/connectors" "5.1.5"
"@wagmi/core" "2.13.4"
use-sync-external-store "1.2.0"

[email protected]:
Expand Down Expand Up @@ -6929,4 +6929,4 @@ zustand@^4.3.2:
resolved "https://registry.yarnpkg.com/zustand/-/zustand-4.5.4.tgz#63abdd81edfb190bc61e0bbae045cc4d52158a05"
integrity sha512-/BPMyLKJPtFEvVL0E9E9BTUM63MNyhPGlvxk1XjrfWTUlV+BR8jufjsovHzrtR6YNcBEcL7cMHovL1n9xHawEg==
dependencies:
use-sync-external-store "1.2.0"
use-sync-external-store "1.2.0"

0 comments on commit f02d147

Please sign in to comment.