@@ -20,7 +20,6 @@ import (
2020 "net/url"
2121 "os"
2222 "path/filepath"
23- "runtime"
2423 "strings"
2524
2625 "github.com/btcsuite/btcd/chaincfg"
@@ -42,7 +41,6 @@ import (
4241 "github.com/digitalbitbox/bitbox-wallet-app/backend/keystore"
4342 "github.com/digitalbitbox/bitbox-wallet-app/backend/keystore/software"
4443 "github.com/digitalbitbox/bitbox-wallet-app/backend/rates"
45- utilConfig "github.com/digitalbitbox/bitbox-wallet-app/util/config"
4644 "github.com/digitalbitbox/bitbox-wallet-app/util/errp"
4745 "github.com/digitalbitbox/bitbox-wallet-app/util/locker"
4846 "github.com/digitalbitbox/bitbox-wallet-app/util/logging"
@@ -633,8 +631,7 @@ func (backend *Backend) NotifyUser(text string) {
633631
634632// SystemOpen opens the given URL using backend.environment.
635633// It consults fixedURLWhitelist, matching the URL with each whitelist item.
636- // If an item is a prefix of url, it is allowed to be openend. Otherwise, an ad-hoc
637- // patter matching is performed for URLs like the CSV export download path.
634+ // If an item is a prefix of url, it is allowed to be openend.
638635//
639636// If none matched, an ad-hoc URL construction failed or opening a URL failed,
640637// an error is returned.
@@ -646,17 +643,6 @@ func (backend *Backend) SystemOpen(url string) error {
646643 }
647644 }
648645
649- if runtime .GOOS != "android" { // TODO: fix DownloadsDir() for android
650- // Whitelist CSV export.
651- downloadDir , err := utilConfig .DownloadsDir ()
652- if err != nil {
653- return err
654- }
655- if strings .HasPrefix (url , downloadDir ) {
656- return backend .environment .SystemOpen (url )
657- }
658- }
659-
660646 return errp .Newf ("Blocked /open with url: %s" , url )
661647}
662648
0 commit comments