Skip to content

Commit

Permalink
fix: validate types
Browse files Browse the repository at this point in the history
  • Loading branch information
pmespresso committed Apr 25, 2021
1 parent a5dfe21 commit 6604597
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 13 deletions.
2 changes: 1 addition & 1 deletion protocols/aave/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"claim": {
"isClaimed": false,
"claimer": "",
"signature": "",
"signature": ""
},
"isHybrid": false,
"hasDelegation": false,
Expand Down
4 changes: 2 additions & 2 deletions types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ export declare const ProtocolIo: t.TypeC<{
folder: t.StringC;
type: t.UnionC<[t.LiteralC<"snapshot">, t.LiteralC<"compoundish">]>;
suffix: t.StringC;
claim: t.TypeC<{
claim: t.UnionC<[t.PartialC<{
isClaimed: t.BooleanC;
claimer: t.StringC;
signature: t.StringC;
}>;
}>, t.UndefinedC]>;
coinGeckoPriceString: t.StringC;
tokenContractAddress: t.StringC;
governanceContractAddress: t.UnionC<[t.StringC, t.UndefinedC]>;
Expand Down
13 changes: 8 additions & 5 deletions types.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,14 @@ exports.ProtocolIo = t.type({
folder: t.string,
type: t.union([t.literal("snapshot"), t.literal("compoundish")]),
suffix: t.string,
claim: t.type({
isClaimed: t.boolean,
claimer: t.string,
signature: t.string,
}),
claim: t.union([
t.partial({
isClaimed: t.boolean,
claimer: t.string,
signature: t.string,
}),
t.undefined,
]),
coinGeckoPriceString: t.string,
tokenContractAddress: t.string,
governanceContractAddress: t.union([t.string, t.undefined]),
Expand Down
13 changes: 8 additions & 5 deletions types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,14 @@ export const ProtocolIo = t.type({
folder: t.string,
type: t.union([t.literal("snapshot"), t.literal("compoundish")]),
suffix: t.string,
claim: t.type({
isClaimed: t.boolean,
claimer: t.string,
signature: t.string,
}),
claim: t.union([
t.partial({
isClaimed: t.boolean,
claimer: t.string,
signature: t.string,
}),
t.undefined,
]),
coinGeckoPriceString: t.string,
tokenContractAddress: t.string,
governanceContractAddress: t.union([t.string, t.undefined]),
Expand Down

0 comments on commit 6604597

Please sign in to comment.