diff --git a/packages/extension/configs/rollup.config.base.mjs b/packages/extension/configs/rollup.config.base.mjs index abbe66bc1..6f83f2904 100644 --- a/packages/extension/configs/rollup.config.base.mjs +++ b/packages/extension/configs/rollup.config.base.mjs @@ -18,6 +18,7 @@ const base = { replace({ preventAssignment: true, __VERSION__: JSON.stringify(packageJson.version), + __IS_OPERA__: process.env.BROWSER === "opera-edge", }), typescript(), commonjs(), diff --git a/packages/extension/configs/testNullCompiler.js b/packages/extension/configs/testNullCompiler.js index 061b8ebc9..152247070 100644 --- a/packages/extension/configs/testNullCompiler.js +++ b/packages/extension/configs/testNullCompiler.js @@ -1,5 +1,6 @@ const noop = () => 1; global.__VERSION__ = "test"; +global.__IS_OPERA__ = false; require.extensions[".css"] = noop; require.extensions[".scss"] = noop; require.extensions[".png"] = noop; diff --git a/packages/extension/package.json b/packages/extension/package.json index b3750fc5c..38857ca7e 100644 --- a/packages/extension/package.json +++ b/packages/extension/package.json @@ -1,11 +1,11 @@ { "name": "@enkryptcom/extension", - "version": "1.37.0", + "version": "1.37.1", "private": true, "scripts": { "zip": "cd dist; zip -r release.zip *;", "build:chrome": "cross-env BROWSER='chrome' vue-cli-service build && yarn build:rollup", - "build:operaedge": "cross-env BROWSER='opera-edge' vue-cli-service build && yarn build:rollup", + "build:operaedge": "cross-env BROWSER='opera-edge' vue-cli-service build && cross-env BROWSER='opera-edge' yarn build:rollup", "build:firefox": "cross-env BROWSER='firefox' vue-cli-service build && yarn build:rollup && node configs/get-system-info.js", "lint": "vue-cli-service lint --fix", "build:rollup": "cross-env minify=on rollup --config configs/rollup.config.contentscript.mjs && cross-env minify=on rollup --config configs/rollup.config.inject.mjs", diff --git a/packages/extension/src/libs/nft-handlers/simplehash.ts b/packages/extension/src/libs/nft-handlers/simplehash.ts index 88361664c..b644ee64d 100644 --- a/packages/extension/src/libs/nft-handlers/simplehash.ts +++ b/packages/extension/src/libs/nft-handlers/simplehash.ts @@ -24,7 +24,6 @@ export default async ( [NetworkNames.MaticZK]: "polygon-zkevm", [NetworkNames.ZkSync]: "zksync-era", [NetworkNames.ZkSyncGoerli]: "zksync-era-testnet", - [NetworkNames.Goerli]: "ethereum-goerli", [NetworkNames.Base]: "base", }; if (!Object.keys(supportedNetworks).includes(network.name)) diff --git a/packages/extension/src/providers/ethereum/inject.ts b/packages/extension/src/providers/ethereum/inject.ts index 24a7d59ee..89807fc1e 100644 --- a/packages/extension/src/providers/ethereum/inject.ts +++ b/packages/extension/src/providers/ethereum/inject.ts @@ -146,6 +146,9 @@ const injectDocument = ( const provider = new Provider(options); const proxiedProvider = new Proxy(provider, ProxyHandler); document["enkrypt"]["providers"][options.name] = provider; + if (__IS_OPERA__) { + document[options.name] = proxiedProvider; // Opera expects you to inject immediatly and their wallet switcher will handle conflicts + } options .sendMessageHandler( ProviderName.enkrypt, diff --git a/packages/extension/src/providers/ethereum/libs/activity-handlers/providers/etherscan/configs.ts b/packages/extension/src/providers/ethereum/libs/activity-handlers/providers/etherscan/configs.ts index ef4490c5b..54b8bcf51 100644 --- a/packages/extension/src/providers/ethereum/libs/activity-handlers/providers/etherscan/configs.ts +++ b/packages/extension/src/providers/ethereum/libs/activity-handlers/providers/etherscan/configs.ts @@ -2,7 +2,6 @@ import { NetworkNames } from "@enkryptcom/types"; const NetworkEndpoints: Record = { [NetworkNames.Ethereum]: "https://api.etherscan.io/", - [NetworkNames.Goerli]: "https://api-goerli.etherscan.io/", [NetworkNames.Binance]: "https://api.bscscan.com/", [NetworkNames.Matic]: "https://api.polygonscan.com/", [NetworkNames.Moonbeam]: "https://api-moonbeam.moonscan.io/", diff --git a/packages/extension/src/providers/ethereum/libs/activity-handlers/providers/rivet/configs.ts b/packages/extension/src/providers/ethereum/libs/activity-handlers/providers/rivet/configs.ts index 24f3c97ee..daec718ea 100644 --- a/packages/extension/src/providers/ethereum/libs/activity-handlers/providers/rivet/configs.ts +++ b/packages/extension/src/providers/ethereum/libs/activity-handlers/providers/rivet/configs.ts @@ -3,7 +3,6 @@ import { NetworkNames } from "@enkryptcom/types"; const NetworkEndpoints = { [NetworkNames.Ethereum]: "https://nodes.mewapi.io/rpc/eth", [NetworkNames.Sepolia]: "https://nodes.mewapi.io/rpc/sepolia", - [NetworkNames.Goerli]: "https://nodes.mewapi.io/rpc/goerli", [NetworkNames.EthereumClassic]: "https://nodes.mewapi.io/rpc/etc", }; diff --git a/packages/extension/src/providers/ethereum/networks/form-testnet.ts b/packages/extension/src/providers/ethereum/networks/form-testnet.ts index ee6e82f0b..aba41e7dc 100644 --- a/packages/extension/src/providers/ethereum/networks/form-testnet.ts +++ b/packages/extension/src/providers/ethereum/networks/form-testnet.ts @@ -15,7 +15,7 @@ const formTestnetOptions: EvmNetworkOptions = { currencyName: "ETH", currencyNameLong: "Ethereum", node: "wss://testnet-rpc.form.network/ws", - icon: require("./icons/eth.svg"), + icon: require("./icons/form.png"), activityHandler: wrapActivityHandler(EtherscanActivity), }; diff --git a/packages/extension/src/providers/ethereum/networks/goerli.ts b/packages/extension/src/providers/ethereum/networks/goerli.ts deleted file mode 100644 index 13fadb1e2..000000000 --- a/packages/extension/src/providers/ethereum/networks/goerli.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { NetworkNames } from "@enkryptcom/types"; -import { EvmNetwork, EvmNetworkOptions } from "../types/evm-network"; -import { RivetActivity } from "../libs/activity-handlers"; -import wrapActivityHandler from "@/libs/activity-state/wrap-activity-handler"; -import shNFTHandler from "@/libs/nft-handlers/simplehash"; - -const goerliOptions: EvmNetworkOptions = { - name: NetworkNames.Goerli, - name_long: "Goerli", - homePage: "https://github.com/goerli/testnet", - blockExplorerTX: "https://goerli.etherscan.io/tx/[[txHash]]", - blockExplorerAddr: "https://goerli.etherscan.io/address/[[address]]", - chainID: "0x5", - isTestNetwork: true, - currencyName: "GöETH", - currencyNameLong: "Goerli", - node: "wss://nodes.mewapi.io/ws/goerli", - icon: require("./icons/eth.svg"), - NFTHandler: shNFTHandler, - activityHandler: wrapActivityHandler(RivetActivity), -}; - -const goerli = new EvmNetwork(goerliOptions); - -export default goerli; diff --git a/packages/extension/src/providers/ethereum/networks/icons/form.png b/packages/extension/src/providers/ethereum/networks/icons/form.png new file mode 100644 index 000000000..4156b8201 Binary files /dev/null and b/packages/extension/src/providers/ethereum/networks/icons/form.png differ diff --git a/packages/extension/src/providers/ethereum/networks/index.ts b/packages/extension/src/providers/ethereum/networks/index.ts index b52ab6e70..e45505591 100644 --- a/packages/extension/src/providers/ethereum/networks/index.ts +++ b/packages/extension/src/providers/ethereum/networks/index.ts @@ -1,5 +1,4 @@ import ethNode from "./eth"; -import goerliNode from "./goerli"; import etcNode from "./etc"; import maticNode from "./matic"; import maticZkNode from "./maticzk"; @@ -35,7 +34,6 @@ import formTestnet from "./form-testnet"; import artheraTestNode from "./aat"; export default { - goerli: goerliNode, sepolia: sepoliaNode, ethereum: ethNode, etc: etcNode, diff --git a/packages/extension/src/types/shims-vue.d.ts b/packages/extension/src/types/shims-vue.d.ts index 9bf592026..08730cdd9 100644 --- a/packages/extension/src/types/shims-vue.d.ts +++ b/packages/extension/src/types/shims-vue.d.ts @@ -1,3 +1,4 @@ declare module "*.vue"; declare module "vue3-lottie"; declare const __VERSION__: string; +declare const __IS_OPERA__: boolean; diff --git a/packages/hw-wallets/src/configs.ts b/packages/hw-wallets/src/configs.ts index 454888c1d..f7454fb4f 100644 --- a/packages/hw-wallets/src/configs.ts +++ b/packages/hw-wallets/src/configs.ts @@ -15,7 +15,6 @@ const ledgerAppNames = { [NetworkNames.Binance]: "Ethereum", [NetworkNames.Rootstock]: "RSK", [NetworkNames.EthereumClassic]: "Ethereum Classic", - [NetworkNames.Goerli]: "Ethereum", [NetworkNames.Acala]: "Acala", [NetworkNames.Kusama]: "Kusama", [NetworkNames.Polkadot]: "Polkadot", diff --git a/packages/hw-wallets/src/ledger/ethereum/configs.ts b/packages/hw-wallets/src/ledger/ethereum/configs.ts index e737ff91e..5698e8109 100644 --- a/packages/hw-wallets/src/ledger/ethereum/configs.ts +++ b/packages/hw-wallets/src/ledger/ethereum/configs.ts @@ -31,6 +31,5 @@ const supportedPaths = { bip44Paths.ethereumLedger, bip44Paths.ethereumLedgerLive, ], - [NetworkNames.Goerli]: [bip44Paths.ethereumTestnetLedger], }; export { supportedPaths }; diff --git a/packages/hw-wallets/src/trezor/configs.ts b/packages/hw-wallets/src/trezor/configs.ts index c7087a91e..c73ca4c79 100644 --- a/packages/hw-wallets/src/trezor/configs.ts +++ b/packages/hw-wallets/src/trezor/configs.ts @@ -7,7 +7,6 @@ const supportedPaths = { [NetworkNames.Avalanche]: [bip44Paths.ethereum], [NetworkNames.Binance]: [bip44Paths.ethereum], [NetworkNames.EthereumClassic]: [bip44Paths.ethereumClassic], - [NetworkNames.Goerli]: [bip44Paths.ethereumTestnet], [NetworkNames.Rootstock]: [bip44Paths.rootstock], }; export { supportedPaths }; diff --git a/packages/types/src/networks.ts b/packages/types/src/networks.ts index 08198e4bb..ffcad40c0 100644 --- a/packages/types/src/networks.ts +++ b/packages/types/src/networks.ts @@ -3,7 +3,6 @@ export enum NetworkNames { Okc = "OKT", Binance = "BNB", EthereumClassic = "ETC", - Goerli = "GOERLI", Sepolia = "SEPOLIA", Matic = "MATIC", MaticZK = "MATICZK",