diff --git a/codegen.ts b/codegen.ts index a1f113a4..64aee880 100644 --- a/codegen.ts +++ b/codegen.ts @@ -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 = { diff --git a/src/methods/osToken/index.ts b/src/methods/osToken/index.ts index 734d68a4..9ebede40 100644 --- a/src/methods/osToken/index.ts +++ b/src/methods/osToken/index.ts @@ -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' diff --git a/src/methods/osToken/requests/getOsTokenPosition/getOsTokenPositionShares.ts b/src/methods/osToken/requests/getPosition/getShares.ts similarity index 81% rename from src/methods/osToken/requests/getOsTokenPosition/getOsTokenPositionShares.ts rename to src/methods/osToken/requests/getPosition/getShares.ts index 29ba10c4..89a119c6 100644 --- a/src/methods/osToken/requests/getOsTokenPosition/getOsTokenPositionShares.ts +++ b/src/methods/osToken/requests/getPosition/getShares.ts @@ -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({ @@ -22,4 +22,4 @@ const getOsTokenPositionShares = (values: GetOsTokenPositionSharesInput) => { } -export default getOsTokenPositionShares +export default getShares diff --git a/src/methods/osToken/requests/getOsTokenPosition/index.ts b/src/methods/osToken/requests/getPosition/index.ts similarity index 90% rename from src/methods/osToken/requests/getOsTokenPosition/index.ts rename to src/methods/osToken/requests/getPosition/index.ts index 9272e80e..56a9110e 100644 --- a/src/methods/osToken/requests/getOsTokenPosition/index.ts +++ b/src/methods/osToken/requests/getPosition/index.ts @@ -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' @@ -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)