File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,27 +2,29 @@ import { TransactionResponse } from '@ethersproject/abstract-provider'
22import { getLockupContract } from './common'
33import { Provider } from '@ethersproject/abstract-provider'
44import { FallbackableOverrides } from '../../common/utils/execute'
5+ import { Wallet } from 'ethers'
6+
57
68export type Options = {
7- readonly provider : Provider
9+ readonly wallet : Wallet
810 readonly propertyAddress : string
911 readonly amount : string
1012 readonly overrides ?: FallbackableOverrides
1113}
1214
1315type PositionsCreate = (
1416 options : Options
15- ) => Promise < TransactionResponse | Error >
17+ ) => Promise < TransactionResponse | undefined >
1618
1719export const positionsCreate : PositionsCreate = async (
1820 options : Options
19- ) : Promise < TransactionResponse | Error > => {
20- const lockupContract = await getLockupContract ( options . provider )
21+ ) : Promise < TransactionResponse | undefined > => {
22+ const lockupContract = await getLockupContract ( options . wallet )
2123
2224 return lockupContract
2325 ? await lockupContract . depositToProperty (
2426 options . propertyAddress ,
2527 options . amount
2628 )
27- : new Error ( 'network is not valid' )
29+ : undefined
2830}
You can’t perform that action at this time.
0 commit comments