diff --git a/README.md b/README.md
index 0e714b59..3b616baf 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
-# DLC.Link - dlcBTC Bridge
+# DLC.Link - iBTC Bridge
-**dlcBTC Website** is an interface for interacting with DLC.Link smart contracts and the Bitcoin blockchain. This platform provides a secure and efficient self-custodial way to lock Bitcoin as collateral and mint dlcBTC tokens based on the amount of Bitcoin locked.
+**iBTC Website** is an interface for interacting with DLC.Link smart contracts and the Bitcoin blockchain. This platform provides a secure and efficient self-custodial way to lock Bitcoin as collateral and mint iBTC tokens based on the amount of Bitcoin locked.
## Installation
diff --git a/config.devnet.json b/config.devnet.json
index da279717..bf038547 100644
--- a/config.devnet.json
+++ b/config.devnet.json
@@ -21,7 +21,7 @@
{
"name": "DLC.Link",
"addresses": ["0x0DD4f29E21F10cb2E485cf9bDAb9F2dD1f240Bfa"],
- "logo": "/images/logos/dlcBTC-logotype.svg"
+ "logo": "/images/logos/ibtc-logotype.svg"
},
{
"name": "Smart Bitcoin Labs",
diff --git a/config.localhost.json b/config.localhost.json
index 246b27a2..8be2a06c 100644
--- a/config.localhost.json
+++ b/config.localhost.json
@@ -17,7 +17,7 @@
{
"name": "DLC.Link",
"addresses": ["0x0DD4f29E21F10cb2E485cf9bDAb9F2dD1f240Bfa"],
- "logo": "/images/logos/dlcBTC-logotype.svg"
+ "logo": "/images/logos/ibtc-logotype.svg"
}
],
"protocols": [
diff --git a/config.mainnet.json b/config.mainnet.json
index a545d9ed..ecb72180 100644
--- a/config.mainnet.json
+++ b/config.mainnet.json
@@ -2,12 +2,15 @@
"appEnvironment": "mainnet",
"coordinatorURL": "https://mainnet.dlc.link/attestor-1",
"enabledEthereumNetworkIDs": ["42161", "8453"],
+ "enabledRippleNetworkIDs": ["0"],
"bitcoinNetwork": "mainnet",
"bitcoinNetworkIndex": 0,
"bitcoinNetworkPreFix": "bc1",
- "bitcoinBlockchainURL": "https://mainnet.dlc.link/electrs",
+ "bitcoinBlockchainURL": "https://blockstream.info/api",
"bitcoinBlockchainExplorerURL": "https://mempool.space",
"bitcoinBlockchainFeeEstimateURL": "https://mempool.space/api/v1/fees/recommended",
+ "rippleIssuerAddress": "rGcyRGrZPaJAZbZDi4NqRFLA5GQH63iFpD",
+ "xrplWebsocket": "wss://xrpl.ws/",
"ledgerApp": "Bitcoin",
"merchants": [
{
@@ -22,7 +25,7 @@
{
"name": "DLC.Link",
"addresses": ["0x0DD4f29E21F10cb2E485cf9bDAb9F2dD1f240Bfa"],
- "logo": "/images/logos/dlcBTC-logotype.svg"
+ "logo": "/images/logos/ibtc-logotype.svg"
},
{
"name": "Smart Bitcoin Labs",
diff --git a/config.testnet.json b/config.testnet.json
index 56e8a5b8..ca683538 100644
--- a/config.testnet.json
+++ b/config.testnet.json
@@ -6,7 +6,7 @@
"bitcoinNetwork": "testnet",
"bitcoinNetworkIndex": 1,
"bitcoinNetworkPreFix": "tb1",
- "bitcoinBlockchainURL": "https://testnet.dlc.link/electrs",
+ "bitcoinBlockchainURL": "https://blockstream.info/testnet/api",
"bitcoinBlockchainExplorerURL": "https://mempool.space/testnet",
"bitcoinBlockchainFeeEstimateURL": "https://mempool.space/testnet/api/v1/fees/recommended",
"rippleIssuerAddress": "ra3oyRVfy4yD4NJPrVcewvDtisZ3FhkcYL",
@@ -23,7 +23,7 @@
{
"name": "DLC.Link",
"addresses": ["0x0DD4f29E21F10cb2E485cf9bDAb9F2dD1f240Bfa"],
- "logo": "/images/logos/dlcBTC-logotype.svg"
+ "logo": "/images/logos/ibtc-logotype.svg"
},
{
"name": "Smart Bitcoin Labs",
diff --git a/index.html b/index.html
index 6e7b70f6..3054b1df 100644
--- a/index.html
+++ b/index.html
@@ -9,7 +9,7 @@
-
DLC.Link dlcBTC Website
+ DLC.Link iBTC Website
diff --git a/public/images/logos/dlc-btc-logo.svg b/public/images/logos/ibtc-logo.svg
similarity index 100%
rename from public/images/logos/dlc-btc-logo.svg
rename to public/images/logos/ibtc-logo.svg
diff --git a/public/images/logos/dlcBTC-logotype.svg b/public/images/logos/ibtc-logotype.svg
similarity index 100%
rename from public/images/logos/dlcBTC-logotype.svg
rename to public/images/logos/ibtc-logotype.svg
diff --git a/src/app/components/account/components/account-menu.tsx b/src/app/components/account/components/account-menu.tsx
index 553f7cdb..f2690cf4 100644
--- a/src/app/components/account/components/account-menu.tsx
+++ b/src/app/components/account/components/account-menu.tsx
@@ -9,6 +9,7 @@ import {
Text,
useBreakpointValue,
} from '@chakra-ui/react';
+import { useAddToken } from '@hooks/use-add-token';
import { XRPWallet } from '@models/wallet';
import { truncateAddress } from 'dlc-btc-lib/utilities';
import { Connector } from 'wagmi';
@@ -24,6 +25,8 @@ export function AccountMenu({
wallet,
handleDisconnectWallet,
}: AccountMenuProps): React.JSX.Element | false {
+ const addToken = useAddToken();
+
const isMobile = useBreakpointValue({ base: true, md: false });
if (!address) return false;
@@ -52,6 +55,7 @@ export function AccountMenu({
+
diff --git a/src/app/components/attestor-details/attestor-details-select.tsx b/src/app/components/attestor-details/attestor-details-select.tsx
index a2af4cb5..7b6bb280 100644
--- a/src/app/components/attestor-details/attestor-details-select.tsx
+++ b/src/app/components/attestor-details/attestor-details-select.tsx
@@ -82,7 +82,7 @@ export function AttestorDetailsSelect(): React.JSX.Element {
>
diff --git a/src/app/components/attestor-details/attestor-details.tsx b/src/app/components/attestor-details/attestor-details.tsx
index bd9d6b8a..b86096c5 100644
--- a/src/app/components/attestor-details/attestor-details.tsx
+++ b/src/app/components/attestor-details/attestor-details.tsx
@@ -20,7 +20,7 @@ export function AttestorDetails(): React.JSX.Element {
return (
- dlcBTC Attestor Details
+ iBTC Attestor Details
diff --git a/src/app/components/attestor-details/components/attestor-details-card/attestor-details-rate-card.tsx b/src/app/components/attestor-details/components/attestor-details-card/attestor-details-rate-card.tsx
index 101b9769..f9bfeb5b 100644
--- a/src/app/components/attestor-details/components/attestor-details-card/attestor-details-rate-card.tsx
+++ b/src/app/components/attestor-details/components/attestor-details-card/attestor-details-rate-card.tsx
@@ -1,5 +1,5 @@
import { Divider, HStack, Image, Spacer, Text, VStack } from '@chakra-ui/react';
-import { dlcBTC } from '@models/token';
+import { iBTC } from '@models/token';
interface AttestorDetailsRateCardProps {
width: string;
@@ -16,9 +16,9 @@ export function AttestorDetailsRateCard({
Nakamoto Coefficient
-
+
- dlcBTC
+ iBTC
diff --git a/src/app/components/attestor-details/components/attestor-details-table/components/attestor-details-table-item.tsx b/src/app/components/attestor-details/components/attestor-details-table/components/attestor-details-table-item.tsx
index 5e2b3f0c..24b7a85a 100644
--- a/src/app/components/attestor-details/components/attestor-details-table/components/attestor-details-table-item.tsx
+++ b/src/app/components/attestor-details/components/attestor-details-table/components/attestor-details-table-item.tsx
@@ -38,7 +38,7 @@ export function AttestorDetailsTableItem(
justifyContent={'space-between'}
>
-
+
-
+
{hash}
diff --git a/src/app/components/company-website-button/company-website-button.tsx b/src/app/components/company-website-button/company-website-button.tsx
index def33795..1f4a75b5 100644
--- a/src/app/components/company-website-button/company-website-button.tsx
+++ b/src/app/components/company-website-button/company-website-button.tsx
@@ -5,8 +5,8 @@ import { Button, Image, useBreakpointValue } from '@chakra-ui/react';
export function CompanyWebsiteButton(): React.JSX.Element {
const navigate = useNavigate();
- const logoPath = './images/logos/dlc-btc-logo.svg';
- const altText = 'dlcBTC Logo';
+ const logoPath = './images/logos/ibtc-logo.svg';
+ const altText = 'iBTC Logo';
const isMobile = useBreakpointValue({ base: true, md: false });
return (
diff --git a/src/app/components/header/components/tabs.tsx b/src/app/components/header/components/tabs.tsx
index 09739fa6..8e7ab180 100644
--- a/src/app/components/header/components/tabs.tsx
+++ b/src/app/components/header/components/tabs.tsx
@@ -34,7 +34,7 @@ export function NavigationTabs({
{isActiveTabs && (
<>
handleTabClick('/mint-withdraw')}
/>
diff --git a/src/app/components/how-it-works/bottom/components/how-to-mint.tsx b/src/app/components/how-it-works/bottom/components/how-to-mint.tsx
index b5b56e0c..d49b4209 100644
--- a/src/app/components/how-it-works/bottom/components/how-to-mint.tsx
+++ b/src/app/components/how-it-works/bottom/components/how-to-mint.tsx
@@ -16,7 +16,7 @@ export function HowToMint(): React.JSX.Element {
{
<>
- How to Mint dlcBTC
+ How to Mint iBTC
Ethereum Wallet.{' '}
- You will receive your deposit token dlcBTC to the same address.
+ You will receive your deposit token iBTC to the same address.
}
hasBadge={false}
@@ -49,18 +49,18 @@ export function HowToMint(): React.JSX.Element {
/>
Wait for Bitcoin to get locked on chain{' '}
(~1 hour).{' '}
- After confirmation dlcBTC tokens will automatically appear in your{' '}
+ After confirmation iBTC tokens will automatically appear in your{' '}
Ethereum Wallet.{' '}
{' '}
- You can use dlcBTC in big{' '}
+ You can use iBTC in big{' '}
supported DeFi protocols
{' '}
@@ -83,7 +83,7 @@ export function HowToMint(): React.JSX.Element {
}}
variant={'account'}
>
- Mint dlcBTC
+ Mint iBTC
>
}
diff --git a/src/app/components/how-it-works/bottom/components/how-to-unmint.tsx b/src/app/components/how-it-works/bottom/components/how-to-unmint.tsx
index 28c802ba..607bcf52 100644
--- a/src/app/components/how-it-works/bottom/components/how-to-unmint.tsx
+++ b/src/app/components/how-it-works/bottom/components/how-to-unmint.tsx
@@ -15,15 +15,15 @@ export function HowToUnmint(): React.JSX.Element {
{
<>
- How to Unmint dlcBTC
+ How to withdraw BTC
- Select the vault you would like to unmint. After a successful unmint you will
+ Select the vault you would like to redeem from. After a successful withdraw you will
receive BTC in the same amount back to your wallet.
}
@@ -39,7 +39,7 @@ export function HowToUnmint(): React.JSX.Element {
}}
variant={'account'}
>
- Unmint dlcBTC
+ Unmint iBTC
>
}
diff --git a/src/app/components/how-it-works/middle/middle-section.tsx b/src/app/components/how-it-works/middle/middle-section.tsx
index fa022f99..458e4c67 100644
--- a/src/app/components/how-it-works/middle/middle-section.tsx
+++ b/src/app/components/how-it-works/middle/middle-section.tsx
@@ -17,11 +17,11 @@ export function MiddleSection(): React.JSX.Element {
>
}
content={
- dlcBTC is a{' '}
+ iBTC is a{' '}
non-custodial
{' '}
diff --git a/src/app/components/how-it-works/top/top-section.tsx b/src/app/components/how-it-works/top/top-section.tsx
index 1f15b55f..22b6fdb8 100644
--- a/src/app/components/how-it-works/top/top-section.tsx
+++ b/src/app/components/how-it-works/top/top-section.tsx
@@ -16,10 +16,10 @@ export function TopSection(): React.JSX.Element {
- dlcBTC
+ iBTC
- dlcBTC lets you use your Bitcoin on different DeFi platforms, all without giving up
+ iBTC lets you use your Bitcoin on different DeFi platforms, all without giving up
control of your actual Bitcoin.
diff --git a/src/app/components/mint-unmint/components/landing-page/components/welcome-stack.tsx b/src/app/components/mint-unmint/components/landing-page/components/welcome-stack.tsx
index 655424d2..9ffc16cb 100644
--- a/src/app/components/mint-unmint/components/landing-page/components/welcome-stack.tsx
+++ b/src/app/components/mint-unmint/components/landing-page/components/welcome-stack.tsx
@@ -8,7 +8,7 @@ export function WelcomeStack(): React.JSX.Element {
// const navigate = useNavigate();
const dispatch = useDispatch();
- const setupText = 'Ready to\n mint dlcBTC?';
+ const setupText = 'Ready to\n mint iBTC?';
function onConnectWalletClick(): void {
dispatch(modalActions.toggleSelectWalletModalVisibility());
diff --git a/src/app/components/mint-unmint/components/progress-timeline/progress-timeline.tsx b/src/app/components/mint-unmint/components/progress-timeline/progress-timeline.tsx
index 3668ee82..75df337f 100644
--- a/src/app/components/mint-unmint/components/progress-timeline/progress-timeline.tsx
+++ b/src/app/components/mint-unmint/components/progress-timeline/progress-timeline.tsx
@@ -21,7 +21,7 @@ export function ProgressTimeline({
-
+
@@ -49,7 +49,7 @@ export function ProgressTimeline({
stepIndex={3}
width={'12.5%'}
isLastStep
- title="Mint dlcBTC"
+ title="Mint iBTC"
/>
diff --git a/src/app/components/mint-unmint/components/setup-vault-screen/components/setup-vault-screen.vault-graphics.tsx b/src/app/components/mint-unmint/components/setup-vault-screen/components/setup-vault-screen.vault-graphics.tsx
index 8ee091b2..270e5e3d 100644
--- a/src/app/components/mint-unmint/components/setup-vault-screen/components/setup-vault-screen.vault-graphics.tsx
+++ b/src/app/components/mint-unmint/components/setup-vault-screen/components/setup-vault-screen.vault-graphics.tsx
@@ -27,7 +27,7 @@ export function SetupVaultScreenVaultGraphics(): React.JSX.Element {
right="37.5%"
/>
- BTC/dlcBTC Vault
+ BTC/iBTC Vault
diff --git a/src/app/components/mint-unmint/components/unmint/components/unmint-vault-selector.tsx b/src/app/components/mint-unmint/components/unmint/components/unmint-vault-selector.tsx
index 154740fe..445ffe6a 100644
--- a/src/app/components/mint-unmint/components/unmint/components/unmint-vault-selector.tsx
+++ b/src/app/components/mint-unmint/components/unmint/components/unmint-vault-selector.tsx
@@ -6,6 +6,7 @@ import { VaultsListGroupContainer } from '@components/vaults-list/components/vau
import { VaultsList } from '@components/vaults-list/vaults-list';
import { VaultContext } from '@providers/vault-context-provider';
import { RootState } from '@store/index';
+import { VaultState } from 'dlc-btc-lib/models';
import { BurnTokenTransactionForm } from '../../burn-transaction-screen/burn-transaction-screen';
@@ -43,7 +44,12 @@ export function UnmintVaultSelector({
Select vault to withdraw Bitcoin:
-
+
)}
diff --git a/src/app/components/mint-unmint/components/walkthrough/walkthrough.tsx b/src/app/components/mint-unmint/components/walkthrough/walkthrough.tsx
index 2d2bf3a9..490aa7d8 100644
--- a/src/app/components/mint-unmint/components/walkthrough/walkthrough.tsx
+++ b/src/app/components/mint-unmint/components/walkthrough/walkthrough.tsx
@@ -65,7 +65,7 @@ export function Walkthrough({
Enter the Bitcoin amount you wish to deposit into the vault, then verify the
transaction through your Bitcoin Wallet which will lock your Bitcoin on-chain. You
- will receive equivalent amount of dlcBTC.
+ will receive equivalent amount of iBTC.
);
@@ -74,17 +74,17 @@ export function Walkthrough({
- Wait for Bitcoin to get locked on chain (~1 hour). After 6 confirmations, dlcBTC
+ Wait for Bitcoin to get locked on chain (~1 hour). After 6 confirmations, iBTC
tokens will appear in your Wallet.
{networkType === NetworkType.EVM && (
<>
- To ensure your dlcBTC tokens
+ To ensure your iBTC tokens
are visible
simply add them
to your Ethereum Wallet.
@@ -92,11 +92,7 @@ export function Walkthrough({
@@ -109,7 +105,7 @@ export function Walkthrough({
@@ -122,18 +118,18 @@ export function Walkthrough({
{networkType === NetworkType.EVM ? (
- Select the dlcBTC vault you would like to withdraw from. Burn the desired amount
- of dlcBTC to receive the equivalent amount of BTC.
+ Select the iBTC vault you would like to withdraw from. Burn the desired amount of
+ iBTC to receive the equivalent amount of BTC.
) : (
- Select the dlcBTC vault you would like to withdraw from. Sign a check with the
- desired amount of dlcBTC to receive the equivalent amount of BTC.
+ Select the iBTC vault you would like to withdraw from. Sign a check with the
+ desired amount of iBTC to receive the equivalent amount of BTC.
)}
@@ -147,7 +143,7 @@ export function Walkthrough({
blockchain={NetworkType.BTC}
/>
- {`Once the dlcBTC has been burned, you can withdraw an `}
+ {`Once the iBTC has been burned, you can withdraw an `}
{` equivalent amount of Bitcoin `}
@@ -175,7 +171,7 @@ export function Walkthrough({
diff --git a/src/app/components/modals/successful-flow-modal/successful-flow-modal.tsx b/src/app/components/modals/successful-flow-modal/successful-flow-modal.tsx
index acc305f3..a556036e 100644
--- a/src/app/components/modals/successful-flow-modal/successful-flow-modal.tsx
+++ b/src/app/components/modals/successful-flow-modal/successful-flow-modal.tsx
@@ -15,9 +15,9 @@ interface SuccessfulFlowModalProps extends ModalComponentProps {
function getModalText(flow: 'mint' | 'burn', assetAmount?: number): string {
if (flow === 'mint') {
- return `You have successfully deposited ${assetAmount} BTC from your Bitcoin Wallet into your Vault, and minted ${assetAmount} dlcBTC to your destination address.`;
+ return `You have successfully deposited ${assetAmount} BTC from your Bitcoin Wallet into your Vault, and minted ${assetAmount} iBTC to your destination address.`;
} else {
- return `You have successfully burned ${assetAmount} dlcBTC from your destination address, and withdrawn ${assetAmount} BTC from your Vault into your Bitcoin Wallet.`;
+ return `You have successfully burned ${assetAmount} iBTC from your destination address, and withdrawn ${assetAmount} BTC from your Vault into your Bitcoin Wallet.`;
}
}
diff --git a/src/app/components/my-vaults-small/my-vaults-small.tsx b/src/app/components/my-vaults-small/my-vaults-small.tsx
index 6d1a6d1f..02db6693 100644
--- a/src/app/components/my-vaults-small/my-vaults-small.tsx
+++ b/src/app/components/my-vaults-small/my-vaults-small.tsx
@@ -4,6 +4,7 @@ import { useNavigate } from 'react-router-dom';
import { Button, Skeleton } from '@chakra-ui/react';
import { VaultsList } from '@components/vaults-list/vaults-list';
import { VaultContext } from '@providers/vault-context-provider';
+import { VaultState } from 'dlc-btc-lib/models';
import { VaultsListGroupContainer } from '../vaults-list/components/vaults-list-group-container';
import { MyVaultsSmallLayout } from './components/my-vaults-small.layout';
@@ -18,11 +19,31 @@ export function MyVaultsSmall(): React.JSX.Element {
0}>
-
-
-
-
-
+
+
+
+
+
-
+
- {unshiftValue(dlcBTCAmount)}
+ {unshiftValue(iBTCAmount)}
{/* add back the USD calculation later and adjus the width accordingly */}
diff --git a/src/app/components/proof-of-reserve/components/merchant-table/components/merchant-table-item.tsx b/src/app/components/proof-of-reserve/components/merchant-table/components/merchant-table-item.tsx
index efc596b8..ae40693b 100644
--- a/src/app/components/proof-of-reserve/components/merchant-table/components/merchant-table-item.tsx
+++ b/src/app/components/proof-of-reserve/components/merchant-table/components/merchant-table-item.tsx
@@ -16,12 +16,12 @@ import { Merchant } from '@models/merchant';
interface MerchantTableItemProps {
merchant: Merchant;
- dlcBTCAmount: number | undefined;
+ iBTCAmount: number | undefined;
}
export function MerchantTableItem({
merchant,
- dlcBTCAmount,
+ iBTCAmount,
}: MerchantTableItemProps): React.ReactElement {
const navigate = useNavigate();
@@ -42,8 +42,8 @@ export function MerchantTableItem({
-
-
+
+
- {Number(dlcBTCAmount?.toFixed(4))}
+ {Number(iBTCAmount?.toFixed(4))}
diff --git a/src/app/components/proof-of-reserve/components/merchant-table/merchant-table.tsx b/src/app/components/proof-of-reserve/components/merchant-table/merchant-table.tsx
index 8f255759..f986380f 100644
--- a/src/app/components/proof-of-reserve/components/merchant-table/merchant-table.tsx
+++ b/src/app/components/proof-of-reserve/components/merchant-table/merchant-table.tsx
@@ -23,11 +23,13 @@ export function MerchantTable({ items }: MerchantTableProps): React.JSX.Element
>
Merchant
- dlcBTC Minted
+ iBTC Minted
- {items?.map(item => )}
+ {items
+ ?.sort((a, b) => b.iBTCAmount - a.iBTCAmount)
+ .map(item => )}
);
diff --git a/src/app/components/proof-of-reserve/components/token-stats-board/components/token-stats-board-token.tsx b/src/app/components/proof-of-reserve/components/token-stats-board/components/token-stats-board-token.tsx
index e74da9b4..1679a92f 100644
--- a/src/app/components/proof-of-reserve/components/token-stats-board/components/token-stats-board-token.tsx
+++ b/src/app/components/proof-of-reserve/components/token-stats-board/components/token-stats-board-token.tsx
@@ -12,7 +12,7 @@ export function TokenStatsBoardToken({
}: TokenStatsBoardTokenProps): React.JSX.Element {
let tokenSuffix: string;
switch (token.name) {
- case 'dlcBTC':
+ case 'iBTC':
tokenSuffix = 'Minted';
break;
default:
diff --git a/src/app/components/proof-of-reserve/proof-of-reserve.tsx b/src/app/components/proof-of-reserve/proof-of-reserve.tsx
index 3a1f2a0b..c3ef8299 100644
--- a/src/app/components/proof-of-reserve/proof-of-reserve.tsx
+++ b/src/app/components/proof-of-reserve/proof-of-reserve.tsx
@@ -3,7 +3,7 @@ import { useContext } from 'react';
import { Divider, Stack, Text, useBreakpointValue } from '@chakra-ui/react';
import { ProtocolHistoryTable } from '@components/protocol-history-table/protocol-history-table';
import { Merchant } from '@models/merchant';
-import { bitcoin, dlcBTC } from '@models/token';
+import { bitcoin, iBTC } from '@models/token';
import { ProofOfReserveContext } from '@providers/proof-of-reserve-context-provider';
import { titleTextSize } from '@shared/utils';
@@ -23,7 +23,7 @@ export function ProofOfReserve(): React.JSX.Element {
appConfiguration.merchants.map((merchant: Merchant) => {
return {
merchant,
- dlcBTCAmount: undefined,
+ iBTCBalance: undefined,
};
}),
];
@@ -50,7 +50,7 @@ export function ProofOfReserve(): React.JSX.Element {
height={isMobile ? '1px' : '75px'}
variant={'thick'}
/>
-
+
-
+
- {unshiftValue(dlcBTCAmount)}
+ {unshiftValue(iBTCAmount)}
@@ -61,9 +60,9 @@ export function ProtocolHistoryTableItem(
) : (
<>
-
+
- {unshiftValue(dlcBTCAmount)}
+ {unshiftValue(iBTCAmount)}
@@ -97,9 +96,9 @@ export function ProtocolHistoryTableItem(
>
)}
{/*
-
+
- {unshiftValue(dlcBTCAmount)}
+ {unshiftValue(iBTCAmount)}
diff --git a/src/app/components/protocol-history-table/protocol-history-table.tsx b/src/app/components/protocol-history-table/protocol-history-table.tsx
index d7ea3638..687d6b2e 100644
--- a/src/app/components/protocol-history-table/protocol-history-table.tsx
+++ b/src/app/components/protocol-history-table/protocol-history-table.tsx
@@ -1,4 +1,6 @@
-import { Skeleton, useBreakpointValue } from '@chakra-ui/react';
+import { useState } from 'react';
+
+import { Button, HStack, Skeleton, Spacer, VStack, useBreakpointValue } from '@chakra-ui/react';
import { GenericTableBody } from '@components/generic-table/components/generic-table-body';
import { GenericTableHeader } from '@components/generic-table/components/generic-table-header';
import { GenericTableHeaderText } from '@components/generic-table/components/generic-table-header-text';
@@ -10,32 +12,68 @@ interface ProtocolHistoryTableProps {
}
export function ProtocolHistoryTable({ items }: ProtocolHistoryTableProps): React.JSX.Element {
- const dynamicHeight = items ? items.length * 59 + 20 : 20;
+ const [currentPage, setCurrentPage] = useState(1);
+ const itemsPerPage = 10;
const isMobile = useBreakpointValue({ base: true, md: false });
+ const totalPages = Math.ceil((items?.length || 0) / itemsPerPage);
+
+ const currentItems = items?.slice((currentPage - 1) * itemsPerPage, currentPage * itemsPerPage);
+
+ const handlePageChange = (direction: number) => {
+ setCurrentPage(prevPage => {
+ const newPage = prevPage + direction;
+ if (newPage < 1 || newPage > totalPages) return prevPage;
+ return newPage;
+ });
+ };
+
return (
-
-
- {isMobile ? (
- <>
- Order Book
- Transaction
- >
- ) : (
- <>
- Order Book
- Merchant
- Chain
- Transaction
- Date
- >
- )}
-
-
-
- {items?.map(item => )}
-
-
-
+
+
+
+ {isMobile ? (
+ <>
+ Order Book
+ Transaction
+ >
+ ) : (
+ <>
+ Order Book
+ Merchant
+ Chain
+ Transaction
+ Date
+ >
+ )}
+
+
+
+ {currentItems?.map(item => )}
+
+
+
+
+
+
+
+
+
);
}
diff --git a/src/app/components/transaction-screen/transaction-screen.transaction-form/components/transaction-screen.transaction-form/components/transaction-screen.transaction-form.input.tsx b/src/app/components/transaction-screen/transaction-screen.transaction-form/components/transaction-screen.transaction-form/components/transaction-screen.transaction-form.input.tsx
index 42194f64..9ef3c6ee 100644
--- a/src/app/components/transaction-screen/transaction-screen.transaction-form/components/transaction-screen.transaction-form/components/transaction-screen.transaction-form.input.tsx
+++ b/src/app/components/transaction-screen/transaction-screen.transaction-form/components/transaction-screen.transaction-form/components/transaction-screen.transaction-form.input.tsx
@@ -12,9 +12,9 @@ const bitcoinFormProperties = {
color: 'orange.01',
};
const tokenFormProperties = {
- label: 'Burn dlcBTC',
- logo: '/images/logos/dlc-btc-logo.svg',
- symbol: 'dlcBTC',
+ label: 'Burn iBTC',
+ logo: '/images/logos/ibtc-logo.svg',
+ symbol: 'iBTC',
color: 'purple.01',
};
diff --git a/src/app/components/transaction-screen/transaction-screen.transaction-form/components/transaction-screen.transaction-form/components/transaction-screen.transaction-form.progress-stack/components/transaction-screen.transaction-form.progress-stack.tsx b/src/app/components/transaction-screen/transaction-screen.transaction-form/components/transaction-screen.transaction-form/components/transaction-screen.transaction-form.progress-stack/components/transaction-screen.transaction-form.progress-stack.tsx
index 358574bf..b589127d 100644
--- a/src/app/components/transaction-screen/transaction-screen.transaction-form/components/transaction-screen.transaction-form/components/transaction-screen.transaction-form.progress-stack/components/transaction-screen.transaction-form.progress-stack.tsx
+++ b/src/app/components/transaction-screen/transaction-screen.transaction-form/components/transaction-screen.transaction-form/components/transaction-screen.transaction-form.progress-stack/components/transaction-screen.transaction-form.progress-stack.tsx
@@ -14,10 +14,10 @@ interface ProgressStackItemProps {
const componentsMap = {
mint: {
A: { label: 'Deposit', assetLogo: '/images/logos/bitcoin-logo.svg', assetSymbol: 'BTC' },
- B: { label: 'Mint', assetLogo: '/images/logos/dlc-btc-logo.svg', assetSymbol: 'dlcBTC' },
+ B: { label: 'Mint', assetLogo: '/images/logos/ibtc-logo.svg', assetSymbol: 'iBTC' },
},
burn: {
- A: { label: 'Burn', assetLogo: '/images/logos/dlc-btc-logo.svg', assetSymbol: 'dlcBTC' },
+ A: { label: 'Burn', assetLogo: '/images/logos/ibtc-logo.svg', assetSymbol: 'iBTC' },
B: { label: 'Withdraw', assetLogo: '/images/logos/bitcoin-logo.svg', assetSymbol: 'BTC' },
},
};
diff --git a/src/app/components/transaction-screen/transaction-screen.transaction-form/components/transaction-screen.transaction-form/components/transaction-screen.transaction-form.protocol-fee-box.tsx b/src/app/components/transaction-screen/transaction-screen.transaction-form/components/transaction-screen.transaction-form/components/transaction-screen.transaction-form.protocol-fee-box.tsx
index 83d75a06..f57abd35 100644
--- a/src/app/components/transaction-screen/transaction-screen.transaction-form/components/transaction-screen.transaction-form/components/transaction-screen.transaction-form.protocol-fee-box.tsx
+++ b/src/app/components/transaction-screen/transaction-screen.transaction-form/components/transaction-screen.transaction-form/components/transaction-screen.transaction-form.protocol-fee-box.tsx
@@ -2,6 +2,7 @@ import { HStack, Text, VStack } from '@chakra-ui/react';
import { Vault } from '@models/vault';
import Decimal from 'decimal.js';
import { getFeeAmount } from 'dlc-btc-lib/bitcoin-functions';
+import { shiftValue, unshiftValue } from 'dlc-btc-lib/utilities';
interface TransactionFormProtocolFeeStackProps {
flow: 'mint' | 'burn';
@@ -37,8 +38,9 @@ export function TransactionFormProtocolFeeStack({
const amount =
flow === 'burn' && currentStep === 1
- ? new Decimal(vault.valueLocked).minus(vault.valueMinted).toNumber()
- : assetAmount;
+ ? shiftValue(new Decimal(vault.valueLocked).minus(vault.valueMinted).toNumber())
+ : shiftValue(assetAmount!);
+
return (
- {`${amount && protocolFeeBasisPoints ? getFeeAmount(amount, protocolFeeBasisPoints) : 0}
+ {`${amount && protocolFeeBasisPoints ? unshiftValue(getFeeAmount(amount, protocolFeeBasisPoints)) : 0}
BTC`}
{' '}
@@ -61,7 +63,7 @@ export function TransactionFormProtocolFeeStack({
{`~
${
assetAmount && bitcoinPrice && protocolFeeBasisPoints
- ? calculateProtocolFeeInUSD(assetAmount, bitcoinPrice, protocolFeeBasisPoints)
+ ? calculateProtocolFeeInUSD(amount, bitcoinPrice, protocolFeeBasisPoints)
: 0
}
$`}
diff --git a/src/app/components/transaction-screen/transaction-screen.transaction-form/components/transaction-screen.transaction-form/components/transaction-screen.transaction-form.submit-button-group.tsx b/src/app/components/transaction-screen/transaction-screen.transaction-form/components/transaction-screen.transaction-form/components/transaction-screen.transaction-form.submit-button-group.tsx
index e9f85177..4a7d3086 100644
--- a/src/app/components/transaction-screen/transaction-screen.transaction-form/components/transaction-screen.transaction-form/components/transaction-screen.transaction-form.submit-button-group.tsx
+++ b/src/app/components/transaction-screen/transaction-screen.transaction-form/components/transaction-screen.transaction-form/components/transaction-screen.transaction-form.submit-button-group.tsx
@@ -1,6 +1,7 @@
import { Button, VStack } from '@chakra-ui/react';
import { TransactionFormAPI } from '@models/form.models';
import { BitcoinWalletContextState } from '@providers/bitcoin-wallet-context-provider';
+import { RedeemSteps } from '@store/slices/mintunmint/mintunmint.slice';
import { getFormProperties } from './transaction-screen.transaction-form.input';
@@ -50,7 +51,7 @@ export function TransactionFormSubmitButtonGroup({
isSubmitting,
}: TransactionFormSubmitButtonGroupProps): React.JSX.Element {
const isButtonDisabledByRiskLevel =
- flow === 'burn' && currentStep === 0 && userEthereumAddressRiskLevel === 'High';
+ flow === 'burn' && currentStep === RedeemSteps.BURN && userEthereumAddressRiskLevel === 'High';
const formProperties = getFormProperties(flow, currentStep);
return (
diff --git a/src/app/components/transaction-screen/transaction-screen.transaction-form/components/transaction-screen.transaction-form/transaction-screen.transaction-form.tsx b/src/app/components/transaction-screen/transaction-screen.transaction-form/components/transaction-screen.transaction-form/transaction-screen.transaction-form.tsx
index 0c8b0f63..f5a4a71f 100644
--- a/src/app/components/transaction-screen/transaction-screen.transaction-form/components/transaction-screen.transaction-form/transaction-screen.transaction-form.tsx
+++ b/src/app/components/transaction-screen/transaction-screen.transaction-form/components/transaction-screen.transaction-form/transaction-screen.transaction-form.tsx
@@ -38,9 +38,9 @@ function validateBurnAmount(value: number, valueMinted: number): string | undefi
let error;
if (!value) {
- error = 'Please enter a valid amount of dlcBTC';
+ error = 'Please enter a valid amount of iBTC';
} else if (valueMinted && value > valueMinted) {
- error = `You can't burn more than ${valueMinted} dlcBTC`;
+ error = `You can't burn more than ${valueMinted} iBTC`;
}
return error;
}
diff --git a/src/app/components/vault/components/vault.detaills/components/vault.details.button-group/vault.details.button-group.tsx b/src/app/components/vault/components/vault.detaills/components/vault.details.button-group/vault.details.button-group.tsx
index 7d63307b..cd1ac9ed 100644
--- a/src/app/components/vault/components/vault.detaills/components/vault.details.button-group/vault.details.button-group.tsx
+++ b/src/app/components/vault/components/vault.detaills/components/vault.details.button-group/vault.details.button-group.tsx
@@ -38,7 +38,7 @@ export function VaultExpandedInformationButtonGroup({
diff --git a/src/app/components/vault/components/vault.main-stack/components/vault.main-stack.asset-information-stack/vault.main-stack.asset-information-stack.tsx b/src/app/components/vault/components/vault.main-stack/components/vault.main-stack.asset-information-stack/vault.main-stack.asset-information-stack.tsx
index 813f466a..2b7a0aa5 100644
--- a/src/app/components/vault/components/vault.main-stack/components/vault.main-stack.asset-information-stack/vault.main-stack.asset-information-stack.tsx
+++ b/src/app/components/vault/components/vault.main-stack/components/vault.main-stack.asset-information-stack/vault.main-stack.asset-information-stack.tsx
@@ -13,9 +13,9 @@ export function VaultAssetInformationStack({
return (
-
}
{label}
- {label === 'Minted dlcBTC' && networkType === NetworkType.EVM && (
+ {vaultState === VaultState.FUNDED && networkType === NetworkType.EVM && (