Skip to content

Commit

Permalink
Merge branch 'main' into jeff/config-status
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffreyDoyle authored Oct 24, 2022
2 parents 5b06b31 + 99e35e3 commit b3fced9
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
4 changes: 3 additions & 1 deletion .env.local.example
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
NEXT_PUBLIC_FCL_CRYPTO_CONTRACT=0xf8d6e0586b0a20c7
FCL_CRYPTO_CONTRACT=0xf8d6e0586b0a20c7
FCL_CRYPTO_CONTRACT=0xf8d6e0586b0a20c7
NEXT_PUBLIC_WC_PROJECT_ID=
NEXT_PUBLIC_RELAY_URL=wss://relay.walletconnect.com
4 changes: 2 additions & 2 deletions flow/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ if (USE_LOCAL) {
// dev-wallet
.put("discovery.wallet", "http://localhost:8701/fcl/authn")
// local discovery
//.put("discovery.wallet", "http://localhost:3002/testnet/authn")
//.put("discovery.authn.endpoint", "http://localhost:3002/api/testnet/authn")
// .put("discovery.wallet", "http://localhost:3002/local/authn")
// .put("discovery.authn.endpoint", "http://localhost:3002/api/local/authn")
} else {
// prettier-ignore
fcl
Expand Down
14 changes: 9 additions & 5 deletions pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import "../flow/config"

const WC_PROJECT_ID = process.env.NEXT_PUBLIC_WC_PROJECT_ID
const WC_METADATA = {
name: "FCL WalletConnect",
description: "FCL DApp for WalletConnect",
name: "FCL Harness",
description: "FCL Harness dApp for Development and Testing",
url: "https://flow.com/",
icons: ["https://avatars.githubusercontent.com/u/62387156?s=280&v=4"],
}
Expand Down Expand Up @@ -53,16 +53,20 @@ export default function Home() {
})
fcl.pluginRegistry.add(FclWcServicePlugin)
}
initAdapter()
if (
config &&
config.flow.network !== "local" &&
process.env.NEXT_PUBLIC_WC_PROJECT_ID
)
initAdapter()
}, [])

useEffect(() => {
const fetchServices = async () =>
await fcl.discovery.authn.subscribe(res => {
console.log("discovery api services", res)
setServices(res.results)
})
fetchServices()
if (config && config.discovery.authn.endpoint) fetchServices()
}, [])

useEffect(() => {
Expand Down

0 comments on commit b3fced9

Please sign in to comment.