-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
83 additions
and
3 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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
type GetAssetsFromSharesInput = { | ||
contracts: StakeWise.Contracts | ||
amount: bigint | ||
} | ||
|
||
const getAssetsFromShares = async (values: GetAssetsFromSharesInput) => { | ||
const { contracts, amount } = values | ||
|
||
const result = await contracts.tokens.mintToken.convertToAssets(amount) | ||
|
||
return result || 0n | ||
} | ||
|
||
|
||
export default getAssetsFromShares |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
type GetSharesFromAssetsInput = { | ||
contracts: StakeWise.Contracts | ||
amount: bigint | ||
} | ||
|
||
const getSharesFromAssets = async (values: GetSharesFromAssetsInput) => { | ||
const { contracts, amount } = values | ||
|
||
const result = await contracts.tokens.mintToken.convertToShares(amount) | ||
|
||
return result || 0n | ||
} | ||
|
||
|
||
export default getSharesFromAssets |
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,3 +1,5 @@ | ||
export { default as getSharesFromAssets } from './getSharesFromAssets' | ||
export { default as getAssetsFromShares } from './getAssetsFromShares' | ||
export { default as getRewardsPerYear } from './getRewardsPerYear' | ||
export { default as getSwiseUsdPrice } from './getSwiseUsdPrice' | ||
export { default as getTransactions } from './getTransactions' |