Skip to content

Commit

Permalink
chore: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Smith committed Nov 12, 2024
1 parent c4f313f commit 213fa81
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 51 deletions.
6 changes: 2 additions & 4 deletions apps/laboratory/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,11 @@ const cspHeader = `
img-src * 'self' data: blob: https://walletconnect.org https://walletconnect.com https://secure.walletconnect.com https://secure.walletconnect.org https://tokens-data.1inch.io https://tokens.1inch.io https://ipfs.io https://appkit-lab.reown.org;
font-src 'self' https://fonts.gstatic.com;
connect-src 'self' https://react-wallet.walletconnect.com https://rpc.walletconnect.com https://rpc.walletconnect.org https://relay.walletconnect.com https://relay.walletconnect.org wss://relay.walletconnect.com wss://relay.walletconnect.org https://pulse.walletconnect.com https://pulse.walletconnect.org https://api.web3modal.com https://api.web3modal.org wss://www.walletlink.org https://o1095249.ingest.sentry.io https://quote-api.jup.ag;
frame-src 'self' https://verify.walletconnect.com https://verify.walletconnect.org https://secure.walletconnect.com https://secure.walletconnect.org https://secure.reown.com https://widget.solflare.com/ ${secureSiteDomain}/;
frame-src 'self' https://verify.walletconnect.com https://verify.walletconnect.org https://secure.walletconnect.com https://secure.walletconnect.org https://secure.reown.com https://widget.solflare.com/ ${secureSiteDomain};
object-src 'none';
base-uri 'self';
form-action 'self';
frame-ancestors ${
process.env.NODE_ENV === 'production' ? 'none' : verifyApiNestedIframesTestOuterDomain
};
frame-ancestors ${verifyApiNestedIframesTestOuterDomain};
report-uri https://o1095249.ingest.sentry.io/api/4505685639364608/security/?sentry_key=36ff1e79c60877fce6c0273e94a8ed69;
report-to csp-endpoint
`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ const modal = createAppKit({
networks: ConstantsUtil.EvmNetworks,
defaultNetwork: mainnet,
projectId,
metadata: {
name: "AppKit",
description: "AppKit Laboratory",
url: "https://example.com",
icons: []
},
features: {
analytics: true
},
Expand Down
15 changes: 3 additions & 12 deletions apps/laboratory/src/pages/library/ethers-verify-evil.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,12 @@
import { createAppKit } from '@reown/appkit'
import { createAppKit } from '@reown/appkit/react'
import { EthersAdapter } from '@reown/appkit-adapter-ethers'
import { EthersTests } from '../../components/Ethers/EthersTests'
import { AppKitButtons } from '../../components/AppKitButtons'
import { ThemeStore } from '../../utils/StoreUtil'
import { ConstantsUtil } from '../../utils/ConstantsUtil'
import { EthersModalInfo } from '../../components/Ethers/EthersModalInfo'
import { EthersAdapter } from '@reown/appkit-adapter-ethers'
import { mainnet } from '@reown/appkit/networks'

const metadata = {
name: 'Evil Web3Modal',
description: 'Evil Web3Modal Laboratory',
url: 'https://malicious-app-verify-simulation.vercel.app/',
icons: ['https://avatars.githubusercontent.com/u/37784886'],
verifyUrl: ''
}

// Special project ID with https://malicious-app-verify-simulation.vercel.app/ as the verified domain and this domain is marked as a scam
const projectId = '9d176efa3150a1df0a76c8c138b6b657'

Expand All @@ -26,8 +18,7 @@ const modal = createAppKit({
features: {
analytics: true
},
customWallets: ConstantsUtil.CustomWallets,
metadata
customWallets: ConstantsUtil.CustomWallets
})

ThemeStore.setModal(modal)
Expand Down
16 changes: 3 additions & 13 deletions apps/laboratory/src/pages/library/ethers-verify-valid.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,11 @@
import { createAppKit } from '@reown/appkit/react'
import { EthersAdapter } from '@reown/appkit-adapter-ethers'
import { EthersTests } from '../../components/Ethers/EthersTests'
import { AppKitButtons } from '../../components/AppKitButtons'
import { ThemeStore } from '../../utils/StoreUtil'
import { ConstantsUtil } from '../../utils/ConstantsUtil'
import { EthersModalInfo } from '../../components/Ethers/EthersModalInfo'
import { mainnet } from '@reown/appkit/networks'
import { EthersAdapter } from '@reown/appkit-adapter-ethers'
import { createAppKit } from '@reown/appkit'

const metadata = {
name: 'Web3Modal',
description: 'Web3Modal Laboratory',
// Allow localhost
url: 'http://localhost:3000',
icons: ['https://avatars.githubusercontent.com/u/37784886'],
verifyUrl: ''
}

// Special project ID with verify enabled on localhost
const projectId = 'e4eae1aad4503db9966a04fd045a7e4d'
Expand All @@ -27,8 +18,7 @@ const modal = createAppKit({
features: {
analytics: true
},
customWallets: ConstantsUtil.CustomWallets,
metadata
customWallets: ConstantsUtil.CustomWallets
})

ThemeStore.setModal(modal)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,12 @@ const modal = createAppKit({
networks,
defaultNetwork: mainnet,
projectId,
termsConditionsUrl: 'https://reown.com/terms-of-service',
privacyPolicyUrl: 'https://reown.com/privacy-policy'
metadata: {
name: "AppKit",
description: "AppKit Laboratory",
url: "https://example.com",
icons: []
}
})

ThemeStore.setModal(modal)
Expand Down
9 changes: 0 additions & 9 deletions apps/laboratory/src/pages/library/wagmi-verify-evil.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,6 @@ import { WagmiAdapter } from '@reown/appkit-adapter-wagmi'
import { ConstantsUtil } from '../../utils/ConstantsUtil'
import { mainnet } from '@reown/appkit/networks'

const metadata = {
name: 'Evil AppKit',
description: 'Evil AppKit Laboratory',
url: 'https://malicious-app-verify-simulation.vercel.app/',
icons: ['https://avatars.githubusercontent.com/u/37784886'],
verifyUrl: ''
}

// Special project ID with https://malicious-app-verify-simulation.vercel.app/ as the verified domain and this domain is marked as a scam
const projectId = '9d176efa3150a1df0a76c8c138b6b657'

Expand All @@ -35,7 +27,6 @@ const modal = createAppKit({
networks,
defaultNetwork: mainnet,
projectId,
metadata,
termsConditionsUrl: 'https://reown.com/terms-of-service',
privacyPolicyUrl: 'https://reown.com/privacy-policy'
})
Expand Down
10 changes: 0 additions & 10 deletions apps/laboratory/src/pages/library/wagmi-verify-valid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,6 @@ import { WagmiAdapter } from '@reown/appkit-adapter-wagmi'
import { ConstantsUtil } from '../../utils/ConstantsUtil'
import { mainnet } from '@reown/appkit/networks'

const metadata = {
name: 'AppKit',
description: 'AppKit Laboratory',
// Allow localhost
url: 'http://localhost:3000',
icons: ['https://avatars.githubusercontent.com/u/37784886'],
verifyUrl: ''
}

// Special project ID with verify enabled on localhost
const projectId = 'e4eae1aad4503db9966a04fd045a7e4d'

Expand All @@ -36,7 +27,6 @@ const modal = createAppKit({
networks,
projectId,
defaultNetwork: mainnet,
metadata,
termsConditionsUrl: 'https://reown.com/terms-of-service',
privacyPolicyUrl: 'https://reown.com/privacy-policy'
})
Expand Down
2 changes: 1 addition & 1 deletion packages/appkit/exports/constants.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const PACKAGE_VERSION = '1.3.0'
export const PACKAGE_VERSION = '1.3.2'

0 comments on commit 213fa81

Please sign in to comment.