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

test(extension): initial tests for sanchonet #770

Draft
wants to merge 25 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
d35778d
chore/Bump cardano-js-sdk (#559)
lgobbi-atix Oct 11, 2023
7914ecf
[LW-7983] [LW-7984] dRep confirmation screens (#554)
Oct 24, 2023
5b5d96b
feat(extension): [LW-7984] voting procedures (#655)
renanvalentin Oct 24, 2023
e5f30b6
[LW-8491] Voting delegation confirmation (#648)
Oct 24, 2023
fc0ba66
chore: modify sanchonet urls (#667)
mchappell Oct 25, 2023
a8918c8
feat: drep update certificate signing (#664)
Nov 1, 2023
e4641e1
fix(extension): updated padding and missing bech32 addressing
mchappell Nov 7, 2023
481b966
fix: no explorer for sanchonet
mchappell Nov 14, 2023
dbf9ded
chore(extension): add unit tests for dapp/confirm-tx (#743)
vetalcore Nov 23, 2023
56cdc4f
fix: update drep id casing
mchappell Nov 24, 2023
cab3760
fix: update title translations for cip95 popups
mchappell Nov 24, 2023
9b192a8
fix(extension): [LW-9163] nullish check on existence of stakeKeyDepos…
mchappell Nov 24, 2023
41bdb55
Merge branch 'main' into feat/sanchonet
mchappell Nov 24, 2023
93e6cbb
fix: e2e no unresolved imports
mchappell Nov 24, 2023
3c3aae7
chore(extension): resolve pr comments (#748)
vetalcore Nov 27, 2023
6de1ebe
fix(extension): translation keys casing and unit tests (#756)
przemyslaw-wlodek Nov 28, 2023
fcc660f
chore(all): exclude stories and tests from the rollup builds (#752)
przemyslaw-wlodek Nov 28, 2023
5b81b19
Chore/update for sdk conway era (#734)
mirceahasegan Nov 29, 2023
049fd31
Revert "Chore/update for sdk conway era (#734)" (#767)
przemyslaw-wlodek Nov 30, 2023
595aafe
test(extension): add test ids for governance actions (#765)
wklos-iohk Nov 30, 2023
1bc62f0
Merge main into feat/sanchonet (#763)
przemyslaw-wlodek Dec 1, 2023
f95077f
Merge remote-tracking branch 'origin/main' into feat/sanchonet
przemyslaw-wlodek Dec 1, 2023
3a1ba18
test(extension): add POMs and assertions for basic governance functions
wklos-iohk Dec 4, 2023
1b4933d
Merge branch 'feat/sanchonet' into test/sanchonet-initial-tests
wklos-iohk Dec 5, 2023
65b765a
test(extension): add new steps for governance actions
wklos-iohk Dec 6, 2023
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
run: yarn lint
- name: Run unit tests, generate test coverage report
env:
AVAILABLE_CHAINS: 'Preprod,Preview,Mainnet'
AVAILABLE_CHAINS: 'Preprod,Preview,Mainnet,Sanchonet'
DEFAULT_CHAIN: 'Preprod'
run: yarn test:coverage --maxWorkers=2
- name: Upload build
Expand Down
7 changes: 6 additions & 1 deletion apps/browser-extension-wallet/.env.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -58,22 +58,27 @@ PRODUCTION_MODE_TRACKING=false
POSTHOG_DEV_TOKEN_MAINNET=phc_gH96Lx5lEVXTTWEyytSdTFPDk3Xsxwi4BqG88mKObd1
POSTHOG_DEV_TOKEN_PREPROD=phc_Xlmldm6EYSfQVgB9Uxm3b2xC1noDlgFFXpF9AJ6SMfJ
POSTHOG_DEV_TOKEN_PREVIEW=phc_e8SaOOWpXpNE59TnpLumeUjWm4iv024AWjhQqU406jr
POSTHOG_DEV_TOKEN_SANCHONET=phc_OUu6sPucDu5S6skRmYbWN5Jn8TpggWTQu1Y1ETkm3xt

# Cardano Services
CARDANO_SERVICES_URL_MAINNET=https://backend.live-mainnet.eks.lw.iog.io
CARDANO_SERVICES_URL_PREPROD=https://backend.live-preprod.eks.lw.iog.io
CARDANO_SERVICES_URL_PREVIEW=https://backend.live-preview.eks.lw.iog.io
# TODO: update this with a valid sanchonet url
CARDANO_SERVICES_URL_SANCHONET=https://backend.dev-sanchonet.eks.lw.iog.io

# Explorer URLs
CEXPLORER_URL_MAINNET=https://cexplorer.io
CEXPLORER_URL_PREVIEW=https://preview.cexplorer.io
CEXPLORER_URL_PREPROD=https://preprod.cexplorer.io
CEXPLORER_URL_SANCHONET=https://sanchonet.cexplorer.io
CEXPLORER_URL_SANCHONET=

# ADA Handle URLs
ADA_HANDLE_URL_MAINNET=https://api.handle.me
ADA_HANDLE_URL_PREVIEW=https://preview.api.handle.me
ADA_HANDLE_URL_PREPROD=https://preprod.api.handle.me
# TODO: update this with a valid sanchonet url
ADA_HANDLE_URL_SANCHONET=

# Manifest.json
LACE_EXTENSION_KEY=gafhhkghbfjjkeiendhlofajokpaflmk
Expand Down
9 changes: 7 additions & 2 deletions apps/browser-extension-wallet/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ DEFAULT_CHAIN=Mainnet
WALLET_SYNC_TIMEOUT_IN_SEC=60
WALLET_INTERVAL_IN_SEC=30
DROP_CONSOLE_IN_PRODUCTION=false
AVAILABLE_CHAINS=Preprod,Preview,Mainnet
AVAILABLE_CHAINS=Preprod,Preview,Mainnet,Sanchonet
ADA_PRICE_POLLING_IN_SEC=60
TOKEN_PRICE_POLLING_IN_SEC=300
SAVED_PRICE_DURATION_IN_MINUTES=720
Expand Down Expand Up @@ -64,17 +64,22 @@ POSTHOG_DEV_TOKEN_PREVIEW=dev-preview-token
CARDANO_SERVICES_URL_MAINNET=https://backend.live-mainnet.eks.lw.iog.io
CARDANO_SERVICES_URL_PREPROD=https://backend.live-preprod.eks.lw.iog.io
CARDANO_SERVICES_URL_PREVIEW=https://backend.live-preview.eks.lw.iog.io
# TODO: update this with a valid sanchonet url
CARDANO_SERVICES_URL_SANCHONET=https://backend.dev-sanchonet.eks.lw.iog.io

# Explorer URLs
CEXPLORER_URL_MAINNET=https://cexplorer.io
CEXPLORER_URL_PREVIEW=https://preview.cexplorer.io
CEXPLORER_URL_PREPROD=https://preprod.cexplorer.io
CEXPLORER_URL_TESTNET=https://testnet.cexplorer.io
# TODO: update this with a valid sanchonet cexplorer
CEXPLORER_URL_SANCHONET=https://preprod.cexplorer.io

# ADA Handle URLs
ADA_HANDLE_URL_MAINNET=https://api.handle.me
ADA_HANDLE_URL_PREVIEW=https://preview.api.handle.me
ADA_HANDLE_URL_PREPROD=https://preprod.api.handle.me
# TODO: update this with a valid sanchonet url
ADA_HANDLE_URL_SANCHONET=https://preprod.api.handle.me

# Manifest.json
LACE_EXTENSION_KEY=gafhhkghbfjjkeiendhlofajokpaflmk
9 changes: 6 additions & 3 deletions apps/browser-extension-wallet/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export type Config = {
ADA_PRICE_CHECK_INTERVAL: number;
TOKEN_PRICE_CHECK_INTERVAL: number;
AVAILABLE_CHAINS: Wallet.ChainName[];
CEXPLORER_BASE_URL: Record<EnvironmentTypes, string>;
CEXPLORER_BASE_URL: Record<Exclude<EnvironmentTypes, 'Sanchonet'>, string>;
CEXPLORER_URL_PATHS: CExplorerUrlPaths;
SAVED_PRICE_DURATION: number;
};
Expand All @@ -32,11 +32,13 @@ const envChecks = (chosenChain: Wallet.ChainName): void => {
if (
!process.env.CARDANO_SERVICES_URL_MAINNET ||
!process.env.CARDANO_SERVICES_URL_PREPROD ||
!process.env.CARDANO_SERVICES_URL_PREVIEW
!process.env.CARDANO_SERVICES_URL_PREVIEW ||
!process.env.CARDANO_SERVICES_URL_SANCHONET
) {
throw new Error('env vars not complete');
}

// TODO Update if sanchonet explorer becomes available
if (!process.env.CEXPLORER_URL_MAINNET || !process.env.CEXPLORER_URL_PREVIEW || !process.env.CEXPLORER_URL_PREPROD) {
throw new Error('explorer vars not complete');
}
Expand Down Expand Up @@ -78,7 +80,8 @@ export const config = (): Config => {
CARDANO_SERVICES_URLS: {
Mainnet: process.env.CARDANO_SERVICES_URL_MAINNET,
Preprod: process.env.CARDANO_SERVICES_URL_PREPROD,
Preview: process.env.CARDANO_SERVICES_URL_PREVIEW
Preview: process.env.CARDANO_SERVICES_URL_PREVIEW,
Sanchonet: process.env.CARDANO_SERVICES_URL_SANCHONET
},
CEXPLORER_BASE_URL: {
Mainnet: `${process.env.CEXPLORER_URL_MAINNET}`,
Expand Down
5 changes: 4 additions & 1 deletion apps/browser-extension-wallet/src/dapp-connector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
} from '@providers';
import { HashRouter } from 'react-router-dom';
import { ThemeProvider } from '@providers/ThemeProvider';
import { UIThemeProvider } from '@providers/UIThemeProvider';
import { BackgroundServiceAPIProvider } from '@providers/BackgroundServiceAPI';
import { APP_MODE_POPUP } from './utils/constants';
import { PostHogClientProvider } from '@providers/PostHogClientProvider';
Expand All @@ -34,7 +35,9 @@ const App = (): React.ReactElement => (
<AnalyticsProvider>
<ThemeProvider>
<AddressesDiscoveryOverlay>
<DappConnectorView />
<UIThemeProvider>
<DappConnectorView />
</UIThemeProvider>
</AddressesDiscoveryOverlay>
</ThemeProvider>
</AnalyticsProvider>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ export type AddressRecordParams = Pick<AddressBookSchema, 'address' | 'name' | '
export const cardanoNetworkMap: { [key in Wallet.ChainName]: Wallet.Cardano.NetworkMagics } = {
Mainnet: Wallet.Cardano.NetworkMagics.Mainnet,
Preprod: Wallet.Cardano.NetworkMagics.Preprod,
Preview: Wallet.Cardano.NetworkMagics.Preview
Preview: Wallet.Cardano.NetworkMagics.Preview,
Sanchonet: Wallet.Cardano.NetworkMagics.Sanchonet
};

const handleRecordValidation = (list: AddressBookSchema[], record: AddressRecordParams) => {
Expand Down
Loading