Skip to content

Commit

Permalink
release: 1.2.0 (#50)
Browse files Browse the repository at this point in the history
* fix: ui modal round for large window

* refactor: color clean

* feat: add Check icon component ui

* feat: add Cross icon component ui

* refactor: use new component ui

* refactor: use Ethereum Sepolia as default chain for Dev mode

* refactor: add fake asset for sepolia testnet

* feat: enable EVM erc20 wallet to wallet transfer

* feat: add getTransactionsHistory provider function

* refactor: add component for Token network detail

* refactor: add style utilities

* refactor: use new component

* refactor: handle with debounce and warning msg

* refactor: clean styles rules

* refactor: add token alocation to desktop ui

* feat: add confirmation before send tx

* feat: Txs history implementation

* feat: add filter logic for txs

* refactor: change deploy url to dedicated subdomain

* feat: add token icon

* refactor: border radius changes

* refactor: use link to base site

* refactor: rmv welcome desktop page

* refactor: defin redirection for old entry point

* refactor: disable web page rte

* refactor: set currentSegment as default on index path

* refactor: index redirect to wallet

* refactor: use proxy for txs api

* refactor: bind filter to component

* refactor: add padding

* refactor: round percent display

* feat: Firebase web3Connect integration as auth provider & wallet connector (#49)

* feat: firebaseWeb3Connect integration

* refactor: rmv network managment and use Web3Connector

* feat: multi env implentation with services

* refactor: pools network data management

* refactor: init wallet with default chain

* refactor: implement getSigner to use DeFi features

* refactor: add tx confirmation with fees overview

* fix: use correct types

* chore: upd pkgs

* refactor: setup initializeMagicWeb3Connect() as deprecated

* feat: implement Magic migration guide

* chore: upd pkgs

* refactor: create index

* refactor: rmv switch network to display strategy

* refactor: disable non evm chain for external wallet

* fix: use correct chain ID

* fix: handle unexisting signer

* refactor: use correct icon

* feat: add backup seed

* refactor: typo

* refactor: add backup wallet option

* fix: add missing await

* refactor: rmv magic.link export option

* refactor: typo

* fix: use correct color-scheme value

* refactor: disable auth error ui msg

* refactor: clean logic & change folder

* fix(ui): disable

* fix(ui): alignement svg

* fix(ui): border alignements

* refactor: mv utils as module

* refactor: change ui btn position

* refactor: disable option

* feat: implement NFTs overview

* refactor: use light theme if enabled

* chore: patch pks version

* refactor: prevent multi initialize app

* refactor: manage networks

* fix: use correct api method

* refactor: display asset wallet allocation

* refactor: add chart multi interval data

* refactor: use chart series data

* refactor: disable load datas to test in stage mode

* refactor: use minimal auth logic to allow debug standalone

* refactor: dislpay log as alert

* refactor: try with browser resolver

* refactor: add getAdditionalUserInfo to try

* refactor: back to initial code

* chore:pkg v

* chore:pkg v

* chore:pkg v

* refactor: upd pkgs

* refactor: ui border

* refactor: enable mobile ui for browser mobile

* refactor: force reload on disconnect & clean ui

* refactor: load async data without blocking ui

* refactor: reflect type change

* chore:pkg v

* chore:pkg v

* chore:pkg v

* chore:pkg v

* feat: add AuthWithLinkContainer

* refactor: upd pkg to add ops params

* fix: rmv unexported pkg module

* fix: add missig call function

* refactor: prevent multiple initialize & set deps manualy

* refactor: enable build with success

* refactor: add session storage

* refactor: rmv redirection after auth

this cause UI issuie when user coming from standalone to authenticate

* refactor: remove loader that not be usefull

* chore: upd pkg

* refactor: change firebase config

* refactor: import wallet lib as src

* refactor: use local llib

* refactor: test with npm lib & local deps

* refactor: use local libs

* refactor: setup local backend emulator

* refactor: toggle alignement

* feat: enable earn section acces to empty user wallet

* fix: handle error & return empty value

* feat: use txs as marker on asset page

* refactor: add marker txs

* refactor: unse inline html

* refactor: rmv pwd input

* refactor: use dedicated service to manage Coin Data provider

* refactor: add provicer api key

* refactor: use provider api keys

* refactor: use env to manage emulator activation

* refactor: change rpc endpoints

* refactor: use const from workspace

* refactor: disable api if not production mode

* fix: use public method to enable initialize firebase

* refactor: expose method from connector

* refactor: use connector with exposed method

* refactor: prevent wallet creation on auth with link page

* refactor: disable state management for  auth path

* refactor: add emulators logs to ignore

* refactor: clean authentication email link workflow ui

* refactor: manage migration modal display flow

* refactor: upd collection name

* chore: Remove logs in production, excluding error logs

* refactor: disable email link auth in standalone mode

* refactor: add new assets icon

* refactor: display txs on token detail page

* refactor: only use in|out tx

* refactor: use Set() in place of Map()

* refactor: upd swaps deps

* refactor: init

* refactor: manage stte change with externalwallet

* refactor: use localforage via Ionic/Storage API

* refactor: enable switch mode with encryption

* chore: patch v

* refactor: use colorized app logo & favicon

* refactor: upd ico

* fix: set fail with undefined value

* refactor: wrap with try catch to prevent app init crahs

* refactor: add external ops to controls chart

* refactor: add chart control for mobil

* refactor: handle chart event to update price

* refactor: color lightmode

* refactor: lightmode param

* refactor: rmv reload & clean small thing

* chore: md
  • Loading branch information
FazioNico authored Jun 25, 2024
1 parent 6b8f7cb commit d94253d
Show file tree
Hide file tree
Showing 177 changed files with 18,269 additions and 7,126 deletions.
4 changes: 2 additions & 2 deletions .firebaserc
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"targets": {
"hexaonelabs": {
"hosting": {
"hexa-lite": [
"hexa-lite"
"app-hexa-lite": [
"app-hexa-lite"
]
}
}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/firebase-hosting-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
touch .env.local
echo NEXT_PUBLIC_APP_ONBOARD_APIKEY=${{ secrets.NEXT_PUBLIC_APP_ONBOARD_APIKEY }} >> .env.local
echo NEXT_PUBLIC_APP_ANKR_APIKEY=${{ secrets.NEXT_PUBLIC_APP_ANKR_APIKEY }} >> .env.local
echo NEXT_PUBLIC_APP_COINGECKO_APIKEY=${{ secrets.NEXT_PUBLIC_APP_COINGECKO_APIKEY }} >> .env.local
echo NEXT_PUBLIC_APP_VERSION=${{ steps.extract_version.outputs.version }} >> .env.local
echo NEXT_PUBLIC_APP_BUILD_DATE=${{ steps.version.outputs.builddate }} >> .env.local
echo NEXT_PUBLIC_APP_IS_PROD=true >> .env.local
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/firebase-hosting-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
touch .env.local
echo NEXT_PUBLIC_APP_ONBOARD_APIKEY=${{ secrets.NEXT_PUBLIC_APP_ONBOARD_APIKEY }} >> .env.local
echo NEXT_PUBLIC_APP_ANKR_APIKEY=${{ secrets.NEXT_PUBLIC_APP_ANKR_APIKEY }} >> .env.local
echo NEXT_PUBLIC_APP_COINGECKO_APIKEY=${{ secrets.NEXT_PUBLIC_APP_COINGECKO_APIKEY }} >> .env.local
echo NEXT_PUBLIC_APP_VERSION=${{ steps.extract_version.outputs.version }} >> .env.local
echo NEXT_PUBLIC_APP_BUILD_DATE=${{ steps.version.outputs.builddate }} >> .env.local
echo NEXT_PUBLIC_APP_IS_PROD=true >> .env.local
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ yarn-error.log*
press-paper
rfp
.firebase/
*.log
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ Hexa Lite is frictionless, secure, and reliable for everyone to use and enjoy th
- [Ethers.js](https://docs.ethers.io/v5/)
- [Ankr](https://ankr.com/)
- [LiFi](https://li.fi/)
- [Magic](https://magic.link/)
- [Chain Link](https://chain.link/)
- [Lido](https://lido.fi/)
- [Aave](https://aave.com/)
Expand All @@ -59,10 +58,7 @@ Hexa Lite is a web-based platform that can be accessed from any device with a we
Hexa Lite is deployed automatically using Github Actions. The deployment process is triggered when a new push is made to the master branch. The deployment process is managed by [Firebase Hosting](https://firebase.google.com/docs/hosting) and the project is available on [IPFS](https://ipfs.io/) using [Fleek](https://fleek.co/).

## Environment Variables
Hexa Lite uses environment variables to store sensitive data and API keys. The environment variables are stored in a .env file at the root of the project. The .env file is not commited to the repository and is ignored by Git. The .env file must be created manually and the environment variables must be provided by the user. The .env file must contain the following environment variables:

- `REACT_APP_ONBOARD_APIKEY`: Onboard API key
- `REACT_APP_ANKR_APIKEY`: Ankr API key
Hexa Lite uses environment variables to store sensitive data and API keys. The environment variables are stored in a .env file at the root of the project. The .env file is not commited to the repository and is ignored by Git. The .env file must be created manually and the environment variables must be provided by the user. Checkout `./example.env` file for more information about the environment variables that are required.

## Contributing
Contributions are welcome and appreciated. To contribute to Hexa Lite, please fork the repository, create a new branch and submit a pull request. For major changes, please open an issue first to discuss what you would like to change.
Expand Down
58 changes: 58 additions & 0 deletions environment.d.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,71 @@
declare namespace NodeJS {
export interface ProcessEnv {
/**
* API Key for the Onboard API
* @deprecated
*/
readonly NEXT_PUBLIC_APP_ONBOARD_APIKEY: string;

/**
* API Key for the Ankr API
* @description Use this key to access the Ankr API
* to get user EVM Assets List
*/
readonly NEXT_PUBLIC_APP_ANKR_APIKEY: string;

/**
* APP Version
*/
readonly NEXT_PUBLIC_APP_VERSION: string;

/**
* APP Build Date
*/
readonly NEXT_PUBLIC_APP_BUILD_DATE: string;

/**
* APP Environment Production enabled
*/
readonly NEXT_PUBLIC_APP_IS_PROD: string;

/**
* APP Environment is Offline.
* @description This is used for development purposes.
* If this is enabled, the app will not make any API calls and
* will use the mock data instead.
*/
readonly NEXT_PUBLIC_APP_IS_LOCAL: string;

/**
* API Key for the Zerion API
* @description Use this key to access the Zerion API
* to get User EVM Wallet History transactions
*/
readonly NEXT_PUBLIC_APP_ZERION_APIKEY: string;

/**
* API Key for the Coingecko API
* @description Use this key to access the Coingecko API
* to get the latest token prices
*/
readonly NEXT_PUBLIC_APP_COINGECKO_APIKEY: string;

/**
* Enable/Disable Emulator for Firebase
*/
readonly NEXT_PUBLIC_ENABLE_EMULATORS: string;

/**
* FIREBASE Configurations for the Firebase SDK
* @description Following are the configurations required for the Firebase SDK
*/
readonly NEXT_PUBLIC_APP_FIREBASE_APIKEY: string;
readonly NEXT_PUBLIC_APP_FIREBASE_AUTHDOMAIN: string;
readonly NEXT_PUBLIC_APP_FIREBASE_PROJECTID: string;
readonly NEXT_PUBLIC_APP_FIREBASE_STORAGEBUCKET: string;
readonly NEXT_PUBLIC_APP_FIREBASE_MESSAGINGSENDERID: string;
readonly NEXT_PUBLIC_APP_FIREBASE_APPID: string;
readonly NEXT_PUBLIC_APP_FIREBASE_DATABASEURL: string;

}
}
18 changes: 18 additions & 0 deletions example.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
NEXT_PUBLIC_APP_ONBOARD_APIKEY=
NEXT_PUBLIC_APP_ANKR_APIKEY=
NEXT_PUBLIC_APP_ZERION_APIKEY=
NEXT_PUBLIC_APP_COINGECKO_APIKEY=
NEXT_PUBLIC_APP_VERSION=
NEXT_PUBLIC_APP_BUILD_DATE=
NEXT_PUBLIC_APP_IS_PROD=
NEXT_PUBLIC_APP_IS_LOCAL=
NEXT_PUBLIC_ENABLE_EMULATORS=

NEXT_PUBLIC_APP_FIREBASE_APIKEY=
NEXT_PUBLIC_APP_FIREBASE_AUTHDOMAIN=
NEXT_PUBLIC_APP_FIREBASE_PROJECTID=
NEXT_PUBLIC_APP_FIREBASE_STORAGEBUCKET=
NEXT_PUBLIC_APP_FIREBASE_MESSAGINGSENDERID=
NEXT_PUBLIC_APP_FIREBASE_APPID=
NEXT_PUBLIC_APP_FIREBASE_DATABASEURL=

37 changes: 30 additions & 7 deletions firebase.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
// Import the functions you need from the SDKs you need
import { initializeApp } from "firebase/app";
import { getDatabase } from "firebase/database";
import { FirebaseApp, getApps, initializeApp } from "firebase/app";
import {
Auth,
browserPopupRedirectResolver,
indexedDBLocalPersistence,
initializeAuth,
browserLocalPersistence,
browserSessionPersistence,
getAuth,
connectAuthEmulator,
} from "firebase/auth";
import { Database, connectDatabaseEmulator, getDatabase } from "firebase/database";
// TODO: Add SDKs for Firebase products that you want to use
// https://firebase.google.com/docs/web/setup#available-libraries

Expand All @@ -15,10 +25,23 @@ const firebaseConfig = {
databaseURL: process.env.NEXT_PUBLIC_APP_FIREBASE_DATABASEURL,
};

// Initialize Firebase
const app = initializeApp(firebaseConfig);
let _app!: FirebaseApp;
let _auth!: Auth;
let _database!: Database;

// Initialize Realtime Database and get a reference to the service
const database = getDatabase(app);
if (!getApps().length) {
// Initialize Firebase
_app = initializeApp(firebaseConfig, 'hexa-lite');
// Initialize Realtime Database and get a reference to the service
_database = getDatabase(_app);
// Initialize Auth
_auth = getAuth(_app);
// Emulator setup
if (process.env.NEXT_PUBLIC_ENABLE_EMULATORS === 'true') {
connectDatabaseEmulator(_database, 'localhost', 9000);
connectAuthEmulator(_auth, 'http://127.0.0.1:9099');
}
}

export { database }
export const database = _database;
export const auth = _auth;
15 changes: 14 additions & 1 deletion firebase.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"hosting": {
"target": "hexa-lite",
"target": "app-hexa-lite",
"public": "build",
"ignore": [
"firebase.json",
Expand All @@ -13,5 +13,18 @@
"destination": "/index.html"
}
]
},
"emulators": {
"auth": {
"port": 9099
},
"database": {
"port": 9000
},
"ui": {
"enabled": true,
"port": 9001
},
"singleProjectMode": true
}
}
4 changes: 4 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,8 @@ module.exports = {
'@lifi/wallet-management',
'@0xsquid/widget'
],
compiler: {
// Remove console logs only in production, excluding error logs
removeConsole: process.env.NODE_ENV === "production" ? { exclude: ["error"] } : false
}
}
Loading

0 comments on commit d94253d

Please sign in to comment.