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
Merge pull request #58 from MetaMask/fix/ignore_unnessessary_blob_download_requests
fix: Download file requested when connecting to any Dapp.
Previous JS injection was catching a Blob file creation and triggered downloading immediately. Turned out some Dapps may create Blob files without user actually trying to download these files. To prevent the issue, we try to download Blobs only on clicks on download elements in the website or when Android receives a download callback.
To test Blob file downloading I use two websites:
https://eligrey.com/demos/FileSaver.js/https://tyschenko.github.io/download_blob_file.html
New solution was also tested on Uniswap.org and pancakeswap.finance Dapps.
* This script handles Blob downloading in two ways:
38
+
* 1) It intercepts clicks on elements with a Blob: href.
39
+
* 2) It defines a method, downloadBlob, which is manually invoked from Android [com.reactnativecommunity.webview.RNCWebViewManagerImpl] in cases where the href is undefined.
0 commit comments