Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove aurora support from Advanced tools #1149

Merged
merged 1 commit into from
Oct 24, 2024
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
12 changes: 0 additions & 12 deletions src/components/NFTOriginVerifier.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import {
ChainId,
CHAIN_ID_AURORA,
CHAIN_ID_AVAX,
CHAIN_ID_BSC,
CHAIN_ID_ETH,
Expand Down Expand Up @@ -438,17 +437,6 @@ export default function NFTOriginVerifier() {
>
View on Snowtrace
</Button>
) : originInfo.chainId === CHAIN_ID_AURORA ? (
<Button
href={`https://aurorascan.dev/token/${readableAddress}?a=${originInfo.tokenId}`}
target="_blank"
rel="noopener noreferrer"
startIcon={<Launch />}
className={classes.viewButton}
variant="outlined"
>
View on Explorer
</Button>
) : originInfo.chainId === CHAIN_ID_FANTOM ? (
<Button
href={`https://ftmscan.com/token/${readableAddress}?a=${originInfo.tokenId}`}
Expand Down
5 changes: 0 additions & 5 deletions src/components/ShowTx.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import {
ChainId,
CHAIN_ID_ALGORAND,
CHAIN_ID_AURORA,
CHAIN_ID_AVAX,
CHAIN_ID_BSC,
CHAIN_ID_CELO,
Expand Down Expand Up @@ -94,10 +93,6 @@ export default function ShowTx({
? `https://${
CLUSTER === "testnet" ? "testnet." : ""
}explorer.emerald.oasis.dev/tx/${tx?.id}`
: chainId === CHAIN_ID_AURORA
? `https://${
CLUSTER === "testnet" ? "testnet." : ""
}aurorascan.dev/tx/${tx?.id}`
: chainId === CHAIN_ID_FANTOM
? `https://${
CLUSTER === "testnet" ? "testnet." : ""
Expand Down
5 changes: 0 additions & 5 deletions src/components/SmartAddress.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import {
ChainId,
CHAIN_ID_ALGORAND,
CHAIN_ID_AURORA,
CHAIN_ID_AVAX,
CHAIN_ID_BSC,
CHAIN_ID_CELO,
Expand Down Expand Up @@ -141,10 +140,6 @@ export default function SmartAddress({
}explorer.emerald.oasis.dev/${
isAsset ? "token" : "address"
}/${useableAddress}`
: chainId === CHAIN_ID_AURORA
? `https://${CLUSTER === "testnet" ? "testnet." : ""}aurorascan.dev/${
isAsset ? "token" : "address"
}/${useableAddress}`
: chainId === CHAIN_ID_FANTOM
? `https://${CLUSTER === "testnet" ? "testnet." : ""}ftmscan.com/${
isAsset ? "token" : "address"
Expand Down
7 changes: 0 additions & 7 deletions src/components/Stats/CustodyAddresses.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {
CHAIN_ID_AURORA,
CHAIN_ID_AVAX,
CHAIN_ID_BSC,
CHAIN_ID_ETH,
Expand Down Expand Up @@ -100,12 +99,6 @@ const CustodyAddresses: React.FC<any> = () => {
tokenAddress: getTokenBridgeAddressForChain(CHAIN_ID_FANTOM),
nftAddress: getNFTBridgeAddressForChain(CHAIN_ID_FANTOM),
},
{
chainName: "Aurora",
chainId: CHAIN_ID_AURORA,
tokenAddress: getTokenBridgeAddressForChain(CHAIN_ID_AURORA),
nftAddress: getNFTBridgeAddressForChain(CHAIN_ID_AURORA),
},
{
chainName: "Terra",
chainId: CHAIN_ID_TERRA2,
Expand Down
2 changes: 0 additions & 2 deletions src/components/TransactionProgress.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import {
ChainId,
CHAIN_ID_ACALA,
CHAIN_ID_ARBITRUM,
CHAIN_ID_AURORA,
CHAIN_ID_CELO,
CHAIN_ID_ETH,
CHAIN_ID_FANTOM,
Expand Down Expand Up @@ -114,7 +113,6 @@ export default function TransactionProgress({
? 64
: 512
: chainId === CHAIN_ID_OASIS ||
chainId === CHAIN_ID_AURORA ||
chainId === CHAIN_ID_FANTOM ||
chainId === CHAIN_ID_KARURA ||
chainId === CHAIN_ID_ACALA ||
Expand Down
7 changes: 0 additions & 7 deletions src/components/Transfer/Redeem.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import {
CHAIN_ID_ACALA,
CHAIN_ID_ARBITRUM,
CHAIN_ID_AURORA,
CHAIN_ID_AVAX,
CHAIN_ID_BSC,
CHAIN_ID_ETH,
Expand Down Expand Up @@ -49,7 +48,6 @@ import {
WAVAX_ADDRESS,
WBNB_ADDRESS,
WETH_ADDRESS,
WETH_AURORA_ADDRESS,
WFTM_ADDRESS,
WGLMR_ADDRESS,
WKLAY_ADDRESS,
Expand Down Expand Up @@ -182,10 +180,6 @@ function Redeem() {
targetChain === CHAIN_ID_OASIS &&
targetAsset &&
targetAsset.toLowerCase() === WROSE_ADDRESS.toLowerCase();
const isAuroraNative =
targetChain === CHAIN_ID_AURORA &&
targetAsset &&
targetAsset.toLowerCase() === WETH_AURORA_ADDRESS.toLowerCase();
const isFantomNative =
targetChain === CHAIN_ID_FANTOM &&
targetAsset &&
Expand Down Expand Up @@ -216,7 +210,6 @@ function Redeem() {
isPolygonNative ||
isAvaxNative ||
isOasisNative ||
isAuroraNative ||
isFantomNative ||
isKlaytnNative ||
isNeonNative ||
Expand Down
13 changes: 0 additions & 13 deletions src/config/transferRules.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import {
CHAIN_ID_BSC,
CHAIN_ID_ETH,
// CHAIN_ID_TERRA,
CHAIN_ID_AURORA,
} from "@certusone/wormhole-sdk";
// import { terra } from "@certusone/wormhole-sdk";
import { Rule, PredicateArgs } from "../hooks/useWarningRulesEngine";
Expand All @@ -25,10 +23,6 @@ const isPandleFromBsc = (

const PANDLE_MESSAGE =
"Pandle transfers are limited to Ethereum to BSC and BSC to Ethereum.";
const AuroraMessage =
"As a precautionary measure, Wormhole Network and Portal have paused Aurora support temporarily.";
/*const TERRA_CLASSIC_MESSAGE =
"Transfers of native tokens to Terra Classic have been temporarily paused.";*/

const transferRules: Rule[] = [
{
Expand All @@ -38,13 +32,6 @@ const transferRules: Rule[] = [
isPandleFromBsc(source, token?.toUpperCase()),
text: PANDLE_MESSAGE,
},
{
id: "aurora",
predicate: ({ source, target }: PredicateArgs) =>
source === CHAIN_ID_AURORA || target === CHAIN_ID_AURORA,
text: AuroraMessage,
disableTransfer: true,
},
];

export default transferRules;
60 changes: 0 additions & 60 deletions src/hooks/useGetSourceParsedTokenAccounts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import {
CHAIN_ID_ACALA,
CHAIN_ID_ALGORAND,
CHAIN_ID_APTOS,
CHAIN_ID_AURORA,
CHAIN_ID_AVAX,
CHAIN_ID_BSC,
CHAIN_ID_CELO,
Expand Down Expand Up @@ -53,7 +52,6 @@ import { useNearContext } from "../contexts/NearWalletContext";
import { useSolanaWallet } from "../contexts/SolanaWalletContext";
import acalaIcon from "../icons/acala.svg";
import arbitrumIcon from "../icons/arbitrum.svg";
import auroraIcon from "../icons/aurora.svg";
import avaxIcon from "../icons/avax.svg";
import baseIcon from "../icons/base.svg";
import bnbIcon from "../icons/bnb.svg";
Expand Down Expand Up @@ -118,8 +116,6 @@ import {
WBNB_ADDRESS,
WBNB_DECIMALS,
WETH_ADDRESS,
WETH_AURORA_ADDRESS,
WETH_AURORA_DECIMALS,
WETH_DECIMALS,
WFTM_ADDRESS,
WFTM_DECIMALS,
Expand Down Expand Up @@ -411,29 +407,6 @@ const createNativeOasisParsedTokenAccount = (
});
};

const createNativeAuroraParsedTokenAccount = (
provider: Provider,
signerAddress: string | undefined
) => {
return !(provider && signerAddress)
? Promise.reject()
: provider.getBalance(signerAddress).then((balanceInWei) => {
const balanceInEth = ethers.utils.formatEther(balanceInWei);
return createParsedTokenAccount(
signerAddress, //public key
WETH_AURORA_ADDRESS, //Mint key, On the other side this will be wavax, so this is hopefully a white lie.
balanceInWei.toString(), //amount, in wei
WETH_AURORA_DECIMALS,
parseFloat(balanceInEth), //This loses precision, but is a limitation of the current datamodel. This field is essentially deprecated
balanceInEth.toString(), //This is the actual display field, which has full precision.
"ETH", //A white lie for display purposes
"Aurora ETH", //A white lie for display purposes
auroraIcon,
true //isNativeAsset
);
});
};

const createNativeFantomParsedTokenAccount = (
provider: Provider,
signerAddress: string | undefined
Expand Down Expand Up @@ -1551,39 +1524,6 @@ function useGetAvailableTokens(nft: boolean = false) {
};
}, [lookupChain, provider, signerAddress, nft, ethNativeAccount]);

useEffect(() => {
let cancelled = false;
if (
signerAddress &&
lookupChain === CHAIN_ID_AURORA &&
!ethNativeAccount &&
!nft
) {
setEthNativeAccountLoading(true);
createNativeAuroraParsedTokenAccount(provider, signerAddress).then(
(result) => {
console.log("create native account returned with value", result);
if (!cancelled) {
setEthNativeAccount(result);
setEthNativeAccountLoading(false);
setEthNativeAccountError("");
}
},
(error) => {
if (!cancelled) {
setEthNativeAccount(undefined);
setEthNativeAccountLoading(false);
setEthNativeAccountError("Unable to retrieve your Fantom balance.");
}
}
);
}

return () => {
cancelled = true;
};
}, [lookupChain, provider, signerAddress, nft, ethNativeAccount]);

useEffect(() => {
let cancelled = false;
if (
Expand Down
2 changes: 0 additions & 2 deletions src/utils/coinGecko.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,6 @@ export const COIN_GECKO_IMAGE_URLS: CoinGeckoIdToImageUrl = {
"https://assets.coingecko.com/coins/images/20077/small/200x200-agf.png?1636452467",
augur:
"https://assets.coingecko.com/coins/images/309/small/REP.png?1596339859",
"aurora-dao":
"https://assets.coingecko.com/coins/images/2565/small/logomark-purple-286x286.png?1638362736",
aurory:
"https://assets.coingecko.com/coins/images/19324/small/logo.png?1635076945",
"avalanche-2":
Expand Down
Loading
Loading