diff --git a/img/lusd_grey_120x120.png b/img/lusd_grey_120x120.png new file mode 100644 index 000000000..b920b1ec6 Binary files /dev/null and b/img/lusd_grey_120x120.png differ diff --git a/img/lusd_grey_60x60.png b/img/lusd_grey_60x60.png new file mode 100644 index 000000000..243cb63a9 Binary files /dev/null and b/img/lusd_grey_60x60.png differ diff --git a/img/lusd_red_120x120.png b/img/lusd_red_120x120.png new file mode 100644 index 000000000..61eea6f1d Binary files /dev/null and b/img/lusd_red_120x120.png differ diff --git a/img/lusd_red_60x60.png b/img/lusd_red_60x60.png new file mode 100644 index 000000000..2bc5c8f0a Binary files /dev/null and b/img/lusd_red_60x60.png differ diff --git a/img/sai_grey_120x120.png b/img/sai_grey_120x120.png deleted file mode 100644 index 374971ce3..000000000 Binary files a/img/sai_grey_120x120.png and /dev/null differ diff --git a/img/sai_grey_60x60.png b/img/sai_grey_60x60.png deleted file mode 100644 index ecebc3a80..000000000 Binary files a/img/sai_grey_60x60.png and /dev/null differ diff --git a/img/sai_red_120x120.png b/img/sai_red_120x120.png deleted file mode 100644 index d1b265b3f..000000000 Binary files a/img/sai_red_120x120.png and /dev/null differ diff --git a/img/sai_red_60x60.png b/img/sai_red_60x60.png deleted file mode 100644 index 36ee7c014..000000000 Binary files a/img/sai_red_60x60.png and /dev/null differ diff --git a/src/GWallet.Backend.Tests/CompoundBalanceCaching.fs b/src/GWallet.Backend.Tests/CompoundBalanceCaching.fs index 043a3c829..7e354c242 100644 --- a/src/GWallet.Backend.Tests/CompoundBalanceCaching.fs +++ b/src/GWallet.Backend.Tests/CompoundBalanceCaching.fs @@ -291,12 +291,12 @@ type CompoundBalanceCaching() = File.Delete cacheFiles.ServerStats.FullName [] - member __.``substracting both currency X(e.g. SAI) and the currency Y(e.g.ETH) where fees are spent``() = + member __.``substracting both currency X(e.g. DAI) and the currency Y(e.g.ETH) where fees are spent``() = let cache,cacheFiles = SpawnNewCacheInstanceToTest high_expiration_span_because_this_test_doesnt_involve_timing try - let someTokenCurrency = Currency.SAI + let someTokenCurrency = Currency.DAI let someTokenBalance = 10m let someEthCurrency = Currency.ETH let someEthBalance = 5m diff --git a/src/GWallet.Backend.Tests/Deserialization.fs b/src/GWallet.Backend.Tests/Deserialization.fs index 7420db877..15c9bf761 100644 --- a/src/GWallet.Backend.Tests/Deserialization.fs +++ b/src/GWallet.Backend.Tests/Deserialization.fs @@ -179,10 +179,10 @@ type Deserialization() = Is.EqualTo(2)) [] - member __.``unsigned SAI transaction import``() = + member __.``unsigned DAI transaction import``() = let deserializedUnsignedTrans: UnsignedTransaction = Account.ImportUnsignedTransactionFromJson - MarshallingData.UnsignedSaiTransactionExampleInJson + MarshallingData.UnsignedDaiTransactionExampleInJson Assert.That(deserializedUnsignedTrans, Is.Not.Null) Assert.That(deserializedUnsignedTrans.Proposal, Is.Not.Null) @@ -192,16 +192,16 @@ type Deserialization() = Assert.That(deserializedUnsignedTrans.Proposal.Amount.ValueToSend, Is.EqualTo(1m)) Assert.That(deserializedUnsignedTrans.Proposal.Amount.BalanceAtTheMomentOfSending, Is.EqualTo 7.08m) - Assert.That(deserializedUnsignedTrans.Proposal.Amount.Currency, Is.EqualTo Currency.SAI) + Assert.That(deserializedUnsignedTrans.Proposal.Amount.Currency, Is.EqualTo Currency.DAI) Assert.That(deserializedUnsignedTrans.Proposal.DestinationAddress, Is.EqualTo("0xDb0381B1a380d8db2724A9Ca2d33E0C6C044bE3b")) Assert.That(deserializedUnsignedTrans.Proposal.OriginMainAddress, Is.EqualTo("0xba766d6d13E2Cc921Bf6e896319D32502af9e37E")) - let saiTxMetadata = deserializedUnsignedTrans.Metadata :?> Ether.TransactionMetadata - Assert.That(saiTxMetadata.TransactionCount, Is.EqualTo(7)) - Assert.That(saiTxMetadata.Fee.Currency, Is.EqualTo(Currency.ETH)) - Assert.That(saiTxMetadata.Fee.GasPriceInWei, Is.EqualTo(3343750000L)) + let daiTxMetadata = deserializedUnsignedTrans.Metadata :?> Ether.TransactionMetadata + Assert.That(daiTxMetadata.TransactionCount, Is.EqualTo(7)) + Assert.That(daiTxMetadata.Fee.Currency, Is.EqualTo(Currency.ETH)) + Assert.That(daiTxMetadata.Fee.GasPriceInWei, Is.EqualTo(3343750000L)) Assert.That(deserializedUnsignedTrans.Metadata.FeeEstimationTime, Is.EqualTo MarshallingData.SomeDate) @@ -209,11 +209,11 @@ type Deserialization() = Assert.That(deserializedUnsignedTrans.Cache.UsdPrice.Count, Is.EqualTo(5)) [] - member __.``signed SAI transaction import``() = + member __.``signed DAI transaction import``() = let deserializedSignedTrans: SignedTransaction = Account.ImportSignedTransactionFromJson - MarshallingData.SignedSaiTransactionExampleInJson + MarshallingData.SignedDaiTransactionExampleInJson Assert.That(deserializedSignedTrans, Is.Not.Null) @@ -230,7 +230,7 @@ type Deserialization() = Assert.That(deserializedSignedTrans.TransactionInfo.Proposal.Amount.BalanceAtTheMomentOfSending, Is.EqualTo 7.08m) Assert.That(deserializedSignedTrans.TransactionInfo.Proposal.Amount.Currency, - Is.EqualTo Currency.SAI) + Is.EqualTo Currency.DAI) Assert.That(deserializedSignedTrans.TransactionInfo.Proposal.DestinationAddress, Is.EqualTo("0xDb0381B1a380d8db2724A9Ca2d33E0C6C044bE3b")) Assert.That(deserializedSignedTrans.TransactionInfo.Proposal.OriginMainAddress, diff --git a/src/GWallet.Backend.Tests/GWallet.Backend.Tests-legacy.fsproj b/src/GWallet.Backend.Tests/GWallet.Backend.Tests-legacy.fsproj index a5ddab212..62f96a6fa 100644 --- a/src/GWallet.Backend.Tests/GWallet.Backend.Tests-legacy.fsproj +++ b/src/GWallet.Backend.Tests/GWallet.Backend.Tests-legacy.fsproj @@ -63,8 +63,8 @@ - - + + diff --git a/src/GWallet.Backend.Tests/GWallet.Backend.Tests.fsproj b/src/GWallet.Backend.Tests/GWallet.Backend.Tests.fsproj index 7614dd914..d291c3772 100644 --- a/src/GWallet.Backend.Tests/GWallet.Backend.Tests.fsproj +++ b/src/GWallet.Backend.Tests/GWallet.Backend.Tests.fsproj @@ -43,12 +43,12 @@ - + - + diff --git a/src/GWallet.Backend.Tests/MarshallingData.fs b/src/GWallet.Backend.Tests/MarshallingData.fs index 4dd651417..8a0ee8caf 100644 --- a/src/GWallet.Backend.Tests/MarshallingData.fs +++ b/src/GWallet.Backend.Tests/MarshallingData.fs @@ -56,11 +56,11 @@ module MarshallingData = Fsdk.Misc.ExtractEmbeddedResourceFileContents resourceName |> Sanitize - let UnsignedSaiTransactionExampleInJson = - ReadEmbeddedResource "unsignedAndFormattedSaiTransaction.json" + let UnsignedDaiTransactionExampleInJson = + ReadEmbeddedResource "unsignedAndFormattedDaiTransaction.json" - let SignedSaiTransactionExampleInJson = - ReadEmbeddedResource "signedAndFormattedSaiTransaction.json" + let SignedDaiTransactionExampleInJson = + ReadEmbeddedResource "signedAndFormattedDaiTransaction.json" let BasicExceptionExampleInJson = ReadEmbeddedResource "basicException.json" @@ -196,13 +196,13 @@ module MarshallingData = (Currency.LTC.ToString(), 173.592m); (Currency.ETH.ToString(), 691.52m); (Currency.ETC.ToString(), 19.8644m); - (Currency.SAI.ToString(), 1.00376m) ] + (Currency.DAI.ToString(), 1.00376m) ] |> Map.ofSeq let private realAddressesSample = Map.empty.Add("3Buz1evVsQeHtDfQAmwfAKQsUzAt3f4TuR",[Currency.BTC.ToString()]) .Add("0xba766d6d13E2Cc921Bf6e896319D32502af9e37E",[Currency.ETH.ToString(); - Currency.SAI.ToString() + Currency.DAI.ToString() Currency.ETC.ToString()]) .Add("MJ88KYLTpXVigiwJGevzyxfGogmKx7WiWm",[Currency.LTC.ToString()]) @@ -210,7 +210,7 @@ module MarshallingData = Map.empty.Add(Currency.BTC.ToString(), 0.0m) .Add(Currency.ETH.ToString(), 7.08m) .Add(Currency.ETC.ToString(), 8.0m) - .Add(Currency.SAI.ToString(), 1.0m) + .Add(Currency.DAI.ToString(), 1.0m) .Add(Currency.LTC.ToString(), 0.0m) let private realCachingDataExample = @@ -253,36 +253,36 @@ module MarshallingData = Metadata = someEtherTxMetadata; } - let private someEtherMinerFeeForSaiTransfer = Ether.MinerFee(37298L, + let private someEtherMinerFeeForDaiTransfer = Ether.MinerFee(37298L, 3343750000L, SomeDate, Currency.ETH) - let private someSaiTxMetadata = + let private someDaiTxMetadata = { - Fee = someEtherMinerFeeForSaiTransfer + Fee = someEtherMinerFeeForDaiTransfer TransactionCount = int64 7; } - let private someUnsignedSaiTransactionProposal = + let private someUnsignedDaiTransactionProposal = { OriginMainAddress = "0xba766d6d13E2Cc921Bf6e896319D32502af9e37E"; - Amount = TransferAmount(1m, 7.08m, Currency.SAI) + Amount = TransferAmount(1m, 7.08m, Currency.DAI) DestinationAddress = "0xDb0381B1a380d8db2724A9Ca2d33E0C6C044bE3b"; } - let UnsignedSaiTransactionExample = + let UnsignedDaiTransactionExample = { - Proposal = someUnsignedSaiTransactionProposal + Proposal = someUnsignedDaiTransactionProposal Cache = realCachingDataExample; - Metadata = someSaiTxMetadata + Metadata = someDaiTxMetadata } - let someSaiTransactionInfo = + let someDaiTransactionInfo = { - Proposal = someUnsignedSaiTransactionProposal + Proposal = someUnsignedDaiTransactionProposal Cache = realCachingDataExample; - Metadata = someSaiTxMetadata + Metadata = someDaiTxMetadata } - let SignedSaiTransactionExample = + let SignedDaiTransactionExample = { - TransactionInfo = someSaiTransactionInfo + TransactionInfo = someDaiTransactionInfo RawTransaction = "f8a80784c74d93708291b29489d24a6b4ccb1b6faa2625fe562bdd9a2326035980b844a9059cbb000000000000000000000000db0381b1a380d8db2724a9ca2d33e0c6c044be3b0000000000000000000000000000000000000000000000000de0b6b3a764000026a072cdeb03affd5977c76366efbc1405fbb4fa997ce72c1e4554ba9ec5ef772ddca069d522ea304efebd2537330870bc1ca9e9a6fe3eb5f8d8f66c1b82d9fc27a4bf"; } diff --git a/src/GWallet.Backend.Tests/Serialization.fs b/src/GWallet.Backend.Tests/Serialization.fs index 9a4aeb861..923f75e99 100644 --- a/src/GWallet.Backend.Tests/Serialization.fs +++ b/src/GWallet.Backend.Tests/Serialization.fs @@ -71,26 +71,26 @@ type Serialization() = Is.EqualTo MarshallingData.SignedEtherTransactionExampleInJson) [] - member __.``unsigned SAI transaction export``() = + member __.``unsigned DAI transaction export``() = let json = Account.ExportUnsignedTransactionToJson - MarshallingData.UnsignedSaiTransactionExample + MarshallingData.UnsignedDaiTransactionExample Assert.That(json, Is.Not.Null) Assert.That(json, Is.Not.Empty) Assert.That(json |> MarshallingData.Sanitize, - Is.EqualTo MarshallingData.UnsignedSaiTransactionExampleInJson) + Is.EqualTo MarshallingData.UnsignedDaiTransactionExampleInJson) [] - member __.``signed SAI transaction export``() = - let json = Account.ExportUnsignedTransactionToJson MarshallingData.SignedSaiTransactionExample + member __.``signed DAI transaction export``() = + let json = Account.ExportUnsignedTransactionToJson MarshallingData.SignedDaiTransactionExample Assert.That(json, Is.Not.Null) Assert.That(json, Is.Not.Empty) Assert.That(json|> MarshallingData.Sanitize, - Is.EqualTo MarshallingData.SignedSaiTransactionExampleInJson) + Is.EqualTo MarshallingData.SignedDaiTransactionExampleInJson) [] member __.``can serialize exceptions``() = - let json = Account.ExportUnsignedTransactionToJson MarshallingData.SignedSaiTransactionExample + let json = Account.ExportUnsignedTransactionToJson MarshallingData.SignedDaiTransactionExample Assert.That(json, Is.Not.Null) Assert.That(json, Is.Not.Empty) Assert.That(json|> MarshallingData.Sanitize, - Is.EqualTo MarshallingData.SignedSaiTransactionExampleInJson) + Is.EqualTo MarshallingData.SignedDaiTransactionExampleInJson) diff --git a/src/GWallet.Backend.Tests/data/signedAndFormattedBtcTransaction.json b/src/GWallet.Backend.Tests/data/signedAndFormattedBtcTransaction.json index 05ec34f6b..19caef311 100644 --- a/src/GWallet.Backend.Tests/data/signedAndFormattedBtcTransaction.json +++ b/src/GWallet.Backend.Tests/data/signedAndFormattedBtcTransaction.json @@ -34,15 +34,15 @@ "Cache": { "UsdPrice": { "BTC": 9156.19, + "DAI": 1.00376, "ETC": 19.8644, "ETH": 691.52, - "LTC": 173.592, - "SAI": 1.00376 + "LTC": 173.592 }, "Addresses": { "0xba766d6d13E2Cc921Bf6e896319D32502af9e37E": [ "ETH", - "SAI", + "DAI", "ETC" ], "3Buz1evVsQeHtDfQAmwfAKQsUzAt3f4TuR": [ @@ -54,10 +54,10 @@ }, "Balances": { "BTC": 0.0, + "DAI": 1.0, "ETC": 8.0, "ETH": 7.08, - "LTC": 0.0, - "SAI": 1.0 + "LTC": 0.0 } } }, diff --git a/src/GWallet.Backend.Tests/data/signedAndFormattedSaiTransaction.json b/src/GWallet.Backend.Tests/data/signedAndFormattedDaiTransaction.json similarity index 92% rename from src/GWallet.Backend.Tests/data/signedAndFormattedSaiTransaction.json rename to src/GWallet.Backend.Tests/data/signedAndFormattedDaiTransaction.json index 70e6e14c1..f1f9565a6 100644 --- a/src/GWallet.Backend.Tests/data/signedAndFormattedSaiTransaction.json +++ b/src/GWallet.Backend.Tests/data/signedAndFormattedDaiTransaction.json @@ -9,7 +9,7 @@ "ValueToSend": 1.0, "BalanceAtTheMomentOfSending": 7.08, "Currency": { - "Case": "SAI" + "Case": "DAI" } }, "DestinationAddress": "0xDb0381B1a380d8db2724A9Ca2d33E0C6C044bE3b" @@ -28,15 +28,15 @@ "Cache": { "UsdPrice": { "BTC": 9156.19, + "DAI": 1.00376, "ETC": 19.8644, "ETH": 691.52, - "LTC": 173.592, - "SAI": 1.00376 + "LTC": 173.592 }, "Addresses": { "0xba766d6d13E2Cc921Bf6e896319D32502af9e37E": [ "ETH", - "SAI", + "DAI", "ETC" ], "3Buz1evVsQeHtDfQAmwfAKQsUzAt3f4TuR": [ @@ -48,10 +48,10 @@ }, "Balances": { "BTC": 0.0, + "DAI": 1.0, "ETC": 8.0, "ETH": 7.08, - "LTC": 0.0, - "SAI": 1.0 + "LTC": 0.0 } } }, diff --git a/src/GWallet.Backend.Tests/data/unsignedAndFormattedBtcTransaction.json b/src/GWallet.Backend.Tests/data/unsignedAndFormattedBtcTransaction.json index 35781105e..0b7acc338 100644 --- a/src/GWallet.Backend.Tests/data/unsignedAndFormattedBtcTransaction.json +++ b/src/GWallet.Backend.Tests/data/unsignedAndFormattedBtcTransaction.json @@ -33,15 +33,15 @@ "Cache": { "UsdPrice": { "BTC": 9156.19, + "DAI": 1.00376, "ETC": 19.8644, "ETH": 691.52, - "LTC": 173.592, - "SAI": 1.00376 + "LTC": 173.592 }, "Addresses": { "0xba766d6d13E2Cc921Bf6e896319D32502af9e37E": [ "ETH", - "SAI", + "DAI", "ETC" ], "3Buz1evVsQeHtDfQAmwfAKQsUzAt3f4TuR": [ @@ -53,10 +53,10 @@ }, "Balances": { "BTC": 0.0, + "DAI": 1.0, "ETC": 8.0, "ETH": 7.08, - "LTC": 0.0, - "SAI": 1.0 + "LTC": 0.0 } } } diff --git a/src/GWallet.Backend.Tests/data/unsignedAndFormattedSaiTransaction.json b/src/GWallet.Backend.Tests/data/unsignedAndFormattedDaiTransaction.json similarity index 90% rename from src/GWallet.Backend.Tests/data/unsignedAndFormattedSaiTransaction.json rename to src/GWallet.Backend.Tests/data/unsignedAndFormattedDaiTransaction.json index 3b3e067c2..0c7ddf3ae 100644 --- a/src/GWallet.Backend.Tests/data/unsignedAndFormattedSaiTransaction.json +++ b/src/GWallet.Backend.Tests/data/unsignedAndFormattedDaiTransaction.json @@ -8,7 +8,7 @@ "ValueToSend": 1.0, "BalanceAtTheMomentOfSending": 7.08, "Currency": { - "Case": "SAI" + "Case": "DAI" } }, "DestinationAddress": "0xDb0381B1a380d8db2724A9Ca2d33E0C6C044bE3b" @@ -27,15 +27,15 @@ "Cache": { "UsdPrice": { "BTC": 9156.19, + "DAI": 1.00376, "ETC": 19.8644, "ETH": 691.52, - "LTC": 173.592, - "SAI": 1.00376 + "LTC": 173.592 }, "Addresses": { "0xba766d6d13E2Cc921Bf6e896319D32502af9e37E": [ "ETH", - "SAI", + "DAI", "ETC" ], "3Buz1evVsQeHtDfQAmwfAKQsUzAt3f4TuR": [ @@ -47,10 +47,10 @@ }, "Balances": { "BTC": 0.0, + "DAI": 1.0, "ETC": 8.0, "ETH": 7.08, - "LTC": 0.0, - "SAI": 1.0 + "LTC": 0.0 } } } diff --git a/src/GWallet.Backend/Account.fs b/src/GWallet.Backend/Account.fs index 6f39dc7d4..940afeba7 100644 --- a/src/GWallet.Backend/Account.fs +++ b/src/GWallet.Backend/Account.fs @@ -68,10 +68,6 @@ module Account = | 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 - let compoundBalance,_ = Caching.Instance.RetrieveAndUpdateLastCompoundBalance account.PublicAddress account.Currency diff --git a/src/GWallet.Backend/BlockExplorer.fs b/src/GWallet.Backend/BlockExplorer.fs index 9f63decf4..7bb1b1348 100644 --- a/src/GWallet.Backend/BlockExplorer.fs +++ b/src/GWallet.Backend/BlockExplorer.fs @@ -21,7 +21,7 @@ module BlockExplorer = | Currency.ETC -> // maybe blockscout is better? minergate.com seems to only show blocks, not addresses "https://etcblockexplorer.com/address/addr/" - | Currency.SAI | Currency.DAI -> + | Currency.LUSD | Currency.DAI -> SPrintF1 "https://etherscan.io/token/%s?a=" (TokenManager.GetTokenContractAddress account.Currency) Uri(baseUrl + account.PublicAddress) @@ -36,6 +36,6 @@ module BlockExplorer = "https://etherscan.io/tx/" | Currency.ETC -> "https://etcblockexplorer.com/tx/" - | Currency.DAI | Currency.SAI -> + | Currency.DAI | Currency.LUSD -> "https://etherscan.io/tx/" Uri(baseUrl + txHash) diff --git a/src/GWallet.Backend/Currency.fs b/src/GWallet.Backend/Currency.fs index 89b874e88..56a6202f1 100644 --- a/src/GWallet.Backend/Currency.fs +++ b/src/GWallet.Backend/Currency.fs @@ -14,7 +14,7 @@ type Currency = | ETH | ETC | DAI - | SAI + | LUSD // #if STRICTER_COMPILATION_BUT_WITH_REFLECTION_AT_RUNTIME @@ -33,7 +33,7 @@ type Currency = yield ETH yield ETC yield DAI - yield SAI + yield LUSD } #endif @@ -43,7 +43,7 @@ type Currency = member self.IsEther() = self = Currency.ETC || self = Currency.ETH member self.IsEthToken() = - self = Currency.DAI || self = Currency.SAI + self = Currency.DAI || self = Currency.LUSD member self.IsEtherBased() = self.IsEther() || self.IsEthToken() member self.IsUtxo() = @@ -54,7 +54,7 @@ type Currency = 8 elif self.IsEther() then 18 - elif self = Currency.SAI || self = Currency.DAI then + elif self = Currency.LUSD || self = Currency.DAI then 18 else failwith <| SPrintF1 "Unable to determine decimal places for %A" self @@ -70,7 +70,7 @@ type Currency = | LTC -> "LTC" | ETH -> "ETH" | ETC -> "ETC" - | SAI -> "SAI" + | LUSD -> "LUSD" | DAI -> "DAI" #endif diff --git a/src/GWallet.Backend/Ether/EtherAccount.fs b/src/GWallet.Backend/Ether/EtherAccount.fs index e64496bae..2593e18a5 100644 --- a/src/GWallet.Backend/Ether/EtherAccount.fs +++ b/src/GWallet.Backend/Ether/EtherAccount.fs @@ -224,7 +224,7 @@ module internal Account = let baseCurrency = match account.Currency with - | DAI | SAI -> ETH + | DAI | LUSD -> ETH | _ -> failwith <| SPrintF1 "Unknown token %A" account.Currency let! tokenTransferFee = Ether.Server.EstimateTokenTransferFee account amount destination @@ -467,7 +467,7 @@ module internal Account = let GetSignedTransactionDetails (signedTransaction: SignedTransaction<'T>): ITransactionDetails = match signedTransaction.TransactionInfo.Proposal.Amount.Currency with - | SAI | DAI -> + | LUSD | DAI -> // FIXME: derive the transaction details from the raw transaction so that we can remove the proposal from // the SignedTransaction type (as it's redundant); and when we remove it, we can also rename // IBlockchainFeeInfo's Currency to "FeeCurrency", or change "Metadata" members whose type is diff --git a/src/GWallet.Backend/Ether/TokenManager.fs b/src/GWallet.Backend/Ether/TokenManager.fs index ed00b7f22..c543aa480 100644 --- a/src/GWallet.Backend/Ether/TokenManager.fs +++ b/src/GWallet.Backend/Ether/TokenManager.fs @@ -15,7 +15,7 @@ module TokenManager = let GetTokenContractAddress currency = match currency with | Currency.DAI -> "0x6B175474E89094C44Da98b954EedeAC495271d0F" - | Currency.SAI -> "0x89d24A6b4CcB1B6fAA2625fE562bDD9a23260359" + | Currency.LUSD -> "0x5f98805A4E8be255a32880FDeC7F6728C6568bA0" | _ -> raise <| invalidOp (SPrintF1 "%A has no contract address" currency) type TokenServiceWrapper(web3, currency: Currency) = diff --git a/src/GWallet.Backend/FiatValueEstimation.fs b/src/GWallet.Backend/FiatValueEstimation.fs index 0683a30e9..67206ce34 100644 --- a/src/GWallet.Backend/FiatValueEstimation.fs +++ b/src/GWallet.Backend/FiatValueEstimation.fs @@ -1011,12 +1011,12 @@ module FiatValueEstimation = | Currency.BTC,_ -> "bitcoin" | Currency.LTC,_ -> "litecoin" - // NOTE: don't worry, a second calculation will be performed for SAI, see https://github.com/nblockchain/geewallet/commit/bb7f59271b21d1ab278e4d4dcd9e12a3bdd49ba9 - | Currency.ETH,_ | Currency.SAI,_ -> "ethereum" + | Currency.ETH,_ -> "ethereum" | Currency.ETC,_ -> "ethereum-classic" | Currency.DAI,PriceProvider.CoinCap -> "multi-collateral-dai" | Currency.DAI,_ -> "dai" + | Currency.LUSD,_ -> "liquity-usd" try let baseUrl = @@ -1195,12 +1195,7 @@ module FiatValueEstimation = let realResult = match result with | Some price -> - let realPrice = - if currency = Currency.SAI then - let ethMultiplied = price * 0.0053m - ethMultiplied - else - price + let realPrice = price Caching.Instance.StoreLastFiatUsdPrice(currency, realPrice) realPrice |> Some | None -> None diff --git a/src/GWallet.Frontend.Console/UserInteraction.fs b/src/GWallet.Frontend.Console/UserInteraction.fs index c39b6db4a..5fbe7d4ca 100644 --- a/src/GWallet.Frontend.Console/UserInteraction.fs +++ b/src/GWallet.Frontend.Console/UserInteraction.fs @@ -228,13 +228,7 @@ module UserInteraction = (maybeBalance: MaybeCached) maybeUsdValue : seq = - match account.Currency, maybeBalance with - | Currency.SAI, NotFresh (Cached (0m, _time)) -> - Seq.empty - | Currency.SAI, Fresh 0m -> - Seq.empty - | _ -> - DisplayAccountStatusInner accountNumber account maybeBalance maybeUsdValue + DisplayAccountStatusInner accountNumber account maybeBalance maybeUsdValue let private GetAccountBalanceInner (account: IAccount) (showProgress: bool): Async*MaybeCached> = async { @@ -324,7 +318,6 @@ module UserInteraction = for KeyValue(currency, balance) in currenciesToBalances do match currency, balance with | _, None -> () - | SAI, Some (0m, _) -> () | _, Some (onlineBalance, maybeUsdValue) -> match maybeUsdValue with | NotFresh(NotAvailable) -> yield None, None diff --git a/src/GWallet.Frontend.XF/FrontendHelpers.fs b/src/GWallet.Frontend.XF/FrontendHelpers.fs index e44a94079..f114bdcfb 100644 --- a/src/GWallet.Frontend.XF/FrontendHelpers.fs +++ b/src/GWallet.Frontend.XF/FrontendHelpers.fs @@ -102,16 +102,15 @@ module FrontendHelpers = match currency with | Currency.BTC -> Color.FromRgb(245, 146, 47) - // looks very similar to BTC (orangish)... so let's use SAI color when we phase it out? - | Currency.DAI -> Color.FromRgb(250, 176, 28) + | Currency.DAI -> Color.FromRgb(254, 205, 83) - | Currency.SAI -> Color.FromRgb(254, 205, 83) + | Currency.LUSD -> Color.FromRgb(46, 182, 234) | Currency.ETC -> Color.FromRgb(14, 119, 52) | Currency.ETH -> Color.FromRgb(130, 131, 132) | Currency.LTC -> Color.FromRgb(54, 94, 155) let UpdateBalance (balance: MaybeCached) currency usdRate - (maybeFrame: Option) (balanceLabel: Label) (fiatBalanceLabel: Label) + (_maybeFrame: Option) (balanceLabel: Label) (fiatBalanceLabel: Label) (cryptoSubUnit: Option) : MaybeCached = let maybeBalanceAmount = @@ -121,12 +120,6 @@ module FrontendHelpers = | NotFresh(Cached(amount,_)) -> Some amount | Fresh(amount) -> - match maybeFrame, currency, amount with - | Some frame, Currency.SAI, 0m -> - MainThread.BeginInvokeOnMainThread(fun _ -> - frame.IsVisible <- false - ) - | _ -> () Some amount let balanceAmountStr,fiatAmount,fiatAmountStr = match maybeBalanceAmount with diff --git a/src/GWallet.Frontend.XF/GWallet.Frontend.XF.fsproj b/src/GWallet.Frontend.XF/GWallet.Frontend.XF.fsproj index 6fa6d61ba..dac3a15e8 100644 --- a/src/GWallet.Frontend.XF/GWallet.Frontend.XF.fsproj +++ b/src/GWallet.Frontend.XF/GWallet.Frontend.XF.fsproj @@ -37,17 +37,17 @@ img\dai_red_120x120.png - - img\sai_grey_60x60.png + + img\lusd_grey_60x60.png - - img\sai_grey_120x120.png + + img\lusd_grey_120x120.png - - img\sai_red_60x60.png + + img\lusd_red_60x60.png - - img\sai_red_120x120.png + + img\lusd_red_120x120.png img\etc_grey_60x60.png