Comments (13)
@isiban that's a good catch. Those need to be changed for the API. I made an issue and will get a fix for it: #107
from fcl-discovery.
HI @cybercent I just tired https://port.onflow.org on Safari (which is using Discovery) and it works. Can you provide a little more context? Is there a certain wallet or feature that isn't working for you?
Can you also tell us what version of FCL you're having this issue with? Thanks.
from fcl-discovery.
We are using "@onflow/fcl": "^1.2.0".
The FCL discovery is used inside a react useEffect as explained in the docs.
The network call to fetch the json containing the available wallets is not made by FCL on chrome incognito.
In chrome (non-incognito) the network call is made 100% of the time.
In Safari the call is sometimes made but most of the time not. Reloading the page does not trigger a network call to fetch the available wallets.
Edit:
I've looked at Flow port. The main differences are:
- the network call is made when the login/signup button is clicked. we make the call on page load.
- the url is
https://fcl-discovery.vercel.app/api/authn
, we usehttps://fcl-discovery.onflow.org/api/authn
from fcl-discovery.
Hi @cybercent , helpful info thanks! Yeah, Flow Port is using the UI version of Discovery and sounds like you're using the API version (UI vs API).
I have been able to reproduce this issue using NextJS. I'm guessing that's what you're using? Seems to be related to server side rendered applications. I have a fix for it. We'll get a patch release out soon.
from fcl-discovery.
@chasefleming we are not using SSR. But you might be on to something, if I throttle the connection on Safari to cause the page to load slower I sometimes get the network call.
from fcl-discovery.
@cybercent I just put a fix in and published an FCL release to 1.3.0-alpha.8
. Can you try that version and tell me ifthat solves your issue? That fixed Safari and Incognito on my end.
from fcl-discovery.
@chasefleming we tested 1.3.0-alpha.8
and I can confirm that the network call issue is fixed.
It's not clear if the discovery service is meant to return:
A. Only the list of wallets defined here: https://github.com/onflow/fcl-discovery/blob/master/data/services.json
B. The list defined in services.json
plus the wallets the user has installed and are not in services.json
from fcl-discovery.
@cybercent glad to hear that worked for you!
It depends on your dapp's configuration. Can you post your FCL config (as well as browser) and what you're hoping to see returned? Also, let me know if the browser has any extensions installed.
from fcl-discovery.
@chasefleming our FCL config is the following:
config({
"accessNode.api": "https://rest-testnet.onflow.org", //https://rest-mainnet.onflow.org
"discovery.wallet": "https://fcl-discovery.onflow.org/testnet/authn", //https://fcl-discovery.onflow.org/authn
"discovery.authn.endpoint": "https://fcl-discovery.onflow.org/api/testnet/authn", //https://fcl-discovery.onflow.org/api/authn
})
- Browser: Chrome 105.0.5195.102
We are hoping to see the wallets defined in: https://github.com/onflow/fcl-discovery/blob/master/data/services.json except Ledger and Dapper (which require another config variables) + other wallets the user has installed and are not in services.json which can be for example NuFi or any other wallet.
from fcl-discovery.
Thanks @isiban . Mind also posting the payload being sent over the network at the /authn
endpoint so I can see other installations you're mentioning?
And also, can you tell me the response you're getting?
from fcl-discovery.
@chasefleming find bellow the payload and the response I'm getting:
- Payload
{type: ["authn"], fclVersion: "1.3.0-alpha.8", include: [],…}
clientServices
:
[{f_type: "Service", f_vsn: "1.0.0", type: "authn", uid: "nufi#authn",…},…]
fclVersion
:
"1.3.0-alpha.8"
include
:
[]
supportedStrategies
:
["HTTP/RPC", "HTTP/POST", "IFRAME/RPC", "POP/RPC", "TAB/RPC", "EXT/RPC"]
type
:
["authn"]
0
:
"authn"
userAgent
:
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36"
- Response
[{"f_type":"Service","f_vsn":"1.0.0","type":"authn","method":"HTTP/POST","uid":"blocto#authn","endpoint":"https://flow-wallet-testnet.blocto.app/api/flow/authn","provider":{"address":"0xf086a545ce3c552d","name":"Blocto","icon":"/images/blocto.png","description":"Your entrance to the blockchain world.","color":"#afd8f7","supportEmail":"[email protected]","authn_endpoint":"https://flow-wallet-testnet.blocto.app/authn","website":"https://blocto.portto.io"}},{"f_type":"Service","f_vsn":"1.0.0","type":"authn","method":"EXT/RPC","uid":"lilico#authn","endpoint":"chrome-extension://hpclkefagolihohboafpheddmmgdffjm/popup.html","provider":{"address":"0x33f75ff0b830dcec","name":"Lilico","icon":"/images/lilico.png","description":"A crypto wallet on Flow built for explorers, collectors, and gamers.","color":"#FC814A","supportEmail":"[email protected]","website":"https://lilico.app","requires_install":true,"is_installed":false,"install_link":"https://chrome.google.com/webstore/detail/lilico/hpclkefagolihohboafpheddmmgdffjm"}}]
- Installed extensions : NuFi, Lilico, another wallet extension in dev process so not published yet
from fcl-discovery.
@isiban forgot to mention that when using the alpha you should point to the preview url generated on this PR: #92
There are a bunch of changes made for the alpha on that branch. When that PR is merged you can switch back to the regular url for Discovery. Still keep the same paths. Just change the origin.
from fcl-discovery.
@chasefleming thanks for the mention 👍🏾
It's working but I'm going to wait for the merge of #92. I have already something working in the meanwhile.
I have a last question about the service provider icon why is it given with a relative path and not an absolute one?
from fcl-discovery.
Related Issues (20)
- Add WC support for native dapps
- Show WC Pairings
- Add sandboxnet
- Last used background running over some logos
- Show lilico in discovery
- Plugin services showing at earlier FCL version
- Replace CSS with chakra ui
- Add loading indicator or sumpin'
- [FEATURE] devnet support
- [IMPROVEMENT] Improve onboarding of new web3 users
- Add hostname query param mechanic to FCL discovery
- [FEATURE] Dark mode
- [FEATURE] Filter wallets by supported features HOT 5
- Remove sandboxnet
- [BUG] Wallet names truncated too short
- https://flow-wallet-dev.blocto.app/bloctoWeb/meta?url=site-url
- [BUG] emulator as a network not supported
- [BUG] All wallets showing as meeting requirement
- [FEATURE] Add Crescendo Network Support
- Change "Flow Ref" References to "Flow"
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fcl-discovery.