You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are a few things I would like to point out that could really improve the experience and fix some potential bugs/weird behaviors.
(issue) window.near conflicts with other extension wallets
The window.near namespace conflicts with another wallet SenderWallet if both wallets are installed then the window.near will always return the injected options from the SenderWallet and not LiqualityWallet
(bug) window.near.enable() method works only if you confirm the connection.
In the above example if you click the Connect with Near button which in the end calls:
awaitwindow.near.enable();
The liquality wallet opens a window to confirm the connection if we confirm it it works perfectly but the issue is if we Cancel or close the window in X at this moment I am not sure why but if we try to call window.near.enable(); for the second time it returns undefined and the popup never opens until you close the Browser and reopen it.
(bug) Actions propertynot being passed down
When trying to call wallet_sendTransaction method through window.near.request() from my understanding I think the actions key/property is not being sent to the sendTransaction function which is exposed by near-js-wallet-provider
constsignAndSendTransaction=awaitwindow.near.request({method: "wallet_sendTransaction",params: [{to: "kujtim.testnet",value: "0",data: "",actions: ["this is an invalid action but does not get triggered"]},],});
It looks like you are not passing the actions to the sendTransaction method.
In the PermissionSend.vue component you make a call to this method replyPermission (vue store action)
And the replyPermission then dispatches another event executeRequest
Which in the end executes this check, and you can see there's no actions key in the payload for sendTransaction event.
What happens is that in the end this if block is executed since in this case options.actions would be undefined at this point a Transfer action is being created by default.
(issue) there's no way to disconnect/ logout once you're connected.
If you call await window.near.enable(); and confirm the connection then there's no way how you can logout or disconnect from the dApp unles you close the browser window.
The text was updated successfully, but these errors were encountered:
Hi @kujtimprenkuSQA
Thanks for reporting this,
The main issue is that we haven't implemented real NEAR connection for the wallet yet. The current window.near is a custom interface that all chains in the wallet have by default.
We are now evaluating for this to be implemented.
Is there a standard API for near wallets and applications that we should be implementing?
Description
Hi,
I am trying to use Liquality Wallet with a NEAR account from a dApp you can see the example here:
https://github.com/kujtimprenkuSQA/liquality-near-example/
There are a few things I would like to point out that could really improve the experience and fix some potential bugs/weird behaviors.
(issue) window.near conflicts with other extension wallets
The
window.near
namespace conflicts with another wallet SenderWallet if both wallets are installed then thewindow.near
will always return the injected options from theSenderWallet
and notLiqualityWallet
(bug) window.near.enable() method works only if you confirm the connection.
In the above example if you click the
Connect with Near
button which in the end calls:The liquality wallet opens a window to confirm the connection if we confirm it it works perfectly but the issue is if we
Cancel
orclose
the window inX
at this moment I am not sure why but if we try to callwindow.near.enable();
for the second time it returnsundefined
and the popup never opens until you close the Browser and reopen it.(bug) Actions
property
not being passed downWhen trying to call
wallet_sendTransaction
method throughwindow.near.request()
from my understanding I think theactions
key/property is not being sent to thesendTransaction
function which is exposed by near-js-wallet-providerIt looks like you are not passing the
actions
to thesendTransaction
method.In the
PermissionSend.vue
component you make a call to this method replyPermission (vue store action)And the
replyPermission
then dispatches another event executeRequestWhich in the end executes this check, and you can see there's no
actions
key in the payload forsendTransaction
event.What happens is that in the end this if block is executed since in this case
options.actions
would be undefined at this point aTransfer
action is being created by default.(issue) there's no way to disconnect/ logout once you're connected.
If you call await
window.near.enable();
and confirm the connection then there's no way how you can logout or disconnect from the dApp unles you close the browser window.The text was updated successfully, but these errors were encountered: