Skip to content

Commit

Permalink
Add dogechain and dogechain configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
mainnet-pat committed Sep 8, 2022
1 parent 08c4a34 commit a181207
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/hooks/ens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ export const useEnsResolver: () => EnsResolver = () => {
const { safe, sdk } = useSafeAppsSDK();
const chainId = safe.chainId;
const ensAddress: string | undefined = {
568: "0x08850859CE6B62A39918c8B806AfbE3442fE7b0b",
2000: "0x834C46666c1dE7367B252682B9ABAb458DD333bf",
10000: "0xCfb86556760d03942EBf1ba88a9870e67D77b627",
10001: "0x32f1FBE59D771bdB7FB247FE97A635f50659202b",
}[chainId];
Expand Down
7 changes: 7 additions & 0 deletions src/hooks/token.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ export const fetchTokenList = async (chainId: number): Promise<TokenMap> => {
case 100:
tokens = xdaiTokens.tokens;
break;
case 2000:
const dogechainTokenURL = "https://tokens.coingecko.com/dogechain/all.json";
tokens = await fetch(dogechainTokenURL)
.then((response) => response.json())
.then((response) => response.tokens)
.catch(() => []);
break;
case 10000:
const smartbchTokenURL = "https://tokens.coingecko.com/smartbch/all.json";
tokens = await fetch(smartbchTokenURL)
Expand Down
20 changes: 20 additions & 0 deletions src/networks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,26 @@ export const networkInfo = new Map<number, NetworkInfo>([
currencySymbol: "EWT",
},
],
[
568,
{
chainID: 568,
name: "Dogechain Testnet",
shortName: "dogechain-testnet",
currencySymbol: "DOGE",
baseAPI: "https://safe-transaction.dogechain-testnet.smartsafe.cash/api/v1",
},
],
[
2000,
{
chainID: 2000,
name: "Dogechain",
shortName: "dogechain",
currencySymbol: "DOGE",
baseAPI: "https://safe-transaction.dogechain.smartsafe.cash/api/v1",
},
],
[
10000,
{
Expand Down

1 comment on commit a181207

@vercel
Copy link

@vercel vercel bot commented on a181207 Sep 8, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.