The isSignedIn()
function of Sender Wallet takes too long to get updated
#944
Labels
isSignedIn()
function of Sender Wallet takes too long to get updated
#944
Describe the bug
When signed in with Sender in a dApp the
window.near.isSignedIn()
andwindow.near.getAccountId()
functions of theSender Wallet
are taking too long to set the correct value.Sender has had this issue where the state on their side does take a bit too long to get updated that's why we have a check https://github.com/near/wallet-selector/blob/main/packages/sender/src/lib/sender.ts#L325-L332
Just found out recently that even a
200ms
waiting time is not enough.To Reproduce
Steps to reproduce the behavior:
wallet-selector
will clear thesigned-in
state because at the moment when wallet selector checked for getAccountId() the Sender Wallet has returned an""
(empty string).Expected behavior
When signed with the Sender Wallet in a dApp after a page reload in Wallet Selector best we can do is
wait
longer for the Sender to return the value.From what I have found from testing is that sometimes it takes up to
800ms
for sender to set update thegetAccountId()
andisSignedIn()
Screenshots
If applicable, add screenshots to help explain your problem.
sender-state-takes-too-long.webm
Device (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: