File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,14 +8,14 @@ export type Options = {
88
99type CalculateRewardAmount = (
1010 options : Options
11- ) => Promise < readonly [ string , string ] | Error >
11+ ) => Promise < readonly [ string , string ] | undefined >
1212
1313export const calculateRewardAmount : CalculateRewardAmount = async (
1414 options : Options
15- ) : Promise < readonly [ string , string ] | Error > => {
15+ ) : Promise < readonly [ string , string ] | undefined > => {
1616 const lockupContract = await getLockupContract ( options . provider )
1717
1818 return lockupContract
1919 ? await lockupContract . calculateRewardAmount ( options . propertyAddress )
20- : new Error ( 'network is not valid' )
20+ : undefined
2121}
Original file line number Diff line number Diff line change @@ -5,14 +5,14 @@ type Options = {
55 readonly provider : Provider
66}
77
8- type GetCap = ( Options : Options ) => Promise < string | Error >
8+ type GetCap = ( Options : Options ) => Promise < string | undefined >
99
1010export const getCap : GetCap = async (
1111 options : Options
12- ) : Promise < string | Error > => {
12+ ) : Promise < string | undefined > => {
1313 const lockupContract = await getLockupContract ( options . provider )
1414
1515 return lockupContract
1616 ? await lockupContract . cap ( )
17- : new Error ( 'network is not valid' )
17+ : undefined
1818}
You can’t perform that action at this time.
0 commit comments