web3swift icon indicating copy to clipboard operation
web3swift copied to clipboard

Dapps cannot connect my wallet by using `BrowserViewController` with a URL.

Open AlleniCode opened this issue 4 years ago • 8 comments
trafficstars

When I entered a dapp page with BrowserViewController, it cannot connect my wallet automatically.

https://github.com/skywinder/web3swift/blob/develop/Example/web3swiftBrowser/web3swiftBrowser/ViewController.swift

class DAppsViewController: BrowserViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
    }

    override func viewWillAppear(_ animated: Bool) {
        super.viewWillAppear(animated)

        webView.translatesAutoresizingMaskIntoConstraints = false
        view.addSubview(webView)

        NSLayoutConstraint.activate([
            webView.topAnchor.constraint(equalTo: view.topAnchor),
            webView.leadingAnchor.constraint(equalTo: view.leadingAnchor),
            webView.trailingAnchor.constraint(equalTo: view.trailingAnchor),
            webView.bottomAnchor.constraint(equalTo: view.bottomAnchor),
        ])

        var urlToOpen = "https://1inch.exchange/"
        urlToOpen = "https://app.compound.finance"
        urlToOpen = "https://app.uniswap.org"
        webView.load(URLRequest(url: URL(string: urlToOpen)!))

        do {
            let keystoreManager = KeystoreManager(["My EthereumKeystoreV3"])
            let web3 = Web3.InfuraMainnetWeb3()
            web3.addKeystoreManager(keystoreManager)
            
            self.registerBridges(for: web3)
        } catch {
            print(error)
        }
    }
}

Same issues:

https://github.com/skywinder/web3swift/issues/338 https://github.com/skywinder/web3swift/issues/337 https://github.com/skywinder/web3swift/issues/321 https://github.com/skywinder/web3swift/issues/304 https://github.com/skywinder/web3swift/issues/303

@skywinder

AlleniCode avatar Aug 09 '21 06:08 AlleniCode

https://github.com/veerChauhan/web3swift

Go through the Example #Web3supportBrowser

#338 #337 #321 #304 #303

Please let me know if there any issue

RaviRanjan-11 avatar Aug 10 '21 18:08 RaviRanjan-11

@veerChauhan Hello, I have tried,still the same issue. 😂

AlleniCode avatar Aug 12 '21 10:08 AlleniCode

Thank the report. I'm not able to check It right now but would be happy to allocate gitcoin bounty for someone who can fix it.

skywinder avatar Aug 13 '21 16:08 skywinder

Here you go, here is a bounty: https://gitcoin.co/issue/skywinder/web3swift/357/100026264 - I'm open to adjusting bounty if it takes time. Let me know if someone is willing to help with this. 🙌

skywinder avatar Aug 13 '21 16:08 skywinder

🙁

CYC666 avatar Aug 20 '21 07:08 CYC666

@skywinder Is this issue solved?

AlleniCode avatar Nov 15 '21 03:11 AlleniCode

I've solved the question that cann't connect DApp.

You can add my WeChat who want to get the idea.

My WeChat ID: wxid-74skhl3tr69k21

CYC666 avatar Dec 02 '21 07:12 CYC666

I've solved the question that cann't connect DApp.

You can add my WeChat who want to get the idea.

My WeChat ID: wxid-74skhl3tr69k21 @CYC666 Hello. Can you provide your solution for this issue here please

Valter4578 avatar Dec 30 '21 13:12 Valter4578

https://github.com/veerChauhan/web3swift

Go through the Example #Web3supportBrowser

#338 #337 #321 #304 #303 IMG_39CBC6432732-1

Please let me know if there any issue

injected not show when I click the connect button on dapps. It's looks like normal browser. I expect above shared screenshot . Kindly help me .

sathyawealwin avatar Jan 07 '23 08:01 sathyawealwin