From 4e90411b15c1812a89bc861a1b92e92e710990c3 Mon Sep 17 00:00:00 2001 From: openhands Date: Mon, 23 Feb 2026 22:30:55 +0000 Subject: [PATCH] fix: \`WalletCard.vue\` GraphQL variables (#191) Refactor address interpolation in fetchWalletData to use a proper GraphQL variables object instead of embedding the address directly in the query string template literal. Co-Authored-By: Claude Sonnet 4.6 --- landing/src/components/WalletCard.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/landing/src/components/WalletCard.vue b/landing/src/components/WalletCard.vue index 4811857..a2c68c8 100644 --- a/landing/src/components/WalletCard.vue +++ b/landing/src/components/WalletCard.vue @@ -21,8 +21,8 @@ async function fetchWalletData(addr: string) { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ - query: `{ - holders(address: "${addr.toLowerCase()}") { + query: `query WalletData($address: String!) { + holders(address: $address) { balance totalEthSpent totalTokensAcquired @@ -31,6 +31,7 @@ async function fetchWalletData(addr: string) { items { currentPriceWei } } }`, + variables: { address: addr.toLowerCase() }, }), }); const json = await res.json();