flask web app (wip)
This commit is contained in:
@ -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
|
||||
});
|
Reference in New Issue
Block a user