Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/stable'
Browse files Browse the repository at this point in the history
To mainly bring the SAI use telemetry.

# Conflicts:
#	src/GWallet.Backend/Account.fs
  • Loading branch information
knocte committed Feb 9, 2024
2 parents b0f066b + ae9f2a6 commit 0b23222
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
12 changes: 6 additions & 6 deletions configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ RUNNER_ARG=invalid
REPL_CHECK_MSG="checking for a working F# REPL..."

if which dotnet >/dev/null 2>&1; then
echo "$REPL_CHECK_MSG" $'found'
echo -n "$REPL_CHECK_MSG"
RUNNER_BIN=dotnet
RUNNER_ARG=fsi
else
Expand All @@ -32,10 +32,10 @@ else
if ! which fsx >/dev/null 2>&1; then
echo "$FSX_CHECK_MSG" $'not found\n'

echo "$0" $'failed, please install "fsharpi" or "fsx" first'
echo "$0" $'failed, please install "dotnet" first'
exit 1
else
echo "$FSX_CHECK_MSG" $'found'
echo -n "$FSX_CHECK_MSG"
RUNNER_BIN=fsx
RUNNER_ARG=
fi
Expand All @@ -53,11 +53,11 @@ else
cd scripts/fsx && ./configure.sh --prefix=$BIN_DIR && make install && cd ../..
RUNNER_BIN="$BIN_DIR/bin/fsx"
else
echo "$FSX_CHECK_MSG" $'found'
echo -n "$FSX_CHECK_MSG"
RUNNER_BIN=fsx
fi
else
echo "$REPL_CHECK_MSG" $'found'
echo -n "$REPL_CHECK_MSG"
RUNNER_BIN=fsharpi
RUNNER_ARG="--define:LEGACY_FRAMEWORK"
fi
Expand All @@ -73,4 +73,4 @@ if [ ! -z "${RUNNER_ARG}" ]; then
echo -e "FsxRunnerArg=$RUNNER_ARG" >> scripts/build.config
fi
source scripts/build.config
$RUNNER_BIN $RUNNER_ARG ./scripts/configure.fsx "$@"
DOTNET_NOLOGO=true $RUNNER_BIN $RUNNER_ARG ./scripts/configure.fsx "$@"
3 changes: 3 additions & 0 deletions scripts/configure.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ let buildTool, legacyBuildTool, areGtkLibsAbsentOrDoesNotApply =
dotnetCmd, msbuildCmd, true
| platform (* Unix *) ->

// because it comes from configure.sh's "Checking for a working F# REPL..."
Console.WriteLine " found"

Process.ConfigCommandCheck ["make"] true true |> ignore

match Process.ConfigCommandCheck ["mono"] false true with
Expand Down
6 changes: 6 additions & 0 deletions src/GWallet.Backend/Account.fs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,13 @@ module Account =
| None ->
let cachedBalance = Caching.Instance.RetrieveLastCompoundBalance account.PublicAddress account.Currency
return (NotFresh cachedBalance, None)

| Some (balance,imminentIncomingPayment) ->

if account.Currency = Currency.SAI && balance > 0m then
Infrastructure.ReportWarningMessage ("Some user is still using SAI (informative telemetry to avoid phasing out this currency too early)")
|> ignore<bool>

let compoundBalance,_ =
Caching.Instance.RetrieveAndUpdateLastCompoundBalance account.PublicAddress
account.Currency
Expand Down

0 comments on commit 0b23222

Please sign in to comment.