Skip to content

Commit 58db659

Browse files
authored
Merge pull request #228 from blend-capital/circle-toml
chore: fix usdc toml resolution after update
2 parents efe273f + e2c9d08 commit 58db659

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "blend-ui",
3-
"version": "2.4.1",
3+
"version": "2.4.2",
44
"private": true,
55
"type": "module",
66
"scripts": {

src/external/stellar-toml.ts

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,23 @@ export async function getTokenMetadataFromTOML(
3030
const assetIssuer = tokenMetadata.asset.issuer;
3131
const assetId = `${assetCode}:${assetIssuer}`;
3232

33+
// Special case for Circle's TOML. Browsers get blocked by CORS policy.
3334
if (
3435
assetCode === 'EURC' &&
3536
assetIssuer === 'GDHU6WRG4IEQXM5NZ4BMPKOXHW76MZM4Y2IEMFDVXBSDP6SJY4ITNPP2'
3637
) {
37-
// Circle's TOML for EURC is blocked by CORS, so we can't load it
38-
// just short circuit the results here
3938
return {
40-
domain: 'circle.io',
39+
domain: 'circle.com',
4140
image: `https://www.circle.com/eurc-icon`,
4241
};
42+
} else if (
43+
assetCode === 'USDC' &&
44+
assetIssuer === 'GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN'
45+
) {
46+
return {
47+
domain: 'circle.com',
48+
image: `https://www.circle.com/usdc-icon`,
49+
};
4350
}
4451
try {
4552
const cachedData = localStorage.getItem(assetId);

0 commit comments

Comments
 (0)