Skip to content

Commit 2661cc0

Browse files
committed
replace return value
1 parent d82769e commit 2661cc0

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

lib/agent/lockup/calculateRewardAmount.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ export type Options = {
88

99
type CalculateRewardAmount = (
1010
options: Options
11-
) => Promise<readonly [string, string] | Error>
11+
) => Promise<readonly [string, string] | undefined>
1212

1313
export 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
}

lib/agent/lockup/cap.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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

1010
export 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
}

0 commit comments

Comments
 (0)