Skip to content

Commit 3cb56ba

Browse files
authored
ci: update developer preview sanchonet build (#1419)
* ci: update developer preview sanchonet build * chore: fix md linting * ci: align dev preview workflow with ci workflow * ci: use live sanchonet url for preview build * ci: update shared build step to include sanchonet url * chore: update static feature flag toggles for dev preview build
1 parent 9007bf3 commit 3cb56ba

File tree

9 files changed

+102
-76
lines changed

9 files changed

+102
-76
lines changed

.github/shared/build/action.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ inputs:
3232
required: false
3333
default: 'https://lacewallet.banxa-sandbox.com/'
3434
CARDANO_SERVICES_URL_MAINNET:
35-
description: 'Url for mainnet env'
36-
required: false
37-
default: 'https://dev-mainnet.lw.iog.io'
35+
description: 'Url for mainnet env'
36+
required: false
37+
default: 'https://dev-mainnet.lw.iog.io'
3838
CARDANO_SERVICES_URL_PREPROD:
3939
description: 'Url for preprod env'
4040
required: false
@@ -43,6 +43,10 @@ inputs:
4343
description: 'Url for preview env'
4444
required: false
4545
default: 'https://dev-preview.lw.iog.io'
46+
CARDANO_SERVICES_URL_SANCHONET:
47+
description: 'Url for sanchonet env'
48+
required: false
49+
default: 'https://dev-sanchonet.lw.iog.io'
4650
runs:
4751
using: 'composite'
4852
steps:
@@ -100,4 +104,5 @@ runs:
100104
CARDANO_SERVICES_URL_MAINNET: ${{ inputs.CARDANO_SERVICES_URL_MAINNET }}
101105
CARDANO_SERVICES_URL_PREPROD: ${{ inputs.CARDANO_SERVICES_URL_PREPROD }}
102106
CARDANO_SERVICES_URL_PREVIEW: ${{ inputs.CARDANO_SERVICES_URL_PREVIEW }}
107+
CARDANO_SERVICES_URL_SANCHONET: ${{ inputs.CARDANO_SERVICES_URL_SANCHONET }}
103108
run: yarn browser build

.github/workflows/build-dev-preview.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,32 +5,32 @@ on:
55
jobs:
66
build:
77
name: Build + test
8-
runs-on: self-hosted
8+
runs-on: ubuntu-20.04
99
concurrency:
1010
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
1111
cancel-in-progress: true
1212
steps:
1313
- name: Checkout repository
1414
uses: actions/checkout@v4
15-
- name: Decrypt test data
16-
working-directory: ./packages/e2e-tests
17-
run: ./decrypt_secret.sh
18-
env:
19-
WALLET_1_PASSWORD: ${{ secrets.WALLET_PASSWORD_TESTNET }}
20-
- name: Build chrome stable version of Lace
15+
16+
- name: Setup Node.js and install dependencies
17+
uses: ./.github/actions/install
18+
with:
19+
WALLET_PASSWORD: ${{ secrets.WALLET_PASSWORD_TESTNET }}
20+
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
21+
22+
- name: Build dev preview version of Lace
2123
uses: ./.github/shared/build
2224
with:
2325
BUILD_DEV_PREVIEW: 'true'
2426
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
2527
LACE_EXTENSION_KEY: ${{ secrets.DEV_PREVIEW_MANIFEST_PUBLIC_KEY }}
28+
CARDANO_SERVICES_URL_SANCHONET: 'https://live-sanchonet.lw.iog.io'
2629
PRODUCTION_MODE_TRACKING: 'false'
2730
- name: Check for linter issues
2831
run: yarn lint
29-
- name: Run unit tests
30-
env:
31-
AVAILABLE_CHAINS: 'Preprod,Preview,Mainnet'
32-
DEFAULT_CHAIN: 'Preprod'
33-
run: yarn test --maxWorkers=2 --silent
32+
- name: Execute unit tests
33+
uses: ./.github/actions/test/unit
3434
- name: Upload build
3535
uses: actions/upload-artifact@v4
3636
with:

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,33 +34,33 @@ Lace depends on `@input-output-hk/lace-ui-toolkit` package, which is published f
3434
2. Select at least `read:packages` permissions to be able to download packages from GitHub Package Registry
3535
3. Create `~/.yarnrc.yml` file in your home directory and insert:
3636

37-
```
37+
```yaml
3838
npmScopes:
3939
input-output-hk:
4040
npmAlwaysAuth: true
4141
npmAuthToken: YOUR_GITHUB_PAT
42-
npmRegistryServer: "https://npm.pkg.github.com"
42+
npmRegistryServer: 'https://npm.pkg.github.com'
4343
```
4444
4545
For more details check GitHub's guide: [Authenticating with personal access token](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-npm-registry#authenticating-with-a-personal-access-token)
4646
4747
### Install dependencies
4848
49-
```
49+
```sh
5050
yarn install
5151
```
5252

5353
### Setup environment variables
5454

55-
```
55+
```sh
5656
cp ./apps/.env.defaults ./apps/.env
5757
```
5858

5959
Once `.env` files is created adjust it to your needs, and update `LACE_EXTENSION_KEY`
6060

6161
### Build packages and extension
6262

63-
```
63+
```sh
6464
yarn build
6565
```
6666

@@ -73,7 +73,7 @@ yarn build
7373

7474
## Dev commands
7575

76-
```console
76+
```sh
7777
yarn [app] [command]
7878
```
7979

apps/README.md

Lines changed: 26 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,36 @@
1-
### Working with UI Toolkit on an app level
1+
# Working with UI Toolkit on an app level
22

3-
To setup linking for local development between **UI Toolkit** and **Lace** or any other app, you need to link **UI Toolkit** with it on an app level. To achieve this follow steps listed below.
3+
To setup linking for local development between **UI Toolkit** and **Lace** or any other app, you need to link **UI Toolkit** with it on an app level.
4+
To achieve this follow steps listed below.
45

5-
> [!IMPORTANT]
6-
> [yalc](https://github.com/wclr/yalc) is a prerequisite for this setup to work. Install it using `yarn global add yalc`
6+
> [!IMPORTANT] > [yalc](https://github.com/wclr/yalc) is a prerequisite for this setup to work. Install it using `yarn global add yalc`
77
8-
#### UI Toolkit repository
8+
## UI Toolkit repository
99

1010
1. Clone code repository
11-
```
12-
git clone git@github.com:input-output-hk/lace-ui-toolkit.git
13-
```
11+
12+
```sh
13+
git clone git@github.com:input-output-hk/lace-ui-toolkit.git
14+
```
1415

1516
2. Follow steps described in UI Toolkit's [README.md](https://github.com/input-output-hk/lace-ui-toolkit?tab=readme-ov-file#link-lace-ui-toolkit-for-local-development--testing)
1617

17-
#### Lace repository
18+
## Lace repository
19+
1820
1. Go to app directory ex. `apps/browser-extension-wallet` and setup linking
19-
```
20-
yalc link @input-output-hk/lace-ui-toolkit
21-
```
22-
2. Start dev mode
23-
```
24-
yarn dev
25-
```
21+
22+
```sh
23+
yalc link @input-output-hk/lace-ui-toolkit
24+
```
25+
26+
2. Start dev mode
27+
28+
```sh
29+
yarn dev
30+
```
31+
2632
3. Once development done remove linking
27-
```
28-
yalc remove @input-output-hk/lace-ui-toolkit
29-
```
33+
34+
```sh
35+
yalc remove @input-output-hk/lace-ui-toolkit
36+
```

apps/browser-extension-wallet/.env.developerpreview

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,12 @@ USE_MULTI_DELEGATION_STAKING_TREZOR=true
2727
USE_MULTI_DELEGATION_STAKING_ACTIVITY=true
2828
USE_MULTI_DELEGATION_STAKING_GRID_VIEW=true
2929
USE_ROS_STAKING_COLUMN=false
30-
USE_FOOR_TOPUP=true
30+
USE_FOOR_TOPUP=false
3131

3232
USE_POSTHOG_ANALYTICS_FOR_OPTED_OUT=false
33-
USE_MULTI_WALLET=false
33+
USE_MULTI_WALLET=true
3434
USE_SHARED_WALLET=false
35+
USE_MESSAGE_SIGNING=true
3536

3637
# In App URLs
3738
CATALYST_GOOGLE_PLAY_URL=https://play.google.com/store/apps/details?id=io.iohk.vitvoting

packages/README.md

Lines changed: 25 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,37 @@
1-
### Working with UI Toolkit on a package level
1+
# Working with UI Toolkit on a package level
22

3-
To setup linking for local development in Storybook for packages like **Core**, **Staking** or any other package, you need to link **UI Toolkit** with it on a package level. To achieve this follow steps listed below.
3+
To setup linking for local development in Storybook for packages like **Core**,
4+
**Staking** or any other package, you need to link **UI Toolkit** with it on a package level.
5+
To achieve this follow steps listed below.
46

5-
> [!IMPORTANT]
6-
> [yalc](https://github.com/wclr/yalc) is a prerequisite for this setup to work. Install it using `yarn global add yalc`
7+
> [!IMPORTANT] > [yalc](https://github.com/wclr/yalc) is a prerequisite for this setup to work. Install it using `yarn global add yalc`
78
8-
#### UI Toolkit repository
9+
## UI Toolkit repository
910

1011
1. Clone code repository
11-
```
12-
git clone git@github.com:input-output-hk/lace-ui-toolkit.git
13-
```
12+
13+
```sh
14+
git clone git@github.com:input-output-hk/lace-ui-toolkit.git
15+
```
1416

1517
2. Follow steps described in UI Toolkit's [README.md](https://github.com/input-output-hk/lace-ui-toolkit?tab=readme-ov-file#link-lace-ui-toolkit-for-local-development--testing)
1618

17-
#### Lace repository
19+
## Lace repository
1820

1921
1. Go to package directory ex. `packages/core` and setup linking
20-
```
21-
yalc link @input-output-hk/lace-ui-toolkit
22-
```
22+
23+
```sh
24+
yalc link @input-output-hk/lace-ui-toolkit
25+
```
26+
2327
2. Start dev mode (Storybook)
24-
```
25-
yarn dev
26-
```
28+
29+
```sh
30+
yarn dev
31+
```
32+
2733
3. Once development done remove linking
28-
```
29-
yalc remove @input-output-hk/lace-ui-toolkit
30-
```
34+
35+
```sh
36+
yalc remove @input-output-hk/lace-ui-toolkit
37+
```

packages/core/src/shared-wallets/docs/schema/README.md

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ This directory contains JSON schemas and example files for the shared wallet str
66

77
### `shared-wallet-schema.json`
88

9-
This schema defines the structure of a shared wallet. It includes metadata about the wallet and a reference to the native script. The metadata contains the shared wallet name and a list of participants, each with a name and an Ed25519KeyHash public key.
9+
This schema defines the structure of a shared wallet.
10+
It includes metadata about the wallet and a reference to the native script.
11+
The metadata contains the shared wallet name and a list of participants, each with a name and an Ed25519KeyHash public key.
1012

1113
### `cardano-babbage.json`
1214

@@ -16,37 +18,40 @@ This schema defines various types used in Cardano transactions, including defini
1618

1719
### `shared-wallet-scriptAll-example.json`
1820

19-
This example demonstrates a shared wallet using the `ScriptAll` native script type, which requires all specified scripts to validate for the transaction to be considered valid.
21+
This example demonstrates a shared wallet using the `ScriptAll` native script type,
22+
which requires all specified scripts to validate for the transaction to be considered valid.
2023

2124
### `shared-wallet-scriptAny-example.json`
2225

23-
This example demonstrates a shared wallet using the `ScriptAny` native script type, which requires at least one of the specified scripts to validate for the transaction to be considered valid.
26+
This example demonstrates a shared wallet using the `ScriptAny` native script type,
27+
which requires at least one of the specified scripts to validate for the transaction to be considered valid.
2428

2529
### `shared-wallet-scriptNOfK-example.json`
2630

27-
This example demonstrates a shared wallet using the `ScriptNOfK` native script type, which requires a minimum number (`N`) of the specified scripts to validate for the transaction to be considered valid.
31+
This example demonstrates a shared wallet using the `ScriptNOfK` native script type,
32+
which requires a minimum number (`N`) of the specified scripts to validate for the transaction to be considered valid.
2833

2934
## Schema Validation with Zod
3035

3136
### Running Your JSON Schema Against a Validator Sandbox
3237

33-
You can run your schema against a validator online using https://zod-playground.vercel.app/.
38+
You can run your schema against a validator online using <https://zod-playground.vercel.app/>.
3439

3540
### Your Reference for Comprehensive Zod Documentation
3641

37-
How to validate, information on types and inference can be found on https://zod.dev/.
42+
How to validate, information on types and inference can be found on <https://zod.dev/>.
3843

3944
### Generating a Zod Schema Online
4045

41-
You can generate a Zod compatible schema from a JSON schema online using https://stefanterdell.github.io/json-schema-to-zod-react/.
46+
You can generate a Zod compatible schema from a JSON schema online using <https://stefanterdell.github.io/json-schema-to-zod-react/>.
4247

4348
### Zod Usage Example
4449

4550
The following code snippets show how to validate using Zod.
4651

4752
#### Raw Parsing
4853

49-
```
54+
```js
5055
try {
5156
const result = sharedWalletJsonSchema.parse(<my json schema>);
5257
console.log("Schema is valid.")
@@ -59,7 +64,7 @@ try {
5964

6065
Safe parsing does not throw errors, but rather logs them as part of the returned object. It is preferrable when you need to know what went wrong in the validation.
6166

62-
```
67+
```js
6368
try {
6469
const result = sharedWalletJsonSchema.safeParse(<my json schema>);
6570

@@ -78,6 +83,6 @@ try {
7883

7984
To regenerate the TypeScript types from the JSON schema, use the following command:
8085

81-
```bash
86+
```sh
8287
npx --package json-schema-to-typescript -c 'json2ts shared-wallet-schema.json > shared-wallet-types-autogenerated.ts'
8388
```

packages/core/src/shared-wallets/docs/transaction-structure.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
## Problem
44

5-
Shared wallet transactions would be coordinated by moving a JSON file between cosigners in a sequential format. This JSON file would contain all the necessary information to broadcast, sign and eventually submit a transaction.
5+
Shared wallet transactions would be coordinated by moving a JSON file between cosigners in a sequential format.
6+
This JSON file would contain all the necessary information to broadcast, sign and eventually submit a transaction.
67

78
## Solution
89

@@ -66,12 +67,12 @@ const multsigTxData = {
6667
version: '1.0.0',
6768
metadata: {
6869
createdAt: '2023-09-29T14:00:00Z',
69-
note: "Shared account transaction",
70+
note: 'Shared account transaction',
7071
createdBy: 'acct_shared_xvk1z8kc04y...',
71-
chainId: 'cip34:0-1'
72+
chainId: 'cip34:0-1',
7273
},
7374
transaction: {
7475
cborHex: '84a30081825820a0b16c2044cfa596ab3274fae8879d4c98d1dcd0539a95a96...',
7576
},
76-
}
77+
};
7778
```

packages/translation/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44

55
First, install the dependencies:
66

7-
```bash
7+
```sh
88
yarn install --frozen-lockfile
99
```
1010

1111
## Storybook
1212

1313
Storybook is used for development
1414

15-
```bash
15+
```sh
1616
yarn storybook
1717
```
1818

0 commit comments

Comments
 (0)