+
= ({ className, disabled, onClick }) => (
)
diff --git a/wrap/src/components/WrapFeeWarningModal/index.module.css b/wrap/src/components/WrapFeeWarningModal/index.module.css
index ffc18ba5..9be85e32 100644
--- a/wrap/src/components/WrapFeeWarningModal/index.module.css
+++ b/wrap/src/components/WrapFeeWarningModal/index.module.css
@@ -1,83 +1,4 @@
-.wrapFeeWarningModalContent {
- display: flex;
- flex-direction: column;
-
- h4 {
- color: var(--gray-wrap-extra-dark);
- }
-
- p {
- color: var(--gray-wrap-extra-dark);
-
- &:first-of-type {
- margin-bottom: 1rem;
- }
-
- &:last-of-type {
- margin-bottom: 3.125rem;
- }
- }
-}
-
-.wrapFeeWarningModalLogo {
- align-self: center;
- margin-bottom: 3.125rem;
-}
-
.wrapFeeWarningModalInput {
width: 75%;
margin: 0 auto;
}
-
-.wrapFeeWarningModalActions {
- display: flex;
- flex-direction: column;
- gap: 2.125rem;
- margin: 2.5rem auto;
- text-align: center;
-}
-
-.wrapFeeWarningModalButton {
- min-width: 250px;
-}
-
-.wrapFeeWarningModalButtonText {
- font-size: 13px;
-}
-
-.wrapFeeWarningModalFullAmount {
- background: none;
- border: none;
- padding: 0;
- font: inherit;
- outline: inherit;
- color: var(--danger);
- text-decoration: underline;
- cursor: pointer;
-}
-
-@media screen and (max-width: 1000px) {
- .wrapFeeWarningModalContent {
- p {
- &:last-of-type {
- margin-bottom: 2.625rem;
- }
- }
- }
-
- .wrapFeeWarningModalLogo {
- margin-bottom: 2rem;
- }
-
- .wrapFeeWarningModalInput {
- width: 100%;
- }
-
- .wrapFeeWarningModalActions {
- display: flex;
- flex-direction: column;
- gap: 1.625rem;
- margin: 1.25rem auto;
- text-align: center;
- }
-}
diff --git a/wrap/src/components/WrapFeeWarningModal/index.tsx b/wrap/src/components/WrapFeeWarningModal/index.tsx
index ab9ef94d..6fceb369 100644
--- a/wrap/src/components/WrapFeeWarningModal/index.tsx
+++ b/wrap/src/components/WrapFeeWarningModal/index.tsx
@@ -1,11 +1,18 @@
import { FC } from 'react'
+import { Logo } from '@oasisprotocol/rose-app-ui'
import {
- WrapModal,
- WrapModalProps,
- LogoIconRound,
- WrapInput,
- WrapButton,
-} from '@oasisprotocol/rose-app-ui/wrap'
+ Button,
+ cn,
+ Dialog,
+ DialogClose,
+ DialogContent,
+ DialogDescription,
+ DialogFooter,
+ DialogHeader,
+ DialogTitle,
+ Input,
+ Label,
+} from '@oasisprotocol/ui-library/src'
import classes from './index.module.css'
import { useWrapForm } from '../../hooks/useWrapForm'
import { WRAP_FEE_DEDUCTION_MULTIPLIER } from '../../constants/config'
@@ -13,7 +20,9 @@ import { NumberUtils } from '../../utils/number.utils'
import BigNumber from 'bignumber.js'
import { formatEther } from 'viem'
-interface WrapFeeWarningModalProps extends Pick {
+interface WrapFeeWarningModalProps {
+ isOpen: boolean
+ closeModal: () => void
next: (amount: BigNumber) => void
}
@@ -27,47 +36,56 @@ export const WrapFeeWarningModal: FC = ({ isOpen, clos
const estimatedAmountWithDeductedFees = roseAmount!.minus(estimatedFeeDeduction)
return (
-
-
-
-
-
+
-
+
+
+
+
+
+
)
}
diff --git a/wrap/src/components/WrapForm/index.tsx b/wrap/src/components/WrapForm/index.tsx
index 2375dce6..43a1b0ef 100644
--- a/wrap/src/components/WrapForm/index.tsx
+++ b/wrap/src/components/WrapForm/index.tsx
@@ -1,5 +1,6 @@
-import { FC, FormEvent, MouseEvent, useEffect, useRef, useState } from 'react'
-import { WrapInput, WrapButton, WrapAlert, WrapToggleButton } from '@oasisprotocol/rose-app-ui/wrap'
+import { ChangeEvent, FC, FormEvent, MouseEvent, useEffect, useRef, useState } from 'react'
+import { Button, Alert, cn } from '@oasisprotocol/ui-library/src'
+import { Input, Label } from '@oasisprotocol/ui-library/src'
import classes from './index.module.css'
import { useNavigate } from 'react-router-dom'
import { useWrapForm } from '../../hooks/useWrapForm'
@@ -9,6 +10,7 @@ import { NumberUtils } from '../../utils/number.utils'
import { WrapFeeWarningModal } from '../WrapFeeWarningModal'
import { formatEther, parseEther } from 'viem'
import BigNumber from 'bignumber.js'
+import { ToggleButton } from '../ToggleButton'
const AMOUNT_PATTERN = '^[0-9]*[.,]?[0-9]*$'
@@ -62,8 +64,8 @@ export const WrapForm: FC = () => {
setValue(formattedAmount)
}, [setValue, amount])
- const handleValueChange = (amount: string) => {
- setValue(amount)
+ const handleValueChange = (event: ChangeEvent) => {
+ setValue(event.target.value)
}
const handleToggleFormType = (e: MouseEvent) => {
@@ -99,12 +101,12 @@ export const WrapForm: FC = () => {
) {
setIsWrapFeeModalOpen(true)
} else {
- submitTransaction(amount)
+ void submitTransaction(amount)
}
}
const submitWrapFeeModal = (amount: BigNumber) => {
- submitTransaction(amount)
+ void submitTransaction(amount)
setIsWrapFeeModalOpen(false)
}
@@ -115,39 +117,41 @@ export const WrapForm: FC = () => {
{
return (
diff --git a/wrap/src/pages/Transaction/index.tsx b/wrap/src/pages/Transaction/index.tsx
index fe7215f2..0ac5e2b0 100644
--- a/wrap/src/pages/Transaction/index.tsx
+++ b/wrap/src/pages/Transaction/index.tsx
@@ -1,5 +1,7 @@
import { FC, useEffect, useState } from 'react'
-import { WrapButton, OpenInNewIcon, Spinner } from '@oasisprotocol/rose-app-ui/wrap'
+import { ExternalLink } from 'lucide-react'
+import { Spinner } from '@oasisprotocol/rose-app-ui'
+import { Button } from '@oasisprotocol/ui-library/src'
import { useNavigate, useParams, useSearchParams } from 'react-router-dom'
import classes from './index.module.css'
import { StringUtils } from '../../utils/string.utils'
@@ -89,15 +91,15 @@ const TransactionCmp: FC = () => {
{txUrl && (
-
+
+
+
)}
-
+
+
)}
{status === TransactionStatus.Fail && (
@@ -109,9 +111,9 @@ const TransactionCmp: FC = () => {
Please try again.
-
+
+
)}
>
diff --git a/wrap/src/pages/Wrapper/index.tsx b/wrap/src/pages/Wrapper/index.tsx
index c5f2ce79..2048b7d7 100644
--- a/wrap/src/pages/Wrapper/index.tsx
+++ b/wrap/src/pages/Wrapper/index.tsx
@@ -1,6 +1,6 @@
import { FC, useEffect } from 'react'
import classes from './index.module.css'
-import { WrapButton } from '@oasisprotocol/rose-app-ui/wrap'
+import { Button } from '@oasisprotocol/ui-library/src'
import { NumberUtils } from '../../utils/number.utils'
import { WrapForm } from '../../components/WrapForm'
import { useWeb3 } from '../../hooks/useWeb3'
@@ -69,21 +69,21 @@ const WrapperCmp: FC = () => {
Quickly wrap your ROSE into wROSE and vice versa with the (un)wrap ROSE tool.
-
+
+
{percentageList.map(({ label, value }) => (
- handlePercentageCalc(value)}
key={label}
- variant="tertiary"
+ variant="outline"
>
{label}
-
+
))}