-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
display correct denomination token on redemption intro
- Loading branch information
Showing
2 changed files
with
22 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,16 @@ | ||
<script lang="ts"> | ||
import { wizard } from 'wizard/store'; | ||
export let data; | ||
const { denominationToken } = data; | ||
wizard.toggleComplete('introduction'); | ||
</script> | ||
|
||
<div class="deposit-introduction"> | ||
<p> | ||
Ready to redeem shares of <strong>{$wizard.data.strategyName}</strong>? Upon redemption, you'll receive USDC.e and | ||
any tokens the strategy is currently invested in. Connect your wallet, review your share balance, enter your desired | ||
redemption amount, and complete your transaction. Let's get started! | ||
Ready to redeem shares of <strong>{$wizard.data.strategyName}</strong>? Upon redemption, you'll receive | ||
<strong>{denominationToken.label}</strong> and any tokens the strategy is currently invested in. Connect your wallet, | ||
review your share balance, enter your desired redemption amount, and complete your transaction. Let's get started! | ||
</p> | ||
</div> |
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,16 @@ | ||
import type { EnzymeSmartContracts } from 'trade-executor/strategy/summary'; | ||
import { type ConfiguredChainId, config } from '$lib/wallet'; | ||
import { get } from 'svelte/store'; | ||
import { wizard } from 'wizard/store'; | ||
import { getAccount } from '@wagmi/core'; | ||
import { getDenominationToken } from '$lib/eth-defi/helpers'; | ||
|
||
export async function load() { | ||
const { address } = getAccount(config) as { address: Address }; | ||
const { chainId, contracts } = get(wizard).data! as { chainId: ConfiguredChainId; contracts: EnzymeSmartContracts }; | ||
const comptroller = contracts.comptroller!; | ||
|
||
return { | ||
denominationToken: await getDenominationToken(config, { address, comptroller, chainId }) | ||
}; | ||
} |