Comments (8)
The pop-ups work as long as the browser is configured to not block pop-ups. For example, on iPhone, the default safari settings block pop-ups. Even worse, is that on safari, the user is not notified that the pop-up was even blocked. As the developer, I knew what was the likely cause, but this is a bit confusing for end users. If the MyAlgo signer can be integrated as an embedded widget, then it would avoid dealing with issues regarding pop-ups being blocked.
from myalgo-connect.
Hello @oysterpack ! Can you provide me more information about this issue?
- Which browsers are not opening the popups?
- Does all MyAlgo Connect methods are being blocked its popups?
- Can you share with me your code that is failing?
from myalgo-connect.
@oysterpack MyAlgo Connect works in those browsers (without the need of allowing popups). Unfortunately, not all browsers manage dom events the same. That's why I'm asking you for a code example to help you to solve this issue.
from myalgo-connect.
The app is built with Flutter Web, and I invoke the following Javascript leveraging Flutter's built in Dart JS integration:
const params = await algodClient.getTransactionParams().do();
const txn = {
...params,
type: "appl",
appIndex: appId,
appOnComplete: 0, // OnApplicationComplete.NoOpOC
from: account,
};
const signedTxn = await myAlgoWallet.signTransaction(txn);
from myalgo-connect.
@oysterpack Cool. Try removing this line:
const params = await algodClient.getTransactionParams().do();
And call myAlgoWallet.signTransaction
as the first method that calls the onClick handler. Maybe, the algod is using/spending the onClick event instead of myAlgoWallet
Edit: Just for testing purposes, use arbitrary data for params values.
from myalgo-connect.
The issue is easily reproducible on my iPhone using https://test.myalgo.com/. The steps to reproduce the issue are:
- disable pop-ups in Safari - which is the default setting
- make a payment transaction
- after clicking the submit button, the following error is displayed: "Can not open popup window - blocked"
from myalgo-connect.
@oysterpack Yes, unfortunately, https://test.myalgo.com only works for chrome, once we finished the development of the next version of MyAlgo Connect we will update it to support Firefox and Safari browsers. In this case, the problem is not MyAlgo Connect, it is how had been used it. On every submits call, we fetch params from algoexplorer API and this call "steals" the onClick event that MyAlgo Connect needs. If you clone test.myalgo.com and remove the await fetchParams and try it in Firefox or Safari it will work. If you see, the connect()
method does not fail. Just the signTransaction()
method fails. Internally, there is no difference between both, just the params are sent to the popup.
from myalgo-connect.
I confirmed what you said. If the first action in the onClick event is the myAlgoWallet.signTransaction(txn)
then the popup is not blocked (even though Safari is configured to block popups).
Thanks for the explanation. Now that I understand the behavior, I can work with this solution. I won't need the embedded widget. Feel free to close out the issue, unless you think an embedded widget is worthwhile.
from myalgo-connect.
Related Issues (20)
- Report a display bug in myalgo web front-end HOT 1
- sign 2 batches of tx groups in a roll HOT 2
- Not able to use multi-sig wallet for logging into dApps HOT 1
- Tutorial for React App on VScode?
- Unable to scroll down to 'Manage your accounts' on mobile HOT 1
- Feature proposal: Create and Verify Zero Value Transactions HOT 2
- bug - total supply wrong for ASA HOT 1
- API - Get Assets of connected account HOT 2
- Update the signLogicSig function for LogicSig create to new LogicSigAccount(...) from the deprecated makeLogicSig(...)
- Does this support React Native? HOT 1
- Is it possible to sign multisig transactions? HOT 2
- How to use rekeyed account? HOT 5
- Unable to override signer when original sender address is not in wallet HOT 3
- Operation cancelled HOT 5
- Can not sign a normal transaction with getting error cross-origin HOT 4
- Ho do I listen to account events? HOT 2
- getBalance
- TypeError: Cannot read properties of undefined (reading 'WINDOWS_NOT_LOADED') HOT 4
- Is it possible to sign MultiSig transactions via MyAlgo connect? HOT 3
- Removing Multisig Account HOT 1
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 myalgo-connect.