Skip to content

Commit 6d4161c

Browse files
committed
Remove unused
1 parent 83f9233 commit 6d4161c

3 files changed

Lines changed: 20 additions & 43 deletions

File tree

src/hooks/transactions/useSendPingPongTransaction.ts

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -79,25 +79,6 @@ export const useSendPingPongTransaction = () => {
7979
return sessionId;
8080
};
8181

82-
const sendToSelf = async () => {
83-
const selfTx = new Transaction({
84-
value: BigInt(0),
85-
data: Buffer.from('self'),
86-
receiver: new Address(address),
87-
gasLimit: BigInt(6000000),
88-
gasPrice: BigInt(GAS_PRICE),
89-
chainID: network.chainId,
90-
sender: new Address(address),
91-
version: 1
92-
});
93-
const sessionId = await signAndSendTransactions({
94-
transactions: [selfTx],
95-
transactionsDisplayInfo: PING_TRANSACTION_INFO
96-
});
97-
98-
return sessionId;
99-
};
100-
10182
const sendPingTransactionFromService = async (
10283
transactions: Transaction[]
10384
) => {
@@ -162,7 +143,6 @@ export const useSendPingPongTransaction = () => {
162143
sendPongTransaction,
163144
sendPongTransactionFromAbi,
164145
sendPingTransactionFromService,
165-
sendPongTransactionFromService,
166-
sendToSelf
146+
sendPongTransactionFromService
167147
};
168148
};

src/pages/Dashboard/widgets/PingPongRaw/PingPongRaw.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import { useGetPingAmount, useGetTimeToPong } from './hooks';
1818
export const PingPongRaw = () => {
1919
const getTimeToPong = useGetTimeToPong();
2020

21-
const { sendPingTransaction, sendPongTransaction, sendToSelf } =
21+
const { sendPingTransaction, sendPongTransaction } =
2222
useSendPingPongTransaction();
2323

2424
const transactions = useGetPendingTransactions();
@@ -85,8 +85,6 @@ export const PingPongRaw = () => {
8585
Pong
8686
</Button>
8787
</div>
88-
89-
<Button onClick={sendToSelf}>Send to self</Button>
9088
</div>
9189

9290
<OutputContainer>

tests/utils/enums.ts

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,6 @@ export enum GlobalDataEnum {
3434
transactionCanceled = 'Transaction canceled'
3535
}
3636

37-
export enum RoutesEnum {
38-
converters = 'converters',
39-
auth = 'auth',
40-
signMsg = 'sign-message',
41-
scDeploy = 'smart-contract',
42-
explainer = 'explainer',
43-
login = 'unlock',
44-
xportal = 'walletconnect',
45-
ledger = 'ledger',
46-
dashboard = 'dashboard'
47-
}
48-
4937
export enum GlobalSelectorEnum {
5038
homeTitle = 'home-title',
5139
homeDescription = 'home-description',
@@ -65,7 +53,6 @@ export enum GlobalSelectorEnum {
6553
crossWindowLoginBtn = '[data-testid="webWalletLoginBtn"]',
6654
legacyWebWalletLoginDropdownButton = '[data-testid="legacyWebWalletLoginDropdownButton"]',
6755
legacyDropdownValue = '//*[@aria-labelledby="dropdown-button"]',
68-
sendToSelfBtn = 'button*=Send to self',
6956
accesWalletBtn = '[data-testid="submitButton"]',
7057
signBtn = '[data-testid="signBtn"]',
7158
toastSelector = 'transactionToastTitle',
@@ -102,6 +89,24 @@ export enum GlobalSelectorEnum {
10289
signButton = 'signButton'
10390
}
10491

92+
export enum RoutesEnum {
93+
converters = 'converters',
94+
auth = 'auth',
95+
signMsg = 'sign-message',
96+
scDeploy = 'smart-contract',
97+
explainer = 'explainer',
98+
login = 'unlock',
99+
xportal = 'walletconnect',
100+
ledger = 'ledger',
101+
dashboard = 'dashboard'
102+
}
103+
104+
export enum TransactionIndexEnum {
105+
ping = 0,
106+
swapLock = 3,
107+
signBatch = 4
108+
}
109+
105110
export enum WalletAdressEnum {
106111
adress1 = 'erd1qtknph0q5hsm4hmjpvzusj8vgy8m48lpvclnv6jlkw4uu7sacj6smz8uhg',
107112
adress2 = 'erd16fq70uf7mdkkkv3fylawk7269ef63kv2vh5s4lrtm58aufve8dtqjlhjjn',
@@ -111,9 +116,3 @@ export enum WalletAdressEnum {
111116
adress6 = 'erd1p7a4q6qz9pns8mytcw62n2anuhd8nh6qkh4w5mzf9s7urdlkud5q94d630',
112117
adress7 = 'erd1tqtxnneypvga204w3e26096kpyxmtfk660yq7fh3jswtwagpwuds2a8wr3'
113118
}
114-
115-
export enum TransactionIndexEnum {
116-
ping = 0,
117-
swapLock = 3,
118-
signBatch = 4
119-
}

0 commit comments

Comments
 (0)