forked from WalletWasabi/WalletWasabi
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Notify versions as part of initial ws exchange * CR suggestions
- Loading branch information
Showing
17 changed files
with
135 additions
and
247 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,3 @@ | ||
namespace WalletWasabi.Models; | ||
|
||
public class UpdateStatus : IEquatable<UpdateStatus> | ||
{ | ||
public UpdateStatus(bool backendCompatible, bool clientUpToDate, Version legalDocumentsVersion, ushort currentBackendMajorVersion, Version clientVersion) | ||
{ | ||
BackendCompatible = backendCompatible; | ||
ClientUpToDate = clientUpToDate; | ||
LegalDocumentsVersion = legalDocumentsVersion; | ||
CurrentBackendMajorVersion = currentBackendMajorVersion; | ||
ClientVersion = clientVersion; | ||
} | ||
|
||
public bool ClientUpToDate { get; } | ||
public bool BackendCompatible { get; } | ||
public bool IsReadyToInstall { get; set; } | ||
|
||
public Version LegalDocumentsVersion { get; } | ||
public ushort CurrentBackendMajorVersion { get; } | ||
|
||
public Version ClientVersion { get; set; } | ||
|
||
#region EqualityAndComparison | ||
|
||
public static bool operator ==(UpdateStatus? x, UpdateStatus? y) | ||
=> (x?.ClientUpToDate, x?.BackendCompatible, x?.LegalDocumentsVersion, x?.CurrentBackendMajorVersion, x?.ClientVersion) == (y?.ClientUpToDate, y?.BackendCompatible, y?.LegalDocumentsVersion, y?.CurrentBackendMajorVersion, y?.ClientVersion); | ||
|
||
public static bool operator !=(UpdateStatus? x, UpdateStatus? y) => !(x == y); | ||
|
||
public override bool Equals(object? obj) => Equals(obj as UpdateStatus); | ||
|
||
public bool Equals(UpdateStatus? other) => this == other; | ||
|
||
public override int GetHashCode() => (ClientUpToDate, BackendCompatible, LegalDocumentsVersion, CurrentBackendMajorVersion, ClientVersion).GetHashCode(); | ||
|
||
#endregion EqualityAndComparison | ||
} | ||
public record UpdateStatus(bool ClientUpToDate, bool BackendCompatible, bool IsReadyToInstall, Version ClientVersion); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.