-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove type guards for versions that are subsets of others
- Loading branch information
Hjort
committed
May 11, 2022
1 parent
29282da
commit ff63158
Showing
4 changed files
with
11 additions
and
17 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,5 @@ | ||
import { RewardStatus, RewardStatusV0, RewardStatusV1 } from './types'; | ||
import { RewardStatus, RewardStatusV1 } from './types'; | ||
|
||
export function isRewardStatusV1(rs: RewardStatus): rs is RewardStatusV1 { | ||
return rs.protocolVersion !== undefined && rs.protocolVersion > 3n; | ||
} | ||
|
||
export function isRewardStatusV0(rs: RewardStatus): rs is RewardStatusV0 { | ||
return rs.protocolVersion === undefined || rs.protocolVersion <= 3n; | ||
} |
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 |
---|---|---|
|
@@ -2120,6 +2120,11 @@ [email protected]: | |
resolved "https://registry.yarnpkg.com/google-protobuf/-/google-protobuf-3.15.8.tgz#5f3948905e4951c867d6bc143f385a80e2a39efe" | ||
integrity sha512-2jtfdqTaSxk0cuBJBtTTWsot4WtR9RVr2rXg7x7OoqiuOKopPrwXpM1G4dXIkLcUNRh3RKzz76C8IOkksZSeOw== | ||
|
||
google-protobuf@^3.20.1: | ||
version "3.20.1" | ||
resolved "https://registry.yarnpkg.com/google-protobuf/-/google-protobuf-3.20.1.tgz#1b255c2b59bcda7c399df46c65206aa3c7a0ce8b" | ||
integrity sha512-XMf1+O32FjYIV3CYu6Tuh5PNbfNEU5Xu22X+Xkdb/DUexFlCzhvv7d5Iirm4AOwn8lv4al1YvIhzGrg2j9Zfzw== | ||
|
||
graceful-fs@^4.2.4: | ||
version "4.2.8" | ||
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.8.tgz#e412b8d33f5e006593cbd3cee6df9f2cebbe802a" | ||
|