Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions .editorconfig
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,7 @@ trim_trailing_whitespace = true

[*.{sh,bash}]
end_of_line = lf

[*.md]
max_line_length = off
trim_trailing_whitespace = false
19 changes: 19 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
VITE_IS_EMBEDDED_APP=1
VITE_TRANSAK_API_KEY=""
VITE_DEV_DEFAULT_EMBEDDED_CLIENT_ID="FREE_TRIAL"
VITE_DEV_DEFAULT_EMBEDDED_SERVER_BASE_URL="http://localhost:3001"
VITE_PROD_DEFAULT_EMBEDDED_CLIENT_ID="FREE_TRIAL"
VITE_PROD_EMBEDDED_SERVER_BASE_URL="https://connect-api.wander.app"
VITE_TEST_DEFAULT_EMBEDDED_CLIENT_ID="test"
VITE_TEST_DEFAULT_EMBEDDED_SERVER_BASE_URL="https://test.com"

# Temp. Will be removed once activation is done on wallet usage and we implement AES challenges.
VITE_SKIP_RSA_PRIVATE_KEY_DERIVATION=1

# DEVELOPMENT
VITE_SUPABASE_URL="https://pboorlggoqpyiucxmneq.supabase.co"
VITE_SUPABASE_ANON_KEY="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InBib29ybGdnb3FweWl1Y3htbmVxIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Mzk5ODM5NTgsImV4cCI6MjA1NTU1OTk1OH0.c-9_9AbNHgdUUhEcslNRIXuqADgLoJT_ZVhZiII3_Oo"

# PRODUCTION
# VITE_SUPABASE_URL=""
# VITE_SUPABASE_ANON_KEY=""
49 changes: 49 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: CI

on:
push:
branches:
- main
pull_request:

permissions:
actions: read
contents: read

jobs:
main:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
filter: tree:0
fetch-depth: 0

- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 9.8.0
run_install: false

# This enables task distribution via Nx Cloud
# Run this command as early as possible, before dependencies are installed
# Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun
# Uncomment this line to enable task distribution
# - run: pnpm dlx nx start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="e2e-ci"

# Cache node_modules
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'

- run: pnpm install --frozen-lockfile
- run: pnpm exec playwright install --with-deps

# Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud
# - run: pnpm exec nx-cloud record -- echo Hello World
# When you enable task distribution, run the e2e-ci task instead of e2e
- run: pnpm exec nx run-many -t lint test build typecheck e2e
# Nx Cloud recommends fixes for failures to help you get CI green faster. Learn more: https://nx.dev/ci/features/self-healing-ci
- run: pnpm exec nx fix-ci
if: always()
83 changes: 42 additions & 41 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,47 +1,48 @@
# See https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files for more about ignoring files.

# compiled output
dist
tmp
out-tsc

# dependencies
node_modules
/.pnp
.pnp.js

# testing
/coverage

#cache
.turbo
.next
.vercel
# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

# misc
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings

# System Files
.DS_Store
*.pem
.vscode

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*


# Exclude all .env files
.env
.env*
# Except for .env.example
!.env.example

out/
build/
dist/
sdk-dist
wander-connect-sdk/wallet-api-dist/
# plasmo - https://www.plasmo.com
.plasmo

# bpp - http://bpp.browser.market/
keys.json

# typescript
.tsbuildinfo

# temporary remove development icon
assets/icon.development.png
Thumbs.db

.nx/cache
.nx/workspace-data
.cursor/rules/nx-rules.mdc
.github/instructions/nx.instructions.md

vite.config.*.timestamp*
vitest.config.*.timestamp*
test-output
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
strict-peer-dependencies=false
auto-install-peers=true
2 changes: 2 additions & 0 deletions .nxignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.old
.old-already-moved
16 changes: 16 additions & 0 deletions .old-already-moved/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.{sh,bash}]
end_of_line = lf
19 changes: 19 additions & 0 deletions .old-already-moved/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
VITE_IS_EMBEDDED_APP=1
VITE_TRANSAK_API_KEY=""
VITE_DEV_DEFAULT_EMBEDDED_CLIENT_ID="FREE_TRIAL"
VITE_DEV_DEFAULT_EMBEDDED_SERVER_BASE_URL="http://localhost:3001"
VITE_PROD_DEFAULT_EMBEDDED_CLIENT_ID="FREE_TRIAL"
VITE_PROD_EMBEDDED_SERVER_BASE_URL="https://connect-api.wander.app"
VITE_TEST_DEFAULT_EMBEDDED_CLIENT_ID="test"
VITE_TEST_DEFAULT_EMBEDDED_SERVER_BASE_URL="https://test.com"

# Temp. Will be removed once activation is done on wallet usage and we implement AES challenges.
VITE_SKIP_RSA_PRIVATE_KEY_DERIVATION=1

# DEVELOPMENT
VITE_SUPABASE_URL="https://pboorlggoqpyiucxmneq.supabase.co"
VITE_SUPABASE_ANON_KEY="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InBib29ybGdnb3FweWl1Y3htbmVxIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Mzk5ODM5NTgsImV4cCI6MjA1NTU1OTk1OH0.c-9_9AbNHgdUUhEcslNRIXuqADgLoJT_ZVhZiII3_Oo"

# PRODUCTION
# VITE_SUPABASE_URL=""
# VITE_SUPABASE_ANON_KEY=""
16 changes: 16 additions & 0 deletions .old-already-moved/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
VITE_IS_EMBEDDED_APP=1
VITE_TRANSAK_API_KEY=""
VITE_DEV_DEFAULT_EMBEDDED_CLIENT_ID="FREE_TRIAL"
VITE_DEV_DEFAULT_EMBEDDED_SERVER_BASE_URL="http://localhost:3001"
VITE_PROD_DEFAULT_EMBEDDED_CLIENT_ID="FREE_TRIAL"
VITE_PROD_EMBEDDED_SERVER_BASE_URL="https://connect-api.wander.app"
VITE_TEST_DEFAULT_EMBEDDED_CLIENT_ID="test"
VITE_TEST_DEFAULT_EMBEDDED_SERVER_BASE_URL="https://test.com"

# DEVELOPMENT
VITE_SUPABASE_URL=""
VITE_SUPABASE_ANON_KEY=""

# PRODUCTION
# VITE_SUPABASE_URL=""
# VITE_SUPABASE_ANON_KEY=""
5 changes: 5 additions & 0 deletions .old-already-moved/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules
build
.plasmo
assets
.husky
6 changes: 6 additions & 0 deletions .old-already-moved/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"printWidth": 120,
"trailingComma": "all",
"bracketSameLine": true,
"proseWrap": "always"
}
21 changes: 21 additions & 0 deletions .old-already-moved/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022 th8ta

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
AO_SENT_QUERY,
AR_RECEIVER_QUERY,
AR_SENT_QUERY,
} from "~notifications/utils";
} from "~_notifications/utils";

export async function handleNotificationsAlarm(alarm?: Alarms.Alarm) {
if (!alarm?.name.startsWith("notifications")) return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import BigNumber from "bignumber.js";
import { gql } from "~gateways/api";
import { suggestedGateways } from "~gateways/gateway";
import { checkTransferStatus } from "~lib/transactions";
import { combineAndSortTransactions, processTransactions } from "~notifications/utils";
import { combineAndSortTransactions, processTransactions } from "~_notifications/utils";
import { ExtensionStorage } from "~utils/storage";

export type RawTransaction = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { nanoid } from "nanoid";
import { foregroundModules, type ForegroundModule } from "~api/foreground/foreground-modules";
import mitt from "mitt";
import { log, LOG_GROUP } from "~utils/log/log.utils";
import { version } from "../../../package.json";
import { IS_EMBEDDED_APP } from "~utils/embedded/embedded.constants";
import { version } from "../../../../.old/package.json";
import { IS_EMBEDDED_APP } from "~utils/_embedded/embedded.constants";
import { isApiErrorResponse } from "~utils/messaging/common/messaging.utils";
import { isomorphicSendMessage } from "~isomorphic-messaging";
import { setEmbeddedTargetIframe } from "~utils/messaging/strategies/iframe/iframe-messaging.strategy";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { nanoid } from "nanoid";
import { foregroundModules, type ForegroundModule } from "~api/foreground/foreground-modules";
import mitt from "mitt";
import { log, LOG_GROUP } from "~utils/log/log.utils";
import { version } from "../../../package.json";
import { IS_EMBEDDED_APP } from "~utils/embedded/embedded.constants";
import { version } from "../../../../.old/package.json";
import { IS_EMBEDDED_APP } from "~utils/_embedded/embedded.constants";
import { isApiErrorResponse } from "~utils/messaging/common/messaging.utils";
// import { version as sdkVersion } from "../../../wander-connect-sdk/package.json";

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { updateIcon } from "~utils/icon";
import Application from "~applications/application";
import { requestUserAuthorization } from "../../../utils/auth/auth.utils";
import { getActiveAddress, getWallets, openOrSelectWelcomePage } from "~wallets";
import { postEmbeddedMessage } from "~utils/embedded/utils/messages/embedded-messages.utils";
import { postEmbeddedMessage } from "~utils/_embedded/utils/messages/embedded-messages.utils";
import { ERR_MSG_NO_WALLETS_ADDED } from "~utils/auth/auth.constants";

const background: BackgroundModuleFunction<void> = async (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import type { AppInfo } from "~applications/application";
import type { ModuleFunction } from "~api/module";
import { type Gateway } from "~gateways/gateway";
import { getAppURL } from "~utils/format";
import { IS_EMBEDDED_APP } from "~utils/embedded/embedded.constants";
import { getAppLogo } from "~utils/embedded/utils/logo/logo.utils";
import { IS_EMBEDDED_APP } from "~utils/_embedded/embedded.constants";
import { getAppLogo } from "~utils/_embedded/utils/logo/logo.utils";

const foreground: ModuleFunction<any[]> = async (
permissions: PermissionType[],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { IS_EMBEDDED_APP } from "~utils/embedded/embedded.constants";
import { version } from "../../../../package.json";
import { IS_EMBEDDED_APP } from "~utils/_embedded/embedded.constants";
import { version } from "../../../../../.old/package.json";

export interface DecodedTag {
name: string;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import styled from "styled-components";
import { IS_EMBEDDED_APP } from "~utils/embedded/embedded.constants";
import { IS_EMBEDDED_APP } from "~utils/_embedded/embedded.constants";

export const QRCodeWrapper = styled.div<{ size?: number }>`
display: flex;
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useEffect, useMemo, useState } from "react";
import { useLocation } from "~wallets/router/router.utils";
import { EMBEDDED_SERVER_BASE_URL } from "~utils/embedded/iframe.utils";
import { EMBEDDED_SERVER_BASE_URL } from "~utils/_embedded/iframe.utils";

import styles from "./EnvPanel.module.scss";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React, { useCallback, useEffect, useRef } from "react";
import { useLocation } from "~wallets/router/router.utils";
import { postEmbeddedMessage } from "~utils/embedded/utils/messages/embedded-messages.utils";
import { locationToRouteType, routeTypeToPreferredLayout } from "~utils/embedded/utils/routes/embedded-routes.utils";
import { postEmbeddedMessage } from "~utils/_embedded/utils/messages/embedded-messages.utils";
import { locationToRouteType, routeTypeToPreferredLayout } from "~utils/_embedded/utils/routes/embedded-routes.utils";

import styles from "./ResizeEventObserver.module.scss";
import { useEmbedded } from "~utils/embedded/embedded.hooks";
import { useEmbedded } from "~utils/_embedded/embedded.hooks";

export interface ResizeEventObserverProps {
containerRef: React.MutableRefObject<HTMLElement>;
Expand Down
Loading
Loading