Skip to content

Commit

Permalink
[for-new-stake] change logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Cast0001 committed Sep 17, 2024
1 parent c6d440d commit 862891a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion codegen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import configs from './src/utils/configs'


// For every network we have same gql shema, so we can use just Mainnet here
const urls = configs[Network.Holesky].api
const urls = configs[Network.Gnosis].api

// https://the-guild.dev/graphql/codegen/plugins/typescript/typescript
const typesConfig = {
Expand Down
4 changes: 2 additions & 2 deletions src/methods/osToken/index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// Requests
import getAPY from './requests/getOsTokenAPY'
import getRate from './requests/getOsTokenRate'
import getMaxMint from './requests/getMaxMint'
import getRate from './requests/getOsTokenRate'
import getPosition from './requests/getPosition'
import getConfig from './requests/getOsTokenConfig'
import getBurnAmount from './helpers/getBurnAmount'
import getPosition from './requests/getOsTokenPosition'
import getHealthFactor from './helpers/getHealthFactor'
import getSharesFromAssets from './requests/getSharesFromAssets'
import getAssetsFromShares from './requests/getAssetsFromShares'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ type GetOsTokenPositionSharesInput = {
options: StakeWise.Options
}

const getOsTokenPositionShares = (values: GetOsTokenPositionSharesInput) => {
const getShares = (values: GetOsTokenPositionSharesInput) => {
const { options, vaultAddress, userAddress } = values

return graphql.subgraph.osToken.fetchOsTokenPositionsQuery({
Expand All @@ -22,4 +22,4 @@ const getOsTokenPositionShares = (values: GetOsTokenPositionSharesInput) => {
}


export default getOsTokenPositionShares
export default getShares
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import getShares from './getShares'
import getHealthFactor from '../../helpers/getHealthFactor'
import getOsTokenPositionShares from './getOsTokenPositionShares'
import { wrapAbortPromise } from '../../../../modules/gql-module'
import { validateArgs, OsTokenPositionHealth } from '../../../../utils'

Expand Down Expand Up @@ -32,7 +32,7 @@ const getOsTokenPosition = async (values: GetOsTokenPositionInput) => {
validateArgs.address({ vaultAddress, userAddress })
validateArgs.bigint({ stakedAssets, thresholdPercent })

const gqlMintedShares = await getOsTokenPositionShares({ options, vaultAddress, userAddress })
const gqlMintedShares = await getShares({ options, vaultAddress, userAddress })

const vaultContract = contracts.helpers.createVault(vaultAddress)
const mintedShares = await vaultContract.osTokenPositions(userAddress)
Expand Down

0 comments on commit 862891a

Please sign in to comment.