This repository was archived by the owner on Jun 24, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added V_COW Token objects (only rinkeby for now) * Added GNO Token objects (will be used later) * Modded initial set of claim hooks * Restored and commented out original claim hooks on mod file * Added utils for checking what type of user claims are Not yet in use, will be useful later * Temporary hardcoded address for loading the claims in the UI * Removed unecessary `@src` import * Using the chain id enum rather than magic numbers Co-authored-by: Leandro Boscariol <[email protected]>
- Loading branch information
1 parent
b1628bb
commit 52b416f
Showing
5 changed files
with
175 additions
and
34 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 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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { FREE_CLAIM_TYPES, PAID_CLAIM_TYPES, UserClaims } from 'state/claim/hooks/index' | ||
|
||
/** | ||
* Helper function to check whether any claim is an investment option | ||
* | ||
* @param claims | ||
*/ | ||
export function hasPaidClaim(claims: UserClaims | null): boolean { | ||
return claims?.some((claim) => claim.type in PAID_CLAIM_TYPES) || false | ||
} | ||
|
||
/** | ||
* Helper function to check whether any claim is an airdrop option | ||
* | ||
* @param claims | ||
*/ | ||
export function hasFreeClaim(claims: UserClaims | null): boolean { | ||
return claims?.some((claim) => claim.type in FREE_CLAIM_TYPES) || false | ||
} |