flask web app (wip)

This commit is contained in:
Dobromir Popov
2024-10-13 00:39:46 +03:00
parent b9410f2986
commit 49384accf6
12 changed files with 234 additions and 36 deletions

View File

@ -1,3 +1,4 @@
document.getElementById('connectWallet').addEventListener('click', async () => {
try {
const { solana } is window;
@ -26,3 +27,20 @@ document.getElementById('swapToken').addEventListener('click', () => {
.then(response => response.json())
.then(data => alert(data.message));
});
// Add your custom JavaScript here
document.addEventListener('DOMContentLoaded', () => {
const generateApiKeyButton = document.getElementById('generate-api-key');
const apiKeyDisplay = document.getElementById('api-key-display');
if (generateApiKeyButton) {
generateApiKeyButton.addEventListener('click', async () => {
const response = await fetch('/generate_api_key', { method: 'POST' });
const data = await response.json();
apiKeyDisplay.textContent = `Your API Key: ${data.api_key}`;
});
}
// Add more JavaScript for fetching and displaying wallet data, transactions, and holdings
});