Skip to content

Commit

Permalink
chore: remove spt routes
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasgabrielgsp committed Nov 25, 2024
1 parent 19b9a02 commit be6dc44
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 325 deletions.
13 changes: 0 additions & 13 deletions source/pages/Transactions/Transaction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,12 @@ import { useTranslation } from 'react-i18next';
import { useSelector } from 'react-redux';
import { useNavigate } from 'react-router-dom';

import { Layout } from 'components/index';
import { useQueryData } from 'hooks/index';
import { useController } from 'hooks/useController';
import { RootState } from 'state/store';
import { camelCaseToText } from 'utils/format';

import Fee from './Fee';
import TransactionConfirmation from './TransactionConfirmation';

interface ITransaction {
type: string;
Expand Down Expand Up @@ -57,17 +55,6 @@ const Transaction: React.FC<ITransaction> = ({ type }) => {
}, [fee]);

if (!fee) return <Fee title={title} onFinish={setFee} />;

return (
<Layout canGoBack={false} title={title}>
<TransactionConfirmation
host={host}
title={title}
type={type}
transaction={{ ...transaction, fee }}
/>
</Layout>
);
};

export default Transaction;
252 changes: 0 additions & 252 deletions source/pages/Transactions/TransactionConfirmation.tsx

This file was deleted.

10 changes: 0 additions & 10 deletions source/pages/Transactions/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,6 @@ import EthSign_ from './SignEth';
import Transaction from './Transaction';
export const SendToken = () => <Transaction type="Send" />;

//* Token
export const CreateToken = () => <Transaction type="CreateToken" />;
export const MintToken = () => <Transaction type="MintToken" />;
export const TransferToken = () => <Transaction type="TransferToken" />;
export const UpdateToken = () => <Transaction type="UpdateToken" />;

//* NFT
export const CreateNFT = () => <Transaction type="CreateNft" />;
export const MintNFT = () => <Transaction type="MintNft" />;

//* Sign
export const Sign = () => <Sign_ send />;
export const EthSign = () => <EthSign_ />;
Expand Down
62 changes: 12 additions & 50 deletions source/routers/ExternalRoute.tsx
Original file line number Diff line number Diff line change
@@ -1,35 +1,29 @@
import React, { Suspense, useEffect, useState } from 'react';
import { Routes, Route, Navigate } from 'react-router-dom';
import { Navigate, Route, Routes } from 'react-router-dom';

import {
ApproveTransactionComponent,
ChangeAccount,
ChangeConnectedAccount,
ConnectWallet,
CreateToken,
CreateNFT,
CreatePass,
EthSign,
CreatePasswordImport,
CustomRPCExternal,
Decrypt,
EncryptPubKey,
EthSign,
ExternalWatchAsset,
Import,
MintNFT,
MintToken,
SendToken,
SeedConfirm,
SendConfirm,
SendNTokenTransaction,
SendToken,
SendTransaction,
SignAndSend,
Sign,
SignAndSend,
Start,
TransferToken,
UpdateToken,
SeedConfirm,
ApproveTransactionComponent,
Decrypt,
CustomRPCExternal,
SwitchChain,
SwitchNeworkUtxoEvm,
ChangeConnectedAccount,
SendNTokenTransaction,
CreatePasswordImport,
ExternalWatchAsset,
} from '../pages';
import { Loading } from 'components/Loading';
import { useQuery, useUtils } from 'hooks/index';
Expand Down Expand Up @@ -192,38 +186,6 @@ export const ExternalRoute = () => {
path="sign-psbt"
element={<ProtectedRoute element={<Sign />} />}
/>

{/* /tx/asset */}
<Route path="asset">
<Route
path="create"
element={<ProtectedRoute element={<CreateToken />} />}
/>
<Route
path="mint"
element={<ProtectedRoute element={<MintToken />} />}
/>
<Route
path="transfer"
element={<ProtectedRoute element={<TransferToken />} />}
/>
<Route
path="update"
element={<ProtectedRoute element={<UpdateToken />} />}
/>

{/* /tx/asset/nft */}
<Route path="nft">
<Route
path="create"
element={<ProtectedRoute element={<CreateNFT />} />}
/>
<Route
path="mint"
element={<ProtectedRoute element={<MintNFT />} />}
/>
</Route>
</Route>
</Route>
</Route>

Expand Down

0 comments on commit be6dc44

Please sign in to comment.