Skip to content
This repository has been archived by the owner on May 31, 2023. It is now read-only.

release update from rococo #1080

Merged
merged 43 commits into from
Jul 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
caefc1c
fix: graph timeframe updates after website idle (#182)
Matehoo Apr 26, 2022
5aa8f03
Fixed broken validation triggers for payment info (#162)
maht0rz Apr 26, 2022
adff415
added max button (#153)
maht0rz Apr 26, 2022
dc36ad4
docs(readme.md): fix storybook invocation in README.md (#914)
xrash Apr 26, 2022
acf06d0
feat: Add dummy sign and send helper (#108)
janfabian Apr 26, 2022
28bc535
Feat: wallet page for lbp-v1 (#181)
dexterslabor Jun 15, 2022
4cc0183
Feat/confirmation screen (#161)
maht0rz Jun 15, 2022
e6b5a4a
update node url
maht0rz Jul 6, 2022
948df71
Minor css tweaks, removed graph, removed balance change indicator %
maht0rz Jul 6, 2022
822ff3a
added multi fee payment asset support to asset list
maht0rz Jul 6, 2022
3454db3
Added notifications for setting the fee payment asset
maht0rz Jul 6, 2022
e8e2851
added tx fee estimate to transfer
maht0rz Jul 6, 2022
8edcf46
css fixes
maht0rz Jul 6, 2022
fa3dddd
Added displaying of tx fees in the desired fee payment asset
maht0rz Jul 7, 2022
0d5262a
added txfee/multi fee payment support to vesting and transfer
maht0rz Jul 7, 2022
9864c5a
added some styles (#1045)
jak-pan Jul 12, 2022
7ebe4cf
Fix/vesting schedule (#1050)
dexterslabor Jul 14, 2022
7b9f55d
Feat/liquidity provisioning (#1051)
maht0rz Jul 14, 2022
5a0acd5
fixes for multi fee payment asset tx fee conversion
maht0rz Jul 15, 2022
1ac298d
Fix/vesting calculation (#1053)
dexterslabor Jul 15, 2022
2ffa20c
feat: Style notificationa as toast (#1052)
Matehoo Jul 15, 2022
a42b9e7
notification styles
maht0rz Jul 15, 2022
248599a
Fix/vesting (#1054)
dexterslabor Jul 15, 2022
06d17e2
fix LP math
maht0rz Jul 15, 2022
e008808
Merge branch 'develop' of github.com:galacticcouncil/Basilisk-ui into…
maht0rz Jul 15, 2022
e7837ee
basic dockerfile
mrq1911 Jul 16, 2022
6a724ca
rococo asset list
mrq1911 Jul 17, 2022
5fbfae1
ausd logo
mrq1911 Jul 17, 2022
b572689
added ksm and ausd as fee assets
mrq1911 Jul 17, 2022
a7e570b
docker action
mrq1911 Jul 17, 2022
fbe2229
push this 💩
mrq1911 Jul 17, 2022
58f868d
fixed asset switcher (#1058)
maht0rz Jul 18, 2022
01c4da5
feat: Center link, url will be added later (#1057)
Matehoo Jul 18, 2022
601cf5a
Feat/remove si units (#1059)
maht0rz Jul 18, 2022
c4d25da
fixed crashing FormattedBalance
maht0rz Jul 18, 2022
3690157
Merge branch 'develop' into rococo
mrq1911 Jul 19, 2022
fb96d96
fix: copy account in account selector (#1072)
dexterslabor Jul 20, 2022
be0c9f5
fix: Fix overflow when long wallet name (#1070)
Matehoo Jul 20, 2022
2537aba
feat: add max balance check on transfer amount (#1069)
dexterslabor Jul 20, 2022
157dc62
feat: add address checksum check on transfer in wallet (#1068)
dexterslabor Jul 20, 2022
7cc5afb
Merge branch 'develop' into rococo
mrq1911 Jul 20, 2022
bd835be
fix: account encoding for copy on click (#1075) (#1076)
maht0rz Jul 20, 2022
58f8f81
Update rococo (#1079)
maht0rz Jul 22, 2022
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: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/node_modules
/build
6 changes: 5 additions & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
HTTPS=true
# REACT_APP_NODE_URL='ws://localhost:9988'
REACT_APP_NODE_URL='wss://basilisk-rpc.hydration.cloud/'
# testnet
# REACT_APP_NODE_URL='wss://basilisk-testnet-rpc.bsx.fi/'
# rococo
REACT_APP_NODE_URL='wss://rpc-01.basilisk-rococo.hydradx.io/'
# REACT_APP_NODE_URL='wss://amsterdot.eu.ngrok.io'
REACT_APP_PROCESSOR_URL='https://bsx-api-testnet.hydration.cloud/graphql'
REACT_APP_APP_NAME='Basilisk UI'
NODE_OPTIONS=--openssl-legacy-provider
Expand Down
206 changes: 206 additions & 0 deletions .github/workflows/app-e2e-testing-flow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,206 @@
name: Application E2E Testing Flow
on:
pull_request:
branches:
- develop
push:
branches:
- 'feat/lbp-v1'

jobs:
build_app:
name: Build UI application
runs-on: macos-11
steps:
- uses: actions/checkout@v2

- name: Install Node.js
uses: actions/setup-node@v1
with:
node-version: 17.3

- name: Cache Node Modules for ui-app
id: cache-node-modules-ui-app
uses: actions/cache@v2
with:
path: node_modules
key: node-modules-ui-app-${{ hashFiles('yarn.lock') }}

- name: Install Dependencies for ui-app
if: steps.cache-node-modules-ui-app.outputs.cache-hit != 'true'
run: rm -rf node_modules && yarn install --frozen-lockfile

- name: Update browserslist
run: npx browserslist@latest --update-db

- name: Build App
run: yarn run build:deployment
env:
CI: false
REACT_APP_GIT_BRANCH: ${{ steps.extract_branch.outputs.branch }}
NODE_OPTIONS: --openssl-legacy-provider

- name: Upload script files
uses: actions/upload-artifact@v2
with:
name: script-files
path: ./scripts

- name: Upload production-ready App build files
uses: actions/upload-artifact@v2
with:
name: app-build-files
path: ./build

run_tests:
name: Run tests
runs-on: ubuntu-latest
needs: [build_app]
steps:
- uses: actions/setup-node@v2
with:
node-version: 17.3

- name: Install Node.js HTTP-Server
run: yarn global add http-server

- uses: actions/checkout@v2
with:
path: 'ui-app'

- name: Download artifact - UI app build
uses: actions/download-artifact@v2
with:
name: app-build-files
path: ./ui-app/build

# - name: Download artifact - Storybook build
# uses: actions/download-artifact@v2
# with:
# name: sb-build-files
# path: ./ui-app/storybook-static

# Prepare Basilisk-api ("develop" branch must be cloned)
- name: Clone Basilisk-api
run: git clone -b feature/dockerize-testnet https://github.com/galacticcouncil/Basilisk-api.git

- name: Cache Node Modules for Basilisk-api
id: cache-node-modules-basilisk-api
uses: actions/cache@v2
with:
path: Basilisk-api/node_modules
key: node-modules-basilisk-api-${{ hashFiles('Basilisk-api/yarn.lock') }}

- name: Install Dependencies for Basilisk-api
if: steps.cache-node-modules-basilisk-api.outputs.cache-hit != 'true'
run: |
cd Basilisk-api
yarn install --frozen-lockfile
# Install NPM deps for running tests
- name: Cache Node Modules for ui-app
id: cache-node-modules-ui-app
uses: actions/cache@v2
with:
path: ui-app/node_modules
key: node-modules-ui-app-${{ hashFiles('ui-app/yarn.lock') }}

- name: Install Dependencies for ui-app
if: steps.cache-node-modules-ui-app.outputs.cache-hit != 'true'
run: |
cd ui-app
yarn install --frozen-lockfile

# Update folders structure
- name: Change folders permissions
run: |
chmod -R 777 Basilisk-api
chmod -R 777 ui-app

# Run testnet
- name: Run sandbox testnet
shell: bash
timeout-minutes: 10
run: |
cd Basilisk-api
yarn fullruntime:clean-setup-start
# Double check of testnet status
- name: Wait for Basilisk Node port :9988
shell: bash
timeout-minutes: 2
run: . ./ui-app/scripts/gh-actions-wait-for-port.sh 9988

# Run UI App
- name: Run UI application
shell: bash
run: |
cd ui-app/build
http-server -s -p 3030 -a 127.0.0.1 &
# Check of UI app status
- name: Wait for UI app port :3030
shell: bash
timeout-minutes: 2
run: . ./ui-app/scripts/gh-actions-wait-for-port.sh 3030

# Prepare Playwright env
- name: Install OS dependencies for Playwright
run: npx playwright install-deps

- name: Make e2e testing env vars file visible (required for falnyr/replace-env-vars-action@master)
run: mv ui-app/.env.test.e2e.ci ui-app/e2e-tests-vars.txt
shell: bash

- name: Prepate E2E Tests Env Variables
uses: falnyr/replace-env-vars-action@master
env:
E2E_TEST_ACCOUNT_NAME_ALICE: ${{ secrets.E2E_TEST_ACCOUNT_NAME_ALICE }}
E2E_TEST_ACCOUNT_PASSWORD_ALICE: ${{ secrets.E2E_TEST_ACCOUNT_PASSWORD_ALICE }}
E2E_TEST_ACCOUNT_SEED_ALICE: ${{ secrets.E2E_TEST_ACCOUNT_SEED_ALICE }}
with:
filename: ui-app/e2e-tests-vars.txt

- name: Make e2e testing env vars file hidden
run: mv ui-app/e2e-tests-vars.txt ui-app/.env.test.e2e.ci
shell: bash

# For debug and monitoring purposes
- name: Check Docker containers and ports
if: always()
run: |
docker ps
docker network ls
sudo lsof -i -P -n | grep LISTEN
shell: bash

# Run e2e tests
- name: Run e2e tests
shell: bash
run: |
cd ui-app
DEBUG=pw:browser* HEADFUL=true xvfb-run --auto-servernum -- yarn test:e2e-ci
env:
PLAYWRIGHT_TEST_BASE_URL: ${{ github.event.deployment_status.target_url }}

- name: Sleep for 30 seconds (for compiling html reports)
run: sleep 30s
shell: bash

- name: Upload trace files
if: always()
uses: actions/upload-artifact@v2
with:
name: traces_screenshots
path: ./ui-app/traces

- name: Upload e2e tests report file
if: always()
uses: actions/upload-artifact@v2
with:
name: e2e_tests_report_html
path: ./ui-app/ui-app-e2e-results.html

- name: Upload testnet logs
if: always()
uses: actions/upload-artifact@v2
with:
name: testnet-sandbox-logs
path: ./Basilisk-api/testnet-sandbox-logs
45 changes: 45 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: docker

on:
push:
branches:

jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
galacticcouncil/basilisk-ui
tags: |
type=ref,event=branch
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v3
with:
push: true
context: .
build-args: |
GITHUB_SHA=${{ github.sha }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
7 changes: 7 additions & 0 deletions .vscode/snipsnap.code-snippets
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<html>
<head><title>404 Not Found</title></head>
<body>
<center><h1>404 Not Found</h1></center>
<hr><center>nginx</center>
</body>
</html>
18 changes: 18 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM node:latest AS builder

COPY . .

ARG GITHUB_SHA
ENV PUBLIC_URL /
ENV REACT_APP_NODE_URL "wss://rpc-01.basilisk-rococo.hydradx.io"
RUN yarn && yarn run build

FROM node:lts-slim

RUN npm -g install serve
WORKDIR /app

COPY --from=builder /build .

CMD serve -s

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ yarn install
Start Storybook component development environment.

```
yarn storybook
yarn storybook:start
```

Storybook can be opened at [:6006](http://localhost:6006)
Expand Down Expand Up @@ -438,4 +438,4 @@ You have to use legacy openssl provider in node 17+. Set this to node options

```shell
export NODE_OPTIONS=--openssl-legacy-provider
```
```
Loading