From 872c4e510e323aa3fbb6f448b51c363f2b87cc65 Mon Sep 17 00:00:00 2001 From: 0xIchigo <0xIchigo@protonmail.com> Date: Wed, 7 Feb 2024 13:47:41 -0700 Subject: [PATCH 1/4] Fix Token/Account Routing --- src/lib/xray/lib/search.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/xray/lib/search.ts b/src/lib/xray/lib/search.ts index 654016bc..faf2e6b9 100644 --- a/src/lib/xray/lib/search.ts +++ b/src/lib/xray/lib/search.ts @@ -58,7 +58,7 @@ export const search = async ( if (isValidPublicKey(query)) { const pubkey = new PublicKey(query); - const account = await connection.getParsedAccountInfo(pubkey); + const account = await connection.getAccountInfo(pubkey); // TODO Property 'program' does not exist on type 'Buffer | ParsedAccountData'. // @ts-ignore const program = account?.value?.data?.program; From 4b4206f72446c2e21839944efb1f9b83786fb5c1 Mon Sep 17 00:00:00 2001 From: 0xIchigo <0xIchigo@protonmail.com> Date: Wed, 7 Feb 2024 13:52:26 -0700 Subject: [PATCH 2/4] Add SOL and BONK as Recognized Tokens --- src/lib/util/recognized-tokens.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/util/recognized-tokens.ts b/src/lib/util/recognized-tokens.ts index 26995290..029dc220 100644 --- a/src/lib/util/recognized-tokens.ts +++ b/src/lib/util/recognized-tokens.ts @@ -1,6 +1,8 @@ import type { RecognizedTokens } from "$lib/types"; export const recognizedTokens: RecognizedTokens = { + BONK: "DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263", FOXY: "FoXyMu5xwXre7zEoSvzViRk3nGawHUp9kUh97y2NDhcq", + SOL: "So11111111111111111111111111111111111111112", USDC: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", }; From 8177e3ea86f9fc3696fa85b96be897ca65b5b98d Mon Sep 17 00:00:00 2001 From: 0xIchigo <0xIchigo@protonmail.com> Date: Wed, 7 Feb 2024 13:52:43 -0700 Subject: [PATCH 3/4] Formatooorrr --- .../components/providers/token-provider.svelte | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/lib/components/providers/token-provider.svelte b/src/lib/components/providers/token-provider.svelte index ed899509..3d5a702a 100644 --- a/src/lib/components/providers/token-provider.svelte +++ b/src/lib/components/providers/token-provider.svelte @@ -108,16 +108,16 @@ if (!response.ok) { throw new Error(`Status ${response.status}`); } - const contentType = response.headers.get('content-type'); - if (!contentType || !contentType.includes('application/json')) { - throw new TypeError('Received non-JSON content type'); + const contentType = response.headers.get("content-type"); + if (!contentType || !contentType.includes("application/json")) { + throw new TypeError("Received non-JSON content type"); } const jsonData = await response.json(); return jsonData.image; } catch (error) { // eslint-disable-next-line no-console - console.error('Error fetching or parsing JSON metadata:', error); - return ''; + console.error("Error fetching or parsing JSON metadata:", error); + return ""; } }; @@ -129,7 +129,7 @@ metadata.name = name; } - if (jsonUri && jsonUri.endsWith('.json')) { + if (jsonUri && jsonUri.endsWith(".json")) { (async () => { try { const imageUrl = await fetchJsonMetadata(jsonUri); @@ -138,14 +138,13 @@ } } catch (error) { // eslint-disable-next-line no-console - console.error('Error in fetchJsonMetadata:', error); + console.error("Error in fetchJsonMetadata:", error); } })(); } else if (jsonUri) { metadata.image = jsonUri; } -} - + } $: tokenIsLoading = (address !== SOL && $asset?.isLoading) || From 5ee824b1601c367e9d1c99960014be88c6a53c15 Mon Sep 17 00:00:00 2001 From: Tyurin Kirill Date: Fri, 9 Feb 2024 00:45:15 +0300 Subject: [PATCH 4/4] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 64a04a8c..0d4a9e6f 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ For now we are auto deploying everything in main to staging. This is a TurboRepo monorepo that can run and build all apps/packages in parallel. Apps like the UI are located in `/apps`. Packages used across apps are located in `/packages`. -### Reccomended VSCode Extensions +### Recommended VSCode Extensions - [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) - [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) @@ -95,7 +95,7 @@ npm run dev ### Lint -It's reccomended you use VSCode beacuase if you do, ESLint is setup to auto fix/format as you're working. +It's recommended you use VSCode beacuase if you do, ESLint is setup to auto fix/format as you're working. ```sh npm run lint