-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from spectrum-finance/dev-989-farm-model
feat: add farm events
- Loading branch information
Showing
3 changed files
with
36 additions
and
21 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,18 @@ | ||
import { ErrorProps } from '../generalProps'; | ||
import { FarmsProps } from './props'; | ||
import { FarmProps, StakeProps } from './props'; | ||
|
||
export type FarmsEvents = { | ||
'Farms Click Add Liquidity': FarmsProps; | ||
'Farms Click Stake': FarmsProps; | ||
'Farms Confirm Stake': FarmsProps; | ||
'Farms Confirm Stake Error': FarmsProps & ErrorProps; | ||
'Farms Cancel Stake Sign': FarmsProps; | ||
'Farms Sign Stake Success': FarmsProps; | ||
export type FarmEvents = { | ||
'Farm Click Add Liquidity': FarmProps; | ||
'Farm Stake Submit': FarmProps & StakeProps; | ||
'Farm Stake Confirm Modal': FarmProps & StakeProps; | ||
'Farm Stake Confirm Modal Error': FarmProps & StakeProps & ErrorProps; | ||
'Farm Stake Sign Success': FarmProps & StakeProps; | ||
'Farm Stake Sign Error': FarmProps & StakeProps & ErrorProps; | ||
'Farm Stake Cancel Sign': FarmProps & StakeProps; | ||
'Farm Click Manage Add Liquidity': FarmProps; | ||
'Farm Click Manage Unstake': FarmProps; | ||
'Farm Unstake Confirm Modal': FarmProps & StakeProps; | ||
'Farm Unstake Confirm Modal Error': FarmProps & StakeProps & ErrorProps; | ||
'Farm Unstake Sign Success': FarmProps & StakeProps; | ||
'Farm Unstake Sign Error': FarmProps & StakeProps & ErrorProps; | ||
}; |
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 |
---|---|---|
@@ -1,14 +1,23 @@ | ||
export type FarmsProps = { | ||
import { AmmPoolProps } from '../generalProps'; | ||
|
||
export type FarmProps = { | ||
farm_id: string; | ||
pool_id: string; | ||
pool_name: string; | ||
x_name: string; | ||
y_name: string; | ||
}; | ||
farm_status: string; | ||
farm_name: string; | ||
farm_x_name: string; | ||
farm_y_name: string; | ||
farm_total_staked_x: number; | ||
farm_total_staked_y: number; | ||
farm_total_staked_usd: number; | ||
farm_apr: number; | ||
|
||
farm_user_staked_x: number; | ||
farm_user_staked_y: number; | ||
farm_user_available_x: number; | ||
farm_user_available_y: number; | ||
} & AmmPoolProps; | ||
|
||
export type ExtendedFarmsProps = { | ||
x_amount: number; | ||
y_amount: number; | ||
lp_amount: number; | ||
lp_usd: number; | ||
} & FarmsProps; | ||
export type StakeProps = { | ||
stake_x_amount: number; | ||
stake_y_amount: number; | ||
} & FarmProps; |