Skip to content

Commit

Permalink
cleaning up
Browse files Browse the repository at this point in the history
  • Loading branch information
0xsergen committed May 21, 2024
1 parent 916ca3a commit 3a1c29f
Show file tree
Hide file tree
Showing 8 changed files with 2 additions and 153 deletions.
4 changes: 1 addition & 3 deletions sample-dapps/ethereum-address-appearances/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "my-dapp",
"name": "ethereum-address-appearances",
"private": true,
"version": "0.0.0",
"type": "module",
Expand All @@ -13,10 +13,8 @@
"@quicknode/sdk": "^2.2.2",
"axios": "^1.6.8",
"chart.js": "^4.4.2",
"chartjs-adapter-date-fns": "^3.0.0",
"dotenv": "^16.4.5",
"react": "^18.2.0",
"react-chartjs-2": "^5.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
Expand Down
4 changes: 0 additions & 4 deletions sample-dapps/ethereum-address-appearances/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import AddressInputForm from "./components/AddressInputForm";
import ComparisonTable from "./components/ComparisonTable";
import TransactionSummary from "./components/TransactionSummary";

// import BarChart from "./components/BarChart";
// import ComparisonChart from "./components/ComparisonChart";
import compareData from "./helpers/compareData";
import fetchTransactions from "./helpers/fetchData";
import {
Expand Down Expand Up @@ -56,8 +54,6 @@ const App: React.FC = () => {

useEffect(() => {
if (customData.length > 0 || Object.keys(etherscanData).length > 0) {
// console.log("custom data", customData);
// console.log("etherscan data", etherscanData);
const comparisonResult = compareData(customData, etherscanData);
setComparisonTable(comparisonResult);
}
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ const compareData = (
etherscanBlockNumber: etherscanTx.blockNumber,
etherscanTxIndex: etherscanTx.transactionIndex,
type: etherscanTx.type,

});
}
}
Expand All @@ -71,7 +70,7 @@ const compareData = (
}
}
}

// Sort filteredData by block number in descending order
combinedData.sort(
(a, b) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ const fetchCustomMethodData = async (
id: 1,
});

// console.log("response", response);

if (response.data) {
const { data, meta } = response.data.result;

Expand All @@ -68,7 +66,6 @@ const fetchEtherscanData = async (address: string) => {
const results: { [key: string]: SimplifiedEtherscanTransaction[] } = {};

for (const action of actions) {
// console.log("action", action);
results[action] = await fetchEtherscanTransactions(address, action);
}

Expand Down Expand Up @@ -96,7 +93,6 @@ const fetchEtherscanTransactions = async (address: string, action: string) => {
});

const { result } = response.data;
// console.log("result", result);
results.push(
...result.map((tx: SimplifiedEtherscanTransaction) => ({
blockNumber: tx.blockNumber,
Expand Down Expand Up @@ -126,8 +122,6 @@ const filterDuplicates = (etherscanData: {
if (!uniqueTransactions.has(key)) {
uniqueTransactions.set(key, tx);
}
// console.log("key", key);
// console.log(uniqueTransactions);
});

// Reconstruct the etherscanData object with unique transactions
Expand All @@ -143,8 +137,6 @@ const filterDuplicates = (etherscanData: {
});
}

// console.log("filtered data", filteredData);

return filteredData;
};

Expand Down

This file was deleted.

0 comments on commit 3a1c29f

Please sign in to comment.