Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/send/requestSuccess.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const emit = defineEmits(["close", "shoutout"]);
const chainSpecificExplorers = {
56: "https://bscscan.com/",
97: "https://testnet.bscscan.com/",
80001: "https://mumbai.polygonscan.com/",
80002: "https://www.oklink.com/amoy",
137: "https://polygonscan.com/",
204: "https://opbnbscan.com/",
};
Expand Down
25 changes: 12 additions & 13 deletions src/constants/chainList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,13 @@ const chains = {
explorer: "https://polygonscan.com",
icon_url: "https://icons.llamao.fi/icons/chains/rsz_polygon.jpg",
},
80001: {
name: "Polygon Mumbai",
chain_id: 80001,
rpc_url:
"https://polygon-testnet.blastapi.io/7c12fa10-4e46-4810-bf66-6b3148119501",
blockchain: "polygon_mumbai",
80002: {
name: "Polygon Amoy Testnet",
chain_id: 80002,
rpc_url: "https://rpc-amoy.polygon.technology",
blockchain: "polygon_amoy",
currency: "MATIC",
explorer: "https://mumbai.polygonscan.com",
explorer: "https://www.oklink.com/amoy",
icon_url: "https://icons.llamao.fi/icons/chains/rsz_polygon.jpg",
},
42161: {
Expand Down Expand Up @@ -90,19 +89,19 @@ const chains = {
},
};

export const testnetChains = [80001, 97];
export const testnetChains = [80002, 97];

export const testnetChainFaucets = {
97: "https://testnet.binance.org/faucet-smart",
80001: "https://mumbaifaucet.com",
80002: "https://faucet.polygon.technology",
};

export const gaslessChains = [137];

export enum ChainNames {
"eth" = "Ethereum",
"polygon" = "Polygon PoS",
"polygon_mumbai" = "Polygon Mumbai",
"polygon_amoy" = "Polygon Amoy Testnet",
"arbitrum" = "Arbitrum One",
"bsc" = "BNB Smart Chain",
"bsc_testnet_chapel" = "BNB Smart Chain Testnet",
Expand All @@ -114,7 +113,7 @@ export enum ChainNames {
export enum ChainIds {
"eth" = 1,
"polygon" = 137,
"polygon_mumbai" = 80001,
"polygon_amoy" = 80002,
"arbitrum" = 42161,
"bsc" = 56,
"bsc_testnet_chapel" = 97,
Expand All @@ -124,8 +123,8 @@ export enum ChainIds {
}

export const SupportedChainIdsForAccounts = {
eoa: [1, 137, 80001, 42161, 56, 97, 204],
scw: [137, 80001],
eoa: [1, 137, 80002, 42161, 56, 97, 204],
scw: [137],
};

export default chains;
16 changes: 8 additions & 8 deletions src/constants/requestableTokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,14 @@ export const requestableTokens = {
decimals: 18,
},
],
80001: [
{
symbol: "MATIC",
tokenType: "NATIVE",
address: "NATIVE",
decimals: 18,
},
],
// 80002: [
// {
// symbol: "MATIC",
// tokenType: "NATIVE",
// address: "NATIVE",
// decimals: 18,
// },
// ],
42161: [
{
symbol: "ETH",
Expand Down
2 changes: 1 addition & 1 deletion src/constants/socket-ids.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@ const TOKEN_TYPES = {
ERC20: 1,
};

const GAS_SUPPORTED_CHAINS = [137, 80001];
const GAS_SUPPORTED_CHAINS = [137];

export { SOCKET_IDS, LEADERBOARD_TYPES, TOKEN_TYPES, GAS_SUPPORTED_CHAINS };
2 changes: 1 addition & 1 deletion src/constants/unitMapping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const nativeUnitMapping = {
5: "ETH",
11155111: "ETH",
137: "MATIC",
80001: "MATIC",
80002: "MATIC",
42161: "ETH",
56: "BNB",
97: "BNB",
Expand Down
4 changes: 2 additions & 2 deletions src/pages/private/wallets/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -224,14 +224,14 @@ function handleSendToken(asset: any, accountType: string) {
</div>
</div>
<div class="flex gap-2 mt-[1rem]">
<button
<!-- <button
v-if="wallet.buttons.deposit"
class="flex flex-grow flex-col gap-1 justify-center items-center p-[0.5rem] bg-[#222] rounded-[10px] text-white text-[0.75rem] w-full text-[10px]"
@click.stop="handleDeposit(wallet)"
>
<img src="@/assets/images/icons/deposit.svg" alt="deposit" />
Deposit Crypto
</button>
</button> -->
<button
v-if="wallet.buttons.withdraw"
class="flex flex-grow flex-col gap-1 justify-center items-center p-[0.5rem] bg-[#222] rounded-[10px] text-white text-[0.75rem] w-full text-[10px]"
Expand Down
15 changes: 6 additions & 9 deletions src/services/ankr.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ async function getNativeTokenBalances(walletAddress: string) {
const ankrPromises = [
axios.post(chains[1].rpc_url, payload),
axios.post(chains[137].rpc_url, payload),
axios.post(chains[80001].rpc_url, payload),
axios.post(chains[80002].rpc_url, payload),
axios.post(chains[42161].rpc_url, payload),
axios.post(chains[56].rpc_url, payload),
axios.post(chains[97].rpc_url, payload),
Expand All @@ -82,7 +82,7 @@ async function getNativeTokenBalances(walletAddress: string) {
const [
eth,
polygon,
polygon_mumbai,
polygon_amoy,
arbitrum,
bsc,
bsc_testnet_chapel,
Expand Down Expand Up @@ -112,13 +112,10 @@ async function getNativeTokenBalances(walletAddress: string) {
{
tokenType: "NATIVE",
tokenSymbol: "MATIC",
blockchain: "polygon_mumbai",
balance: polygon_mumbai.data.result
? new Decimal(polygon_mumbai.data.result)
.mul(Decimal.pow(10, -18))
.toString()
: 0,
thumbnail: "https://ankrscan.io/assets/blockchains/polygon.svg",
blockchain: "polygon_amoy",
balance: new Decimal(polygon_amoy.data.result)
.mul(Decimal.pow(10, -18))
.toString(),
},
{
tokenType: "NATIVE",
Expand Down
13 changes: 2 additions & 11 deletions src/use/walletconnect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,13 @@ import {
mainnet,
polygon,
sepolia,
polygonMumbai,
arbitrum,
bsc,
bscTestnet,
} from "@wagmi/core/chains";
} from "viem/chains";

function useWalletConnect() {
const chains = [
mainnet,
polygon,
sepolia,
polygonMumbai,
arbitrum,
bsc,
bscTestnet,
];
const chains = [mainnet, polygon, sepolia, arbitrum, bsc, bscTestnet];
const projectId = import.meta.env.VITE_WALLETCONNECT_PROJECT_ID;
const featuredWallets = {
okx: "971e689d0a5be527bac79629b4ee9b925e82208e5168b733496a09c0faed0709",
Expand Down