Skip to content

Commit

Permalink
Merge pull request #292 from Outblock:233-feature-firebase-auth-for-w…
Browse files Browse the repository at this point in the history
…eb-extensions

233-feature-firebase-auth-for-web-extensions
  • Loading branch information
tombeckenham authored Dec 17, 2024
2 parents aefa24b + 27d555e commit 48797ff
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 143 deletions.
57 changes: 0 additions & 57 deletions build/plugins/AssetReplacePlugin.js

This file was deleted.

58 changes: 0 additions & 58 deletions build/plugins/FirebaseFixPlugin.js

This file was deleted.

24 changes: 0 additions & 24 deletions build/webpack.common.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin');
const ESLintWebpackPlugin = require('eslint-webpack-plugin');
// const tsImportPluginFactory = require('ts-import-plugin');
const AssetReplacePlugin = require('./plugins/AssetReplacePlugin');
const FirebaseFixPlugin = require('./plugins/FirebaseFixPlugin');
const { version } = require('../_raw/manifest.json');
const path = require('path');
const CopyPlugin = require('copy-webpack-plugin');
Expand Down Expand Up @@ -105,19 +101,6 @@ const config = (env) => {
name: '[name].[ext]',
},
},
// {
// test: /\.wasm$/,
// include: path.resolve(__dirname, 'node_modules/@trustwallet/wallet-core/dist/lib'),
// use: [{
// loader: 'file-loader',
// options: {
// name: '[name].[ext]',
// outputPath: '/',
// },
// }],
// type: 'javascript/auto',

// },
{
test: /\.wasm$/,
type: 'webassembly/async',
Expand All @@ -142,10 +125,6 @@ const config = (env) => {
],
},
plugins: [
new FirebaseFixPlugin(),
// new ESLintWebpackPlugin({
// files: '**/*.{ts,tsx,js,jsx}',
// }),
new CopyPlugin({
patterns: [
{
Expand Down Expand Up @@ -187,9 +166,6 @@ const config = (env) => {
process: 'process',
dayjs: 'dayjs',
}),
// new AssetReplacePlugin({
// '#PAGEPROVIDER#': 'pageProvider',
// }),
new webpack.DefinePlugin({
'process.env.version': JSON.stringify(`version: ${version}`),
'process.env.release': JSON.stringify(version),
Expand Down
2 changes: 1 addition & 1 deletion src/background/controller/wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import * as bip39 from 'bip39';
import { ethErrors } from 'eth-rpc-errors';
import * as ethUtil from 'ethereumjs-util';
import { getApp } from 'firebase/app';
import { getAuth } from 'firebase/auth';
import { getAuth } from 'firebase/auth/web-extension';
import web3, { TransactionError } from 'web3';

import eventBus from '@/eventBus';
Expand Down
2 changes: 1 addition & 1 deletion src/background/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
indexedDBLocalPersistence,
setPersistence,
onAuthStateChanged,
} from 'firebase/auth';
} from 'firebase/auth/web-extension';

import eventBus from '@/eventBus';
import { Message } from '@/shared/utils/messaging';
Expand Down
2 changes: 1 addition & 1 deletion src/background/service/openapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
onAuthStateChanged,
type Unsubscribe,
type User,
} from 'firebase/auth';
} from 'firebase/auth/web-extension';
import { getInstallations, getId } from 'firebase/installations';
import type { TokenInfo } from 'flow-native-token-registry';
import log from 'loglevel';
Expand Down
2 changes: 1 addition & 1 deletion src/background/service/userWallet.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as secp from '@noble/secp256k1';
import * as fcl from '@onflow/fcl';
import { getApp } from 'firebase/app';
import { getAuth, signInAnonymously } from 'firebase/auth';
import { getAuth, signInAnonymously } from 'firebase/auth/web-extension';

import { type ActiveChildType } from '@/shared/types/wallet-types';
import { withPrefix } from '@/shared/utils/address';
Expand Down

0 comments on commit 48797ff

Please sign in to comment.