[fix 6012] can't open dapps from deeplinks

Signed-off-by: yenda <eric@status.im>
This commit is contained in:
yenda 2018-09-26 13:47:00 +02:00
parent a90dc39637
commit f37276a648
No known key found for this signature in database
GPG Key ID: 0095623C0069DCE6
3 changed files with 3 additions and 3 deletions

View File

@ -75,7 +75,7 @@
(handle-view-profile cofx (match-url url profile-regex))
(match-url url browse-regex)
(handle-browse cofx url)
(handle-browse cofx (match-url url browse-regex))
(and config/extensions-enabled? (match-url url extension-regex))
(handle-extension cofx url)

View File

@ -13,6 +13,6 @@
(get-in (models/handle-qr-code cofx "0x04e1433c1a8ad71280e6d4b1814aa3958ba6eb451da47ea1d4a4bfc4a04969c445548f3bd9d40fa7e4356aa62075b4d7615179ef1332f1d6a7c59b96c4ab8e04c1") [:db :view-id]))))
(testing "handle universal link"
(is (= (:browser/show-browser-selection (models/handle-qr-code cofx "status-im://browse/www.cryptokitties.co"))
"status-im://browse/www.cryptokitties.co")))
"www.cryptokitties.co")))
(testing "handle invalid qr code"
(is (:utils/show-popup (models/handle-qr-code cofx "a random string")))))

View File

@ -22,7 +22,7 @@
(testing "a browse dapp link"
(testing "it open the dapps"
(is
(= "status-im://browse/www.cryptokitties.co"
(= "www.cryptokitties.co"
(:browser/show-browser-selection (links/handle-url {:db db} "status-im://browse/www.cryptokitties.co"))))))
(testing "a user profile link"
(testing "it loads the profile"