-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(billing): move duplicated code to a component
refs #628
- Loading branch information
Showing
3 changed files
with
26 additions
and
26 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
22 changes: 22 additions & 0 deletions
22
apps/deploy-web/src/components/sdl/DeploymentMinimumEscrowAlertText.tsx
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,22 @@ | ||
import { FC, useState } from "react"; | ||
|
||
import { useChainParam } from "@src/context/ChainParamProvider"; | ||
import { useWallet } from "@src/context/WalletProvider"; | ||
import { useDenomData } from "@src/hooks/useWalletBalance"; | ||
|
||
export const DeploymentMinimumEscrowAlertText: FC = () => { | ||
const { isManaged } = useWallet(); | ||
const [sdlDenom] = useState("uakt"); | ||
const depositData = useDenomData(sdlDenom); | ||
const { minDeposit } = useChainParam(); | ||
|
||
return isManaged ? ( | ||
<> | ||
To create a deployment, you need to have at least <b>${depositData?.min}</b> in an escrow account.{" "} | ||
</> | ||
) : ( | ||
<> | ||
To create a deployment, you need to have at least <b>{minDeposit.akt} AKT</b> or <b>{minDeposit.usdc} USDC</b> in an escrow account.{" "} | ||
</> | ||
); | ||
}; |
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