Skip to content

Commit

Permalink
Merge branch 'dev' into fix/token-routing-2
Browse files Browse the repository at this point in the history
  • Loading branch information
0xIchigo authored Feb 12, 2024
2 parents ce054c6 + 1886ad4 commit 3819595
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
17 changes: 8 additions & 9 deletions src/lib/components/providers/token-provider.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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 "";
}
};
Expand All @@ -129,7 +129,7 @@
metadata.name = name;
}
if (jsonUri && jsonUri.endsWith('.json')) {
if (jsonUri && jsonUri.endsWith(".json")) {
(async () => {
try {
const imageUrl = await fetchJsonMetadata(jsonUri);
Expand All @@ -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) ||
Expand Down
2 changes: 2 additions & 0 deletions src/lib/util/recognized-tokens.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import type { RecognizedTokens } from "$lib/types";

export const recognizedTokens: RecognizedTokens = {
BONK: "DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263",
FOXY: "FoXyMu5xwXre7zEoSvzViRk3nGawHUp9kUh97y2NDhcq",
SOL: "So11111111111111111111111111111111111111112",
USDC: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
};

0 comments on commit 3819595

Please sign in to comment.