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

feat: reown #713

Open
wants to merge 91 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
2a86288
feat: pgs
andreabadesso Sep 4, 2024
704d089
feat: working react-app-rewired
andreabadesso Oct 15, 2024
a16df67
chore: generating policy
andreabadesso Oct 22, 2024
991441c
feat: added lockdown and config overrides adding ses
andreabadesso Nov 26, 2024
61f6365
chore: lavamoat policy overrides working
andreabadesso Dec 16, 2024
828ec61
chore: using path-browserify
andreabadesso Dec 19, 2024
8fcceab
chore: build passing
andreabadesso Dec 19, 2024
c6296ba
fix: axios failing to be imported
andreabadesso Dec 19, 2024
fe6071a
fix: Buffer missing from bitcore-lib
andreabadesso Dec 21, 2024
c1ad57e
fix: global modal not showing sometimes
andreabadesso Dec 21, 2024
915421e
chore: upgrade nodejs to v22
andreabadesso Dec 23, 2024
205b123
chore: using fixed versions
andreabadesso Dec 23, 2024
a79fc09
chore: stop hardcoding debugMode and removed process
andreabadesso Dec 23, 2024
786ac3b
chore: better pin modal
andreabadesso Dec 23, 2024
b4be97e
refactor: using path-browserify in transaction details
andreabadesso Dec 23, 2024
944b6c1
refactor: using path-browserify in helpers
andreabadesso Dec 23, 2024
2306201
refactor: removed walletconnect references
andreabadesso Dec 23, 2024
780a778
chore: only add lavamoat in production builds
andreabadesso Dec 23, 2024
7b8bc73
chore: watch-css on start script
andreabadesso Dec 23, 2024
9f841f9
chore: update lavamoat policy
andreabadesso Dec 23, 2024
34f7c64
docs: improved docs on lavamoat on dev
andreabadesso Jan 21, 2025
9eabaa4
refactor: removed performance from lavamoat config-overrides
andreabadesso Jan 21, 2025
6d3be4a
chore: added trace uncaught to dev and debug
andreabadesso Jan 21, 2025
b3601fe
fix: missing modalContext in App.js
andreabadesso Jan 21, 2025
64ad5b9
fix: missing return on getfullExplorerUrl
andreabadesso Jan 21, 2025
f2163ef
chore: added log to bn.js patch so the developer knows that something…
andreabadesso Jan 21, 2025
d0dcb80
refactor: focus pin input on modal pin shown
andreabadesso Jan 24, 2025
e8c3382
refactor: onSuccess -> onModalHidden on modal pin
andreabadesso Jan 24, 2025
ea644ef
refactor: modal title id
andreabadesso Jan 24, 2025
9631ec1
refactor: removed most of the polyfills from config-overrides
andreabadesso Feb 24, 2025
110225e
docs: added a comment on mjs module resolution
andreabadesso Feb 24, 2025
1df1ef9
refactor: removed XMLHttpRequest from the wallet-lib lavamoat override
andreabadesso Feb 24, 2025
e473bdf
chore: fix failing check pot script
andreabadesso Feb 26, 2025
3c68161
chore: stdlib is a dev dependency and not polyfilling vm
andreabadesso Feb 26, 2025
893324c
chore: update locale
andreabadesso Feb 26, 2025
9b966af
chore: ignoring scripts on cypress
andreabadesso Feb 26, 2025
e214d16
chore: installing libusb instead of ignoring scripts
andreabadesso Feb 26, 2025
99134dc
feat: added reown components, packages and modal
andreabadesso Dec 26, 2024
7644dce
chore: stop using null-loader for pino
andreabadesso Dec 27, 2024
c4e9aaf
chore: added lavamoat policy for walletconnect deps
andreabadesso Dec 27, 2024
131fa2d
chore: updated walletconnect deps
andreabadesso Dec 27, 2024
b246583
refactor: global reown module
andreabadesso Dec 30, 2024
dc49f14
chore: better sourcemaps by providing full webpack path
andreabadesso Jan 1, 2025
1753845
chore: normalize walletconnect packages to include eventClient requir…
andreabadesso Jan 1, 2025
5647b31
feat: modals implementation
andreabadesso Jan 1, 2025
a40fdc1
fix: using bigint on txData screen
andreabadesso Jan 2, 2025
7b33f04
fix: using bigint on nano contract detail screen
andreabadesso Jan 2, 2025
da8b6bc
feat: modals implementation
andreabadesso Jan 2, 2025
282b79a
refactor: each modal on its own component
andreabadesso Jan 2, 2025
b275061
feat: network changed -> clear reown sessions
andreabadesso Jan 2, 2025
6cf2ed3
refactor: cosmetic changes to reown
andreabadesso Jan 2, 2025
9feb6b3
refactor: using separate methods for each nc action
andreabadesso Jan 2, 2025
47d04e7
refactor: removed pointless logs
andreabadesso Jan 2, 2025
62dafc0
feat: listen for feature toggle update
andreabadesso Jan 2, 2025
d33ee5f
refactor: added hathor header
andreabadesso Jan 2, 2025
ac3d949
refactor: removed unused helper method
andreabadesso Jan 2, 2025
b758a98
chore: added comment explaining serialization check
andreabadesso Jan 2, 2025
1686839
fix: added missing action types
andreabadesso Jan 2, 2025
493cce6
fix: moved reown feature toggle
andreabadesso Jan 2, 2025
cde5524
refactor: correct docstrings in reown module
andreabadesso Jan 2, 2025
3709ce7
feat: added missing handlers
andreabadesso Jan 2, 2025
7f0b096
refactor: removed useless delay
andreabadesso Jan 2, 2025
571e217
refactor: improved debug log
andreabadesso Jan 2, 2025
96a9f2f
chore: fixed walletkit version
andreabadesso Jan 2, 2025
942aa47
chore: updated lavamoat policy with new fixed versions
andreabadesso Jan 2, 2025
76caeae
refactor: use constants
andreabadesso Jan 24, 2025
8055156
docs: added a TODO on create token modal
andreabadesso Jan 24, 2025
952dc97
refactor: removed ternary in jsx
andreabadesso Jan 29, 2025
25b07b5
refactor: error when modalContext is unavailable
andreabadesso Jan 29, 2025
711d49b
refactor: single selector for multiple states
andreabadesso Jan 29, 2025
0b2da14
refactor: accept -> acceptCb
andreabadesso Jan 30, 2025
8028256
refactor: failure -> failed
andreabadesso Feb 24, 2025
6d7d69e
docs: added missing docstrings
andreabadesso Feb 24, 2025
d270a68
refactor: don't allow modal to be closed during load
andreabadesso Feb 24, 2025
a189691
refactor: renderError and renderSuccess in NanoContractFeedbackModal
andreabadesso Feb 24, 2025
59a2037
refactor: removed unused console.log
andreabadesso Feb 24, 2025
6c285ca
refactor: using fetchBlueprintInformation saga
andreabadesso Feb 24, 2025
154c6cb
docs: added missing docstrings
andreabadesso Feb 24, 2025
ca32f33
refactor: hathor mobile wallet -> hathor desktop wallet
andreabadesso Feb 24, 2025
79d40a3
refactor: defend against possible bugs from reown
andreabadesso Feb 24, 2025
6a3b7d9
feat: added token creation and message sigining success modals
andreabadesso Feb 24, 2025
3e352e9
refactor: generic handleDappRequest
andreabadesso Feb 24, 2025
45fc592
refactor: setting connection failure to false on success
andreabadesso Feb 24, 2025
62f6173
feat: loading on connect
andreabadesso Feb 24, 2025
ab6ba6e
feat: big int on sign message and create token, better error handling
andreabadesso Feb 28, 2025
c69ccc3
fix: properly displaying signWithAddress success screen.
andreabadesso Mar 4, 2025
1e1dc33
refactor: removed unused console.log
andreabadesso Mar 4, 2025
fb78681
refactor: removed build warnings
andreabadesso Mar 4, 2025
baf9604
refactor: better error handling on reown connection
andreabadesso Mar 4, 2025
3c60a40
feat: user should be able to pick an address for the caller
andreabadesso Mar 4, 2025
fffae43
Merge branch 'master' into feat/reown
andreabadesso Mar 6, 2025
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
79 changes: 69 additions & 10 deletions config-overrides.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,31 @@
/**
* Copyright (c) Hathor Labs and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

const webpack = require('webpack');
const LavaMoatPlugin = require('@lavamoat/webpack')
const fs = require('fs');
const path = require('path');
const stdLibBrowser = require('node-stdlib-browser');

module.exports = function override(config, env) {
// Enable source maps for better debugging
config.devtool = 'source-map';
config.devtool = env === 'development' ? 'eval-source-map' : 'source-map';

// Fix source map paths
config.output = {
...config.output,
devtoolModuleFilenameTemplate: env === 'development'
? 'webpack:///./../[resource-path]'
: info => path.relative('src', info.absoluteResourcePath)
};

config.optimization = {
...config.optimization,
minimize: false,
concatenateModules: false
minimize: env === 'production',
concatenateModules: env === 'production'
};

// Configure module resolution
Expand All @@ -26,6 +40,8 @@ module.exports = function override(config, env) {
stream: stdLibBrowser.stream,
os: stdLibBrowser.os,
vm: false,
events: stdLibBrowser.events,
util: stdLibBrowser.util
},
mainFields: ['browser', 'module', 'main'],
conditionNames: ['import', 'require', 'node', 'default'],
Expand All @@ -35,12 +51,9 @@ module.exports = function override(config, env) {
alias: {
'classic-level': false,
'level': false,
'pino-worker': false,
'pino/file': false,
'pino-pretty': false,
Comment on lines -38 to -40
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the lavamoat branch we were using a null loader for pino to prevent it from being bundled, but this causes walletconnect to fail, as it uses pino for logging

'axios': path.resolve(__dirname, 'node_modules/axios'),
// Add an alias for our buffer shim
'buffer-shim': path.resolve(__dirname, 'src/buffer-shim.js')
'buffer-shim': path.resolve(__dirname, 'src/buffer-shim.js'),
'pino': require.resolve('pino/browser.js')
}
};

Expand All @@ -66,10 +79,56 @@ module.exports = function override(config, env) {

// Use null-loader for Node.js-specific packages
config.module.rules.push({
test: /[\\/](classic-level|pino)[\\/]/,
test: /[\\/](classic-level)[\\/]/,
use: 'null-loader'
});

// Ignore specific webpack warnings that don't affect functionality
config.ignoreWarnings = [
// Ignore source map warnings from WalletConnect dependencies
// These warnings occur because WalletConnect distributes compiled JavaScript files
// with references to TypeScript source maps that aren't included in the npm package.
// This is a common issue with TypeScript libraries and doesn't affect functionality.
// The warnings are purely development-time noise and can be safely ignored.
/Failed to parse source map/,

// Ignore color-adjust deprecation warning
// Bootstrap 4.x uses the 'color-adjust' CSS property which is now deprecated
// in favor of 'print-color-adjust'. This warning doesn't affect functionality
// and will be fixed when we update Bootstrap to a newer version.
/autoprefixer: Replace color-adjust to print-color-adjust/
];

// Update PostCSS options to handle the color-adjust deprecation warning
// Bootstrap 4.x uses the 'color-adjust' property in its CSS, which is now deprecated
// in favor of 'print-color-adjust' in newer browser versions
const cssRules = config.module.rules.find(rule => rule.oneOf).oneOf;
const cssLoaders = cssRules.filter(rule =>
rule.use && Array.isArray(rule.use) &&
rule.use.find(loader => loader.loader && loader.loader.includes('postcss-loader'))
);

cssLoaders.forEach(rule => {
const postcssLoader = rule.use.find(loader => loader.loader && loader.loader.includes('postcss-loader'));
if (postcssLoader && postcssLoader.options && postcssLoader.options.postcssOptions) {
postcssLoader.options.postcssOptions.plugins = [
require('postcss-flexbugs-fixes'),
[
require('postcss-preset-env'),
{
autoprefixer: {
// These browser targets ensure we're generating CSS compatible with
// recent browsers while avoiding generating code for obsolete ones
overrideBrowserslist: ['last 2 versions', 'not dead']
},
stage: 3
}
],
...(postcssLoader.options.postcssOptions.plugins || [])
];
}
});

// Base plugins that we always want
const basePlugins = [
...config.plugins.filter(p => !(p instanceof webpack.ProvidePlugin)),
Expand Down
Loading
Loading