Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
cd8f784
master
XJuanCarlosXD Oct 2, 2025
4c51917
master
XJuanCarlosXD Oct 2, 2025
2932674
master
XJuanCarlosXD Oct 3, 2025
aace1d0
- Refactor hook `useBalanceHistory` to optimize query mechanism and i…
ECHOAD Oct 7, 2025
9532e62
- Refactored `RecentTransactionsCard` to improve transaction mapping,…
ECHOAD Oct 9, 2025
9f73d19
- Refactored and restructured components by introducing `StatsCards`,…
ECHOAD Oct 16, 2025
2cf7ac1
Refactor AccountsProvider and RecentTransactionsCard for improved per…
ECHOAD Oct 17, 2025
32ddb9d
Enhance action UI and validation handling with advanced forms, confir…
ECHOAD Oct 17, 2025
99d470b
Introduce toast notification system with manifest integration and mod…
ECHOAD Oct 20, 2025
8f4b4fc
Add `tableSelect` field type with support for dynamic rendering, enha…
ECHOAD Oct 21, 2025
0836167
Refactor and enhance core components with expanded UI capabilities an…
ECHOAD Nov 3, 2025
361612c
Add new field components and enhance existing ones for improved form …
ECHOAD Nov 7, 2025
984d26d
Add new field components and enhance existing ones for improved form …
ECHOAD Nov 7, 2025
075f681
Expand and refactor core form handling, templating utilities, and val…
ECHOAD Nov 9, 2025
a31cb10
Enhance transaction handling and UI components; add fundsWay mapping …
ECHOAD Nov 11, 2025
0ace027
Enhance UI components and add new hooks; update ToastProvider for bet…
ECHOAD Nov 13, 2025
5ca17ef
Enhance UI components and add new hooks; update ToastProvider for bet…
ECHOAD Nov 13, 2025
97a2b1d
Enhance UI components and add new hooks; update ToastProvider for bet…
ECHOAD Nov 14, 2025
0ae0f4c
Enhance UI components and add new hooks; update ToastProvider for bet…
ECHOAD Nov 14, 2025
737b24d
Refactor percentage calculations and improve UI readability; consolid…
ECHOAD Nov 14, 2025
8ce1804
Add wallet-new project and config updates
ECHOAD Nov 14, 2025
7a31904
Update netifly.toml
ECHOAD Nov 14, 2025
16f1a53
Refactor wallet-new to DS fetchers and single-node
ECHOAD Nov 14, 2025
d4f5f88
Add new wallet build process and update configurations; include new w…
ECHOAD Nov 14, 2025
e5e4319
Refactor wallet web UI and key management
ECHOAD Nov 14, 2025
ea3a2d6
Merge remote-tracking branch 'canopy-origin/main' into feature/walllet
ECHOAD Nov 14, 2025
76012b9
Add New Wallet ports to Node-1 and Node-2
ECHOAD Nov 17, 2025
cf566b7
Add New Wallet ports to Node-1 and Node-2
ECHOAD Nov 17, 2025
f17c3a7
Refactor staking components and tidy manifest
ECHOAD Nov 17, 2025
6a0962d
feat: enhance wallet action modal with prefilled data and improve res…
ECHOAD Nov 18, 2025
6f32d2f
refactor: remove debug logging for validator action mapper
ECHOAD Nov 18, 2025
c0c3509
Swap WalletPort and WalletNewPort values
ECHOAD Nov 18, 2025
8980661
Swap Wallet and New Wallet default ports
ECHOAD Nov 18, 2025
a89880b
Merge branch 'feature/wallet' of https://github.com/canopy-network/ca…
ECHOAD Nov 18, 2025
6b514aa
refactor: consolidate wallet directory structure and remove new walle…
ECHOAD Nov 18, 2025
b377a36
refactor: consolidate wallet directory structure and remove new walle…
ECHOAD Nov 18, 2025
8e0fcae
fix: set base path for Vite configuration
ECHOAD Nov 18, 2025
c354c75
fix: use relative paths in wallet-new for production deployment
ECHOAD Nov 18, 2025
44170a1
docs: add wallet deployment debugging guide and improve vite config
ECHOAD Nov 18, 2025
054e521
fix: configure Vite base path for production deployment
ECHOAD Nov 19, 2025
f73a3f4
feat: add environment-based base path configuration for wallet
ECHOAD Nov 19, 2025
76e9a13
docs: enhance README with detailed features and architecture overview…
ECHOAD Nov 19, 2025
54f8b61
fix: adjust Vite base path handling for development and production en…
ECHOAD Nov 19, 2025
7f6d222
fix: update favicon link path to ensure correct loading
ECHOAD Nov 19, 2025
7d7d733
fix: use BASE_URL for plugin path to respect deployment base path
ECHOAD Nov 19, 2025
231ef63
fix: add VITE_BASE_URL to .env.example and update BASE_URL fallback i…
ECHOAD Nov 19, 2025
2cf4a0c
fix: update RPC paths in chain.json to use relative URLs
ECHOAD Nov 19, 2025
e53a612
fix: update RPC paths in chain.json to use relative URLs
ECHOAD Nov 19, 2025
6e7c658
fix: adjust BASE_URL handling for Traefik deployment and update manif…
ECHOAD Nov 20, 2025
f691026
Merge branch 'refs/heads/main' into feature/wallet
ECHOAD Nov 26, 2025
33caef6
feat: Introduce new wallet application with deployment documentation,…
ECHOAD Nov 27, 2025
b7b3cf4
feat: Add new web wallet UI with Vite build, deployment configuration…
ECHOAD Nov 27, 2025
39f1285
Merge branch 'feature/wallet' of https://github.com/canopy-network/ca…
ECHOAD Nov 27, 2025
7981557
feat: Add new wallet frontend with action forms, prefilled field mana…
ECHOAD Nov 28, 2025
c9ac976
Merge remote-tracking branch 'origin/main' into feature/wallet
ECHOAD Jan 2, 2026
6b18a8c
feat: Add new keystore APIs to chain.json and update dependencies wit…
ECHOAD Jan 2, 2026
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
1 change: 1 addition & 0 deletions .docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ WORKDIR /go/src/github.com/canopy-network/canopy
COPY . /go/src/github.com/canopy-network/canopy

RUN make build/wallet
RUN make build/new-wallet
RUN make build/explorer
RUN go build -a -o bin ./cmd/main/...

Expand Down
24 changes: 12 additions & 12 deletions .docker/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@ services:
- 50001:50001 # Explorer
- 50002:50002 # RPC
- 50003:50003 # Admin RPC
- 9001:9001 # TCP P2P
- 6060:6060 # Debug
- 9090:9090 # Metrics
- 9001:9001 # TCP P2P
- 6060:6060 # Debug
- 9090:9090 # Metrics
networks:
- canopy
command: ["start"]
volumes:
- ./volumes/node_1:/root/.canopy
# deploy:
# resources:
# limits:
# memory: 2G
# cpus: "1.0"
# deploy:
# resources:
# limits:
# memory: 2G
# cpus: "1.0"

node-2:
container_name: node-2
Expand All @@ -33,9 +33,9 @@ services:
- 40001:40001 # Explorer
- 40002:40002 # RPC
- 40003:40003 # Admin RPC
- 9002:9002 # TCP P2P
- 6061:6060 # Debug
- 9091:9091 # Metrics
- 9002:9002 # TCP P2P
- 6061:6060 # Debug
- 9091:9091 # Metrics
networks:
- canopy
command: ["start"]
Expand Down Expand Up @@ -72,4 +72,4 @@ services:

networks:
canopy:
driver: bridge
driver: bridge
32 changes: 32 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
FROM golang:1.24-alpine AS builder

RUN apk update && apk add --no-cache make bash nodejs npm

ARG BIN_PATH

WORKDIR /go/src/github.com/canopy-network/canopy
COPY . /go/src/github.com/canopy-network/canopy

RUN make build/wallet
RUN make build/explorer
RUN CGO_ENABLED=0 GOOS=linux go build -a -o bin ./cmd/auto-update/.

# Only build if the file at ${BIN_PATH} doesn't already exist
RUN if [ ! -f "${BIN_PATH}" ]; then \
echo "File ${BIN_PATH} not found. Building it..."; \
CGO_ENABLED=0 GOOS=linux go build -a -o "${BIN_PATH}" ./cmd/main/...; \
else \
echo "File ${BIN_PATH} already exists. Skipping build."; \
fi

FROM alpine:3.19

RUN apk add --no-cache pigz ca-certificates

ARG BIN_PATH

WORKDIR /app
COPY --from=builder /go/src/github.com/canopy-network/canopy/bin ./
COPY --from=builder /go/src/github.com/canopy-network/canopy/${BIN_PATH} ${BIN_PATH}
RUN chmod +x ${BIN_PATH}
ENTRYPOINT ["/app/bin"]
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Variables
GO_BIN_DIR := ~/go/bin
CLI_DIR := ./cmd/main/...
WALLET_DIR := ./cmd/rpc/web/wallet
WALLET_DIR := ./cmd/rpc/web/wallet-new
EXPLORER_DIR := ./cmd/rpc/web/explorer
DOCKER_DIR := ./.docker/compose.yaml

Expand Down Expand Up @@ -34,6 +34,9 @@ build/canopy-full: build/wallet build/explorer build/canopy
build/wallet:
npm install --prefix $(WALLET_DIR) && npm run build --prefix $(WALLET_DIR)

## build/new-wallet: alias for build/wallet (for backward compatibility)
build/new-wallet: build/wallet

## build/explorer: build the canopy's explorer project
build/explorer:
npm install --prefix $(EXPLORER_DIR) && npm run build --prefix $(EXPLORER_DIR)
Expand Down
51 changes: 36 additions & 15 deletions cmd/rpc/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const (
ContentType = "Content-MessageType"
ApplicationJSON = "application/json; charset=utf-8"

walletStaticDir = "web/wallet/out"
walletStaticDir = "web/wallet-new/out"
explorerStaticDir = "web/explorer/out"
)

Expand Down Expand Up @@ -305,10 +305,10 @@ func (h logHandler) Handle(resp http.ResponseWriter, req *http.Request, p httpro
//go:embed all:web/explorer/out
var explorerFS embed.FS

//go:embed all:web/wallet/out
//go:embed all:web/wallet-new/out
var walletFS embed.FS

// runStaticFileServer creates a web server serving static files
// runStaticFileServer creates a web server serving static files with SPA fallback
func (s *Server) runStaticFileServer(fileSys fs.FS, dir, port string, conf lib.Config) {
// Attempt to get a sub-filesystem rooted at the specified directory
distFS, err := fs.Sub(fileSys, dir)
Expand All @@ -322,20 +322,13 @@ func (s *Server) runStaticFileServer(fileSys fs.FS, dir, port string, conf lib.C

// Define a handler function for the root path
mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
// serve `index.html` with dynamic config injection
if r.URL.Path == "/" || r.URL.Path == "/index.html" {
requestedPath := r.URL.Path

// Helper function to serve index.html with config injection
serveIndexHTML := func() {
// Construct the file path for `index.html`
filePath := path.Join(dir, "index.html")

// Open the file and defer closing until the function exits
data, e := fileSys.Open(filePath)
if e != nil {
http.NotFound(w, r)
return
}
defer data.Close()

// Read the content of `index.html` into a byte slice
htmlBytes, e := fs.ReadFile(fileSys, filePath)
if e != nil {
Expand All @@ -350,11 +343,39 @@ func (s *Server) runStaticFileServer(fileSys fs.FS, dir, port string, conf lib.C
w.Header().Set("Content-Type", "text/html")
w.WriteHeader(http.StatusOK)
w.Write([]byte(injectedHTML))
}

// Serve index.html for root path
if requestedPath == "/" || requestedPath == "/index.html" {
serveIndexHTML()
return
}

// Check if the requested path has a file extension (indicates static asset)
// Common static asset extensions: .js, .css, .svg, .png, .jpg, .jpeg, .gif, .ico, .woff, .woff2, .ttf, .eot, .map
ext := path.Ext(requestedPath)
isStaticAsset := ext != ""

if isStaticAsset {
// Try to serve the static asset from the file system
// Remove leading slash for fs.Open
assetPath := strings.TrimPrefix(requestedPath, "/")

// Check if the file exists in the embedded filesystem
if _, err := distFS.Open(assetPath); err == nil {
// File exists, serve it
http.FileServer(http.FS(distFS)).ServeHTTP(w, r)
return
}

// Static asset not found, return 404
http.NotFound(w, r)
return
}

// For all other requests, serve the files directly from the file system
http.FileServer(http.FS(distFS)).ServeHTTP(w, r)
// For all other requests (no file extension = HTML navigation),
// serve index.html to enable SPA client-side routing
serveIndexHTML()
})

// Start the HTTP server in a new goroutine and listen on the specified port
Expand Down
16 changes: 16 additions & 0 deletions cmd/rpc/web/wallet-new/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Vite Base Path Configuration
# This sets the base URL path for the application in production builds
#
# Examples:
# - For deployment at https://example.com/wallet/ use: VITE_BASE_PATH=/wallet/
# - For deployment at https://wallet.example.com/ use: VITE_BASE_PATH=/
# - For deployment at root domain use: VITE_BASE_PATH=/
#
# Default: /wallet/
VITE_BASE_PATH=/wallet/
VITE_BASE_URL=/wallet

# Node Environment
# Options: development | production
# Default: development
VITE_NODE_ENV=development
10 changes: 10 additions & 0 deletions cmd/rpc/web/wallet-new/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
node_modules
out
vite.config.ts.*
.idea
dist
*.tsbuildinfo

# Compiled JS files (TypeScript generates these)
src/**/*.js
src/**/*.jsx
Loading
Loading