Skip to content

Commit

Permalink
Merge branch 'main' into feat/safari-support
Browse files Browse the repository at this point in the history
  • Loading branch information
kvhnuke committed Apr 2, 2024
2 parents d18970e + 5ff4758 commit 7570172
Show file tree
Hide file tree
Showing 16 changed files with 9 additions and 37 deletions.
1 change: 1 addition & 0 deletions packages/extension/configs/rollup.config.base.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const base = {
replace({
preventAssignment: true,
__VERSION__: JSON.stringify(packageJson.version),
__IS_OPERA__: process.env.BROWSER === "opera-edge",
}),
typescript(),
commonjs(),
Expand Down
1 change: 1 addition & 0 deletions packages/extension/configs/testNullCompiler.js
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
4 changes: 2 additions & 2 deletions packages/extension/package.json
Original file line number Diff line number Diff line change
@@ -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",
"build:safari": "cross-env BROWSER='safari' vue-cli-service build && yarn build:rollup",
"lint": "vue-cli-service lint --fix",
Expand Down
1 change: 0 additions & 1 deletion packages/extension/src/libs/nft-handlers/simplehash.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
3 changes: 3 additions & 0 deletions packages/extension/src/providers/ethereum/inject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { NetworkNames } from "@enkryptcom/types";

const NetworkEndpoints: Record<string, string> = {
[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/",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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),
};

Expand Down
25 changes: 0 additions & 25 deletions packages/extension/src/providers/ethereum/networks/goerli.ts

This file was deleted.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 0 additions & 2 deletions packages/extension/src/providers/ethereum/networks/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import ethNode from "./eth";
import goerliNode from "./goerli";
import etcNode from "./etc";
import maticNode from "./matic";
import maticZkNode from "./maticzk";
Expand Down Expand Up @@ -35,7 +34,6 @@ import formTestnet from "./form-testnet";
import artheraTestNode from "./aat";

export default {
goerli: goerliNode,
sepolia: sepoliaNode,
ethereum: ethNode,
etc: etcNode,
Expand Down
1 change: 1 addition & 0 deletions packages/extension/src/types/shims-vue.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
declare module "*.vue";
declare module "vue3-lottie";
declare const __VERSION__: string;
declare const __IS_OPERA__: boolean;
1 change: 0 additions & 1 deletion packages/hw-wallets/src/configs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 0 additions & 1 deletion packages/hw-wallets/src/ledger/ethereum/configs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,5 @@ const supportedPaths = {
bip44Paths.ethereumLedger,
bip44Paths.ethereumLedgerLive,
],
[NetworkNames.Goerli]: [bip44Paths.ethereumTestnetLedger],
};
export { supportedPaths };
1 change: 0 additions & 1 deletion packages/hw-wallets/src/trezor/configs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
1 change: 0 additions & 1 deletion packages/types/src/networks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ export enum NetworkNames {
Okc = "OKT",
Binance = "BNB",
EthereumClassic = "ETC",
Goerli = "GOERLI",
Sepolia = "SEPOLIA",
Matic = "MATIC",
MaticZK = "MATICZK",
Expand Down

1 comment on commit 7570172

@github-actions
Copy link

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.