Skip to content

Commit

Permalink
Backend: fix build (remove XamEssentials code)
Browse files Browse the repository at this point in the history
See this recent commit in master branch for more info:
368fdba
  • Loading branch information
knocte committed Aug 3, 2023
1 parent ef89395 commit dbf0c10
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/GWallet.Backend/Config.fs
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,13 @@ module Config =

let internal GetConfigDirForThisProgram() =
let configPath =
(* NOTE: we used to support UWP via the Xamarin.Essentials code below, but MAUI is a higher priority than resurrecting UWP now:
if (not isWindows) || Xamarin.Essentials.DeviceInfo.Platform <> Xamarin.Essentials.DevicePlatform.UWP then
Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)
else //UWP
Xamarin.Essentials.FileSystem.AppDataDirectory
*)
Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)

// TODO: rename to "geewallet", following a similar approach as DAI->SAI rename
let configDir = DirectoryInfo(Path.Combine(configPath, "gwallet"))
Expand Down
3 changes: 3 additions & 0 deletions src/GWallet.Backend/Ether/EtherServer.fs
Original file line number Diff line number Diff line change
Expand Up @@ -291,10 +291,13 @@ module Server =
match maybeHttpReqEx with
| Some httpReqEx ->

(* NOTE: we disabled UWP tweaks for now, see other comment in Config.fs
// FIXME: report this UWP bug (see commit message for full stacktrace)
if Xamarin.Essentials.DeviceInfo.Platform.Equals Xamarin.Essentials.DevicePlatform.UWP &&
httpReqEx.InnerException <> null && httpReqEx.InnerException.GetType() = typeof<Exception> then
raise <| ServerCannotBeResolvedException(httpReqEx.InnerException.Message, ex)
*)

// this could be a mono 6.0.x bug (see https://gitlab.gnome.org/World/geewallet/issues/121)
if httpReqEx.Message.Contains "SSL" then
Expand Down

0 comments on commit dbf0c10

Please sign in to comment.