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

[Release] 2.5.23 #249

Merged
merged 195 commits into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from 192 commits
Commits
Show all changes
195 commits
Select commit Hold shift + click to select a range
102ebaf
feat: retrieve address from indexer
zzggo Sep 30, 2024
03b0af8
Merge branch 'han-dev' into indexeraddress
zzggo Nov 1, 2024
979939f
Merge branch 'han-dev' into indexeraddress
zzggo Nov 4, 2024
3b5cfb5
Merge branch 'han-dev' into indexeraddress
zzggo Nov 6, 2024
945b18e
Merge remote-tracking branch 'origin/master' into indexeraddress
zzggo Nov 7, 2024
f69e283
Merge remote-tracking branch 'origin/master' into indexeraddress
zzggo Nov 7, 2024
3e2aa93
fixed: address drawer balance update
zzggo Nov 7, 2024
ac164a8
Merge remote-tracking branch 'origin/dev' into indexeraddress
zzggo Nov 8, 2024
a0aee34
Merge remote-tracking branch 'origin/dev' into indexeraddress
zzggo Nov 11, 2024
c7baa44
fixed: indexaddresser emoji
zzggo Nov 11, 2024
526b4ff
feat: new ignore
zzggo Nov 12, 2024
7d8fb98
Merge remote-tracking branch 'origin/dev' into indexeraddress
zzggo Nov 12, 2024
3f67ec2
Merge remote-tracking branch 'origin/dev' into indexeraddress
zzggo Nov 12, 2024
531bc91
fixed: switching accounts
zzggo Nov 13, 2024
7657b9e
fixed: storage balance
zzggo Nov 14, 2024
49edb71
[Event Tracking] Add mixpanel event tracking
tombeckenham Nov 17, 2024
61ba4c3
Registering super properties
tombeckenham Nov 17, 2024
93171f6
Defined events and properties as per gitbook
tombeckenham Nov 18, 2024
5bce4c7
Moved mixpanel init to background service
tombeckenham Nov 18, 2024
1f8dab9
General event tracking
tombeckenham Nov 18, 2024
ba56b4d
Renamed to trackOnRampClicked
tombeckenham Nov 18, 2024
0a52837
Handles backup tracking
tombeckenham Nov 18, 2024
1714a82
Added tracking for cadence signing
tombeckenham Nov 18, 2024
5541072
Implemented script_error tracking
tombeckenham Nov 18, 2024
91b54e7
Merge branch 'dev' into indexeraddress
zzggo Nov 18, 2024
36423fc
fixed: remove console
zzggo Nov 18, 2024
355402a
Identifies users
tombeckenham Nov 18, 2024
dd12dfa
Moved mixpanel connection to frontend
tombeckenham Nov 19, 2024
60a5319
Tracking FT & NFT transfers
tombeckenham Nov 19, 2024
2810127
Transaction result tracking
tombeckenham Nov 19, 2024
ece7a49
Track account created. Created algo util
tombeckenham Nov 19, 2024
c0a9c1b
Added timing for account created
tombeckenham Nov 19, 2024
4fc6a86
Tracking accont recovery
tombeckenham Nov 20, 2024
12536af
Corrected a couple of ft tracking events
tombeckenham Nov 20, 2024
bd7597f
Merge branch 'dev' into 94-event-tracking-add-mixpanel-event-tracking
tombeckenham Nov 20, 2024
59c9f44
Merge branch 'dev' into indexeraddress
zzggo Nov 20, 2024
8e0daf5
Merge branch 'dev' into indexeraddress
zzggo Nov 21, 2024
4837dc0
Merge remote-tracking branch 'origin/dev' into indexeraddress
zzggo Nov 21, 2024
0857dfb
Merge branch 'dev' into indexeraddress
zzggo Nov 22, 2024
b79598c
Updated react
tombeckenham Nov 22, 2024
3000de3
Merge remote-tracking branch 'origin/dev' into 202-feature-upgrade-al…
tombeckenham Nov 22, 2024
76f9664
Merge remote-tracking branch 'origin/dev' into indexeraddress
zzggo Nov 22, 2024
dc79ede
Basic mui update
tombeckenham Nov 22, 2024
16c8d74
Updated onflow and web3
tombeckenham Nov 22, 2024
64218a8
Upgraded typescript
tombeckenham Nov 22, 2024
f6a3485
feat: indicator for parent address
zzggo Nov 22, 2024
1549abf
Updated svg imports and typescript issues. Load of files
tombeckenham Nov 22, 2024
e1d58d8
Corrected tsconfig, eslint and removed old firebase imports
tombeckenham Nov 24, 2024
d3099ed
Revert "Updated svg imports and typescript issues. Load of files"
tombeckenham Nov 24, 2024
db0148c
Merge branch '202-revert-svg-import' into 202-feature-upgrade-all-dep…
tombeckenham Nov 24, 2024
d743529
Moved confetti to it's own component. Needs react upgrade
tombeckenham Nov 24, 2024
ac42daf
Updated react. About to refactor ThemeProvider
tombeckenham Nov 24, 2024
fa968b0
Removed wrongly included ThemeProvider and refactored
tombeckenham Nov 24, 2024
5d3b7df
HashRouter ignores history
tombeckenham Nov 24, 2024
4a19653
Updated walletconnect packages
tombeckenham Nov 24, 2024
e554154
Updated particles
tombeckenham Nov 24, 2024
d6ac5c6
Removed react-router-transition
tombeckenham Nov 24, 2024
3a73a2d
Moved to mui transitions
tombeckenham Nov 24, 2024
b3ceb52
Removed defaultProps
tombeckenham Nov 24, 2024
dd0d325
Fixed nesting
tombeckenham Nov 24, 2024
f487b9e
Support react-devtools
tombeckenham Nov 25, 2024
0ffcc76
Wrapped functions in useCallback
tombeckenham Nov 25, 2024
8becc49
Added emotion dep for mui
tombeckenham Nov 25, 2024
dfaf5d1
Including pnpm settings for complex dependencies
tombeckenham Nov 25, 2024
553bd43
Corrected Fade issue
tombeckenham Nov 25, 2024
203c104
fixed: case during import
zzggo Nov 25, 2024
91ac9f4
Fixed addwelcome layout and iconfont addressbook
tombeckenham Nov 26, 2024
63a705c
fixed: pricemap of flow price and update both evm and flow token price
zzggo Nov 26, 2024
ef53f20
Merge remote-tracking branch 'origin/dev' into 212-bug-update-evm-tok…
zzggo Nov 26, 2024
0058719
Merge branch 'dev' into indexeraddress
zzggo Nov 26, 2024
5d01952
Merge pull request #217 from Outblock/212-bug-update-evm-token-price-api
zzggo Nov 26, 2024
09c7404
Merge remote-tracking branch 'origin/dev' into indexeraddress
zzggo Nov 26, 2024
1e80ee6
feat: add replacement for google api url
zzggo Nov 26, 2024
fe3c26a
fixed: flowprice fallback
zzggo Nov 26, 2024
9915073
Merge pull request #220 from Outblock/replace-googleapi
zzggo Nov 26, 2024
990e58e
Merge branch 'dev' into indexeraddress
zzggo Nov 26, 2024
ec2d276
Fixed double render problem in innerroute
tombeckenham Nov 26, 2024
fe09597
Converted big crown svg to small png
tombeckenham Nov 26, 2024
7b86a25
Corrected Move & Send button layout
tombeckenham Nov 26, 2024
6e8ec94
Added feature flag to remove device list for now
tombeckenham Nov 26, 2024
35fa91a
Upgraded @onflow/transport-http
tombeckenham Nov 26, 2024
5f8e0ec
Removed dnd-kit
tombeckenham Nov 26, 2024
60eb2c8
Merge branch 'dev' into 202-feature-upgrade-all-dependencies
tombeckenham Nov 27, 2024
62b2961
Github CI workflow
tombeckenham Nov 25, 2024
476ae72
Dev workflow to get env variables
tombeckenham Nov 27, 2024
3c77eef
Removed dev config action
tombeckenham Nov 27, 2024
766e60b
Added draft created
tombeckenham Nov 27, 2024
bda7a7b
Updated so it runs on any branch
tombeckenham Nov 27, 2024
18d0ea5
fixed: token website link
zzggo Nov 27, 2024
2958875
Updated lock file
tombeckenham Nov 27, 2024
49344c7
fixed: get evm tokeninfo
zzggo Nov 27, 2024
5773c8d
Now sets up environment variables
tombeckenham Nov 27, 2024
9e7dc19
fixed: correction on the faucet card
zzggo Nov 27, 2024
2c5912d
Removed the need for firebase.config.json
tombeckenham Nov 27, 2024
079efe8
Fixed IconAddressbook naming
tombeckenham Nov 27, 2024
8b6e41e
Fixed casing error on emptyAddress.svg
tombeckenham Nov 27, 2024
24cea87
fixed: transaction history text
zzggo Nov 27, 2024
7f51a64
fixed: get Evm tokeninfo when sending from evm
zzggo Nov 27, 2024
0e17a9a
Merge pull request #223 from Outblock/222-bug-evm-send-move-precision…
zzggo Nov 27, 2024
89f6a8b
clear direct polyfills
tombeckenham Nov 27, 2024
9dbbc58
svg issues and extra logging
tombeckenham Nov 27, 2024
f65ac2f
Fix polyfill issue
tombeckenham Nov 27, 2024
efd872c
Merge pull request #227 from Outblock/Token-website-link-fails-to-open
zzggo Nov 27, 2024
bcd0662
Merge pull request #224 from Outblock/Incorrect-prompt-to-claim-token…
zzggo Nov 27, 2024
b6383c1
fixed: hide backup page if login with privatekey
zzggo Nov 27, 2024
93d5ce0
Added SlideDown component fixed unlock
tombeckenham Nov 28, 2024
19ce3dc
Merge pull request #228 from Outblock/197-bug-flow-wallet-extension-d…
zzggo Nov 28, 2024
b3eb507
Merge pull request #226 from Outblock/Transaction-history-text-displa…
zzggo Nov 28, 2024
3407018
Merge branch 'dev' into indexeraddress
zzggo Nov 28, 2024
43bb71c
fixed: three digit for price
zzggo Nov 28, 2024
f38f3cf
fixed: tokendetail page
zzggo Nov 28, 2024
0e5648f
Created Slide Components
tombeckenham Nov 28, 2024
2d84a40
Showing wallet details again in accountList
tombeckenham Nov 28, 2024
f7de01e
Merge branch 'dev' into 185-feature-ci-workflow
tombeckenham Nov 28, 2024
ba14e55
Added CI build and uses new artifacts
tombeckenham Nov 28, 2024
738f329
Added the commit sha and PR details for later
tombeckenham Nov 28, 2024
6904945
fixed: transfer list display and updated coinlist fetch function
zzggo Nov 28, 2024
69f7b97
Merge pull request #221 from Outblock:185-feature-ci-workflow
tombeckenham Nov 28, 2024
3f43091
Merge pull request #229 from Outblock/3-digit-for-price
zzggo Nov 28, 2024
4e6b482
Merge branch 'dev' into 202-feature-upgrade-all-dependencies
tombeckenham Nov 28, 2024
7655f9e
Merge branch 'dev' into 202-feature-upgrade-all-dependencies
tombeckenham Nov 28, 2024
d13bc6d
fixed: float decimal count, website link and font size
zzggo Nov 28, 2024
7595940
Merge pull request #231 from Outblock/fixed-flow-evm-weblink-and-deci…
zzggo Nov 28, 2024
94ee737
Merge pull request #208 from Outblock/202-feature-upgrade-all-depende…
tombeckenham Nov 29, 2024
e20774a
Merge webpack branch 'dev' into 94-event-tracking
tombeckenham Nov 29, 2024
ddf30d6
Merge branch 'dev' into 94-event-tracking-add-mixpanel-event-tracking
tombeckenham Nov 29, 2024
8abaab6
Merge pull request #183 from Outblock:94-event-tracking-add-mixpanel-…
tombeckenham Nov 29, 2024
8e375f3
Run clean in CI workflow
tombeckenham Nov 29, 2024
34bd2bb
Merge pull request #239 from Outblock:185-feature-ci-workflow
tombeckenham Nov 29, 2024
e56b7a5
Moving shared utils to proper folder
tombeckenham Nov 29, 2024
d38e17c
Moving shared utils and renaming
tombeckenham Nov 29, 2024
0f5dd4a
Moved top level utils to shared
tombeckenham Nov 29, 2024
8913f2d
Removed inclusion of ui utils
tombeckenham Nov 29, 2024
64e520d
Merge branch 'dev' into indexeraddress
zzggo Nov 29, 2024
1f02352
fixed: parent directory merge and format update
zzggo Nov 29, 2024
aa06f59
fixed: merge utils
zzggo Nov 29, 2024
c05139e
fixed: update assets
zzggo Nov 29, 2024
dac2836
fixed: update page
zzggo Nov 29, 2024
3010b89
fixed: shared folder
zzggo Nov 29, 2024
28e32a5
fixed: content script page format
zzggo Nov 29, 2024
b7f9dbc
fixed: ui theme
zzggo Nov 29, 2024
4f9ea40
fixed: update icon
zzggo Nov 29, 2024
ef153c4
fixed: background utils
zzggo Nov 29, 2024
14a641d
fixed: service format
zzggo Nov 29, 2024
7d2a77f
fixed: update background
zzggo Nov 29, 2024
cfedf79
fixed: ui component
zzggo Nov 29, 2024
79c1e48
fixed: utils moduls
zzggo Nov 29, 2024
ca98635
fixed: utils
zzggo Nov 29, 2024
b4802b9
Updated service to listen to messages properly
tombeckenham Nov 29, 2024
175a490
Updated page tracking
tombeckenham Nov 29, 2024
7de9cff
Include coin in storage evaluation
tombeckenham Nov 30, 2024
5cae8bc
Checks coin in all transfers
tombeckenham Nov 30, 2024
0a66ce8
Merge pull request #242 from Outblock:225-feature-incorrect-storage-a…
tombeckenham Nov 30, 2024
7170e3c
Merge branch 'dev' into 94-event-tracking-add-mixpanel-event-tracking
tombeckenham Nov 30, 2024
20dfb78
Removing legacy locale stuff as we are using chrome's i18n thing
tombeckenham Nov 30, 2024
bf3db02
Merge pull request #241 from Outblock:94-event-tracking-add-mixpanel-…
tombeckenham Nov 30, 2024
50ffe4e
fixed: ui views
zzggo Nov 30, 2024
484354f
fixed: format
zzggo Nov 30, 2024
e439b25
fixed: views format
zzggo Nov 30, 2024
909e5ec
fixed: ui
zzggo Nov 30, 2024
3fa89a4
fixed: ui views format
zzggo Nov 30, 2024
e9bfc9c
fixed: nft and move
zzggo Nov 30, 2024
7afe2a5
fixed: ui strucutre
zzggo Nov 30, 2024
1ac9249
fixed: pick username page function
zzggo Nov 30, 2024
9122919
Merge remote-tracking branch 'origin/dev' into indexeraddress
zzggo Nov 30, 2024
d81d987
fixed: commit error
zzggo Nov 30, 2024
a750d09
fixed: update message directory
zzggo Nov 30, 2024
340a685
fixed: remove unused ignore
zzggo Nov 30, 2024
ce8e2a3
Create pull_request_template.md
lmcmz Dec 2, 2024
4aa79af
Merge pull request #244 from Outblock/add-PR-template
lmcmz Dec 2, 2024
b8f408f
fixed: finding address with weight
zzggo Dec 3, 2024
514c44e
Merge branch 'dev' into indexeraddress
zzggo Dec 3, 2024
888ece6
fixed: result error handling
zzggo Dec 3, 2024
6f85fa0
Merge pull request #246 from Outblock/fixed-nufi-account-import
zzggo Dec 3, 2024
f3481f8
Merge remote-tracking branch 'origin/dev' into indexeraddress
zzggo Dec 3, 2024
183d0d1
feat: new dropdown menu for multiple account
zzggo Dec 3, 2024
508f1d4
fixed: register ui
zzggo Dec 4, 2024
84067da
fixed: register blackscreen
zzggo Dec 4, 2024
4f7830b
fixed: confirmation page popup
zzggo Dec 4, 2024
6dba80b
fixed: popup
zzggo Dec 4, 2024
8c7851c
fixed: confirmation spelling
zzggo Dec 4, 2024
9ca97d6
fixed: ui and sign dapp
zzggo Dec 5, 2024
a31de08
fixed: callback function emoji
zzggo Dec 5, 2024
02c5a99
fixed: hide arrow when only one address
zzggo Dec 5, 2024
d51b6bb
fixed: update bpicon and username
zzggo Dec 5, 2024
69229ca
fixed: remove console for fcl
zzggo Dec 6, 2024
3be4105
fixed: remove console
zzggo Dec 6, 2024
437a0cc
fixed: move child button
zzggo Dec 6, 2024
28e1487
fixed: move evm button
zzggo Dec 6, 2024
e6da66f
Merge pull request #219 from Outblock/indexeraddress
zzggo Dec 6, 2024
ae8588c
fixed: temp hide warning bar
zzggo Dec 6, 2024
82fedb6
Merge pull request #250 from Outblock/hide-storage-feature-temp
zzggo Dec 6, 2024
64bbce2
fixed: updated version number
zzggo Dec 6, 2024
77bff7c
fixed: to 2.6
zzggo Dec 6, 2024
a8f773d
Merge pull request #251 from Outblock/bumpversionnumber
zzggo Dec 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
27 changes: 27 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
## Related Issue
<!-- If this PR addresses an issue, link it here (e.g., "Closes #123") -->

## Summary of Changes
<!-- Provide a concise description of the changes made in this PR.
What functionality was added, updated, or fixed? -->

## Need Regression Testing
<!-- Indicate whether this PR requires regression testing and why. -->
- [ ] Yes
- [ ] No

## Risk Assessment
<!-- Assess the risk level of this PR:
- Low: Minimal impact, straightforward changes.
- Medium: Potential for some edge cases or indirect effects.
- High: Could affect critical functionality or many users.
-->
- [ ] Low
- [ ] Medium
- [ ] High

## Additional Notes
<!-- Add any other context or comments about the PR here -->

## Screenshots (if applicable)
<!-- Attach any screenshots that help explain your changes -->
99 changes: 99 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
name: Production Build

on:
pull_request:
types: [opened, reopened, synchronize, ready_for_review]
push:
branches: [dev, master]

jobs:
build:
runs-on: ubuntu-latest
environment: production

strategy:
matrix:
node-version: [22.x]

steps:
- uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 9
run_install: false

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

- name: Setup pnpm cache
uses: actions/cache@v3
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install dependencies
run: pnpm install

- name: Create .env.pro file
run: |
cat << EOF > .env.pro
# Git info
COMMIT_SHA="${{ github.sha }}"
BRANCH_NAME="${{ github.ref_name }}"
PR_TITLE="${{ github.event.pull_request.title || '' }}"
PR_NUMBER="${{ github.event.pull_request.number || '' }}"

# Google drive
GD_BACKUP_NAME="${{ vars.GD_BACKUP_NAME }}"
GD_FOLDER="${{ vars.GD_FOLDER }}"
GD_AES_KEY="${{ secrets.GD_AES_KEY }}"
GD_IV="${{ secrets.GD_IV }}"
GOOGLE_API="${{ secrets.GOOGLE_API }}"
FB_TOKEN="${{ secrets.FB_TOKEN }}"
# firebase
FB_API_KEY="${{ secrets.FB_API_KEY }}"
FB_AUTH_DOMAIN="${{ secrets.FB_AUTH_DOMAIN }}"
FB_DATABASE_URL="${{ secrets.FB_DATABASE_URL }}"
FB_PROJECTID="${{ secrets.FB_PROJECTID }}"
FB_STORAGE_BUCKET="${{ secrets.FB_STORAGE_BUCKET }}"
FB_MESSAGING_SENDER_ID="${{ secrets.FB_MESSAGING_SENDER_ID }}"
FB_APP_ID="${{ secrets.FB_APP_ID }}"
FB_MEASUREMENT_ID="${{ secrets.FB_MEASUREMENT_ID }}"
FB_FUNCTIONS="${{ secrets.FB_FUNCTIONS }}"
# manifest
OAUTH2_CLIENT_ID="${{ secrets.OAUTH2_CLIENT_ID }}"
OAUTH2_SCOPES="${{ vars.OAUTH2_SCOPES }}"
WC_PROJECTID="${{ secrets.WC_PROJECTID }}"
MIXPANEL_TOKEN="${{ secrets.MIXPANEL_TOKEN }}"
EOF

- name: Build production
run: pnpm run build:ci
env:
CI: true
COMMIT_SHA: ${{ github.sha }}
BRANCH_NAME: ${{ github.ref_name }}
PR_TITLE: ${{ github.event.pull_request.title || '' }}
PR_NUMBER: ${{ github.event.pull_request.number || '' }}

- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: extension-build
path: dist/

- name: Check build size
run: |
echo "Build size:"
du -sh dist/
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ yarn.lock
.env.pro
dist.zip
_raw/manifest.json
_raw/react-devtools.js
yarn-error.log
dist2
src/background/utils/firebase.config.json
Expand Down
2 changes: 1 addition & 1 deletion _raw/manifest/manifest.dev.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 3,
"name": "FlowWallet-dev",
"short_name": "__MSG_appName__",
"version": "2.5.21",
"version": "2.5.22",
"default_locale": "en",
"description": "__MSG_appDescription__",
"icons": {
Expand Down
2 changes: 1 addition & 1 deletion _raw/manifest/manifest.pro.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 3,
"name": "__MSG_appName__",
"short_name": "__MSG_appName__",
"version": "2.5.21",
"version": "2.5.22",
"default_locale": "en",
"description": "__MSG_appDescription__",
"icons": {
Expand Down
2 changes: 1 addition & 1 deletion build/plugins/AssetReplacePlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class AssetReplacePlugin {

for (const chunk of compilation.chunks.values()) {
const fileName = chunk.files.values().next().value;
if (!replaceArr.includes(([, assetName]) => assetName === fileName)) {
if (!replaceArr.some(([, assetName]) => assetName === fileName)) {
compilation.updateAsset(fileName, (content) => {
const result = replaceFn(content.source());

Expand Down
13 changes: 11 additions & 2 deletions build/plugins/FirebaseFixPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,15 @@ class FirebaseFixPlugin {
if (/\.(js|jsx)$/.test(name)) {
let content = asset.source();

console.log('About to fix firebase stuff', name);
console.log('typeof content', typeof content);
// Convert Buffer to string if needed
if (Buffer.isBuffer(content)) {
content = content.toString('utf-8');
}

// Convert other types to string if needed
if (typeof content !== 'string') {
content = content.toString();
}
// Replace the _loadJS function
content = content.replace(
/function\s*\w*\s*_loadJS\([\w\s,]*\)\s*\{([\w\W]*?)\}$/gim,
Expand All @@ -27,6 +33,9 @@ class FirebaseFixPlugin {
''
);

// https://apis.google.com/js/api.js
content = content.replace(/https:\/\/apis\.google\.com\/js\/api\.js/g, '');

content = content.replace(
/_loadJS\(`https:\/\/apis\.google\.com\/js\/api\.js(\?onload=\$\{([^}]+)\})?`\)/g,
'_loadJS(`${$1}`)'
Expand Down
45 changes: 44 additions & 1 deletion build/prepareManifest.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const path = require('path');
const fs = require('fs-extra');
const http = require('http');
// require('dotenv').config();

const PROJECT_ROOT = path.resolve(__dirname, '..');
Expand All @@ -8,6 +9,35 @@ const mode = args[0];

require('dotenv').config({ path: `.env.${mode}` });

const OAUTH2_SCOPES = process.env.OAUTH2_SCOPES || '';

const DEVTOOLS_URL = 'http://localhost:8097';

async function fetchDevTools() {
return new Promise((resolve, reject) => {
const request = http.get(DEVTOOLS_URL, (response) => {
if (response.statusCode !== 200) {
reject(new Error(`Failed to fetch: ${response.statusCode}`));
return;
}

let data = '';
response.on('data', (chunk) => (data += chunk));
response.on('end', () => {
const modifiedScript = `
// React DevTools for Chrome Extension
(function() {
${data}
})();
`;
resolve(modifiedScript);
});
});

request.on('error', reject);
});
}

async function prepare() {
console.log(process.env.NODE_ENV);
console.log(process.env.OAUTH2_CLIENT_ID);
Expand All @@ -17,12 +47,25 @@ async function prepare() {

manifest.oauth2 = {
client_id: process.env.OAUTH2_CLIENT_ID,
scopes: process.env.OAUTH2_SCOPES.split(','),
scopes: OAUTH2_SCOPES.split(','),
};

if (mode == 'dev') {
manifest.key = process.env.MANIFEST_KEY;
try {
const devToolsScript = await fetchDevTools();
fs.writeFileSync(path.resolve(__dirname, '../_raw/react-devtools.js'), devToolsScript);
console.log('✅ React DevTools source fetched successfully');
} catch (error) {
console.warn('⚠️ Failed to fetch React DevTools. Run the devtools server first');
// Write empty file if fetch fails
fs.writeFileSync(
path.resolve(__dirname, '../_raw/react-devtools.js'),
'// React DevTools not available'
);
}
}

fs.writeJSONSync(manifestPath, manifest, { spaces: 2 });

return '';
Expand Down
4 changes: 2 additions & 2 deletions build/release.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
const path = require('path');
const { prompt } = require('enquirer');
const { prompt: enquirerPrompt } = require('enquirer');
const fs = require('fs-extra');
const shell = require('shelljs');
const zipdir = require('zip-dir');

const PROJECT_ROOT = path.resolve(__dirname, '..');

async function release() {
const input = await prompt({
const input = await enquirerPrompt({
type: 'input',
name: 'version',
message: '[Flow Wallet] Please input the release version:',
Expand Down
Loading
Loading