Skip to content

Commit

Permalink
Release/interlay/2.29.0 (#1094)
Browse files Browse the repository at this point in the history
* fix: remove external dependencies from component library (#942)

* fix: remove redundant layout mock stuff

* fix: hide the connected socket console log

* chore: mark the points

* fix(NumberInput): remove react-aria (#934)

* feat: add formik (#863)

* feat(CoinIcon): update INTR and IBTC icon (#941)

* feat: take supply and borrow caps into account

* chore: update lib

* refactor: code review

* hotfix: testnet banner

* feat: added trollbox Discord chat embed via widgetbot <script> tag in index.html

* fix: try to quick-fix test GitHub action

* docs: document how to locally run a GitHub action and relevant set-up issues

* feat: add x-small to CTA and add max to token input (#952)

* fix(Loans): remove unwanted earned label (#959)

* feat(Pools): remove 7 day volume column (#958)

* refactor: update testnet banner

* fix(Loans): withdraw action (#936)

* fix: disable calling the squid endpoint in App when testing

* fix: export testing-library customRender functionality

* feat: add pull_request_target case

* Trigger test run

* feat(CoinIcon): add LP Tokens icons (#951)

* feat(Field): add component and change to BaseInput (#967)

* refactor: fix regression with testnet banner

* feat(Swap): apply formik to swap form (#956)

* chore: bump lib

* feat: apply CoinIcon for LpTokens (#977)

* chore: version bump

* chore: correct version bump

* refactor: revert competition UI changes

* chore: mark the change points

* chore: mark the change points

* chore: try getLendPositionsOfAccount & getBorrowPositionsOfAccount

* chore: change discord link

* chore: change discord link

* chore: clean up

* feat: get loanCollateralInfo

* fix: tooltip error (#980)

* refactor: update useGetLoanAssets

* feat: implement useGetLendPositionsOfAccount

* feat: implement useGetBorrowPositionsOfAccount

* refactor: update useGetAccountPositions

* chore: clean up

* feat: implement useGetLoanCollateralInfo

* chore: clean up

* chore: clean up

* refactor: update useLoanInfo

* chore: clean up

* fix(Modal): restructure, improve accessibility and animations (#986)

* fix: improve swap and pools accessibility (#991)

* refactor(loans): use oracle price for ltv and similar computation

* refactor(loans): rename LoanCollateralInfo -> LendingStats

* chore: update lib & restructure files

* refactor(loans): rename stats hook

* refactor: define return type for hooks

* refactor(loans): do not wrap statistics in object

* chore: bump bridge version

* chore: bump bridge

* chore: bump lib

* chore: specify correct lib version

* chore: comment out breaking changes

* refactor(loans): lib update to 2.0.0

* fix(loans): use ltv in percentage denomination to resolve loan status

* chore: remove warning banner

* chore: remove block time banner

* fix(Loans): loan form ui and repay (#999)

* fix(Modal): focus inside dialog (#1000)

* feat: add use-wallet hook (#992)

* fix: add transaction feedback to pools and lending (#1017)

* chore(Loans): add tests

* fix: tests

* attemp - borrow

* try

* try

* continue

* fix

* fix

* fix

* final

* try fetcj

* refactor

* fix: move to unit test cases

* chore: remove unused dependencies

* chore: remove unused dependencies

* fix: adapt tests

* Trigger Build

* refactor: patch chain icon component

* chore: bump lib

* chore: bump lib

* chore: add amm tests (#969)

* fix: missing Modal props and Overlay styles (#1033)

* feat(Swap): add price impact limit

* feat: final

* fix: TokenInput select (#1036)

* refactor: fix merge conflict regression

* feature: sentry dependencies and init

* fix: token input regression

* fix: add missing dictionary item

* fix(loans): fix max repay amount

* fix(Swap): add check for usd value price impact

* refactor: update condition

* chore: release v2.28.1

* chore: update T&Cs link

* chore: update T&C links

* chore: move sentry dns to env variable

* chore: update lib with hotfix for Vault Dashboard

* Revert "fix(loans): fix max repay amount" (#1051)

* fix(Loans): max loan action

* fix: liquidation alert

* chore: add tests

* chore: add faulty code test

* refactor: revert sentry config

* fix: add shorten address prop to address UI

* chore: release v2.28.2

* fix: console warnings

* fix: versions

* feat: added kint faucet, cond. on kint balance to topbar

* fix(Loans): apy label

* feat: added kint faucet, cond. on kint balance to topbar (#1062)

* fix: allow manual issue execution for confirmed transactions

* fix: allow manual issue execution for confirmed transactions

* feature: add fathom script

* feature: add fathom script

* chore: update env variables

* feature: add notProducingBlocks banners

* fix: render warning banner in correct place

* fix: remove warning banner

* fix: add check for required griefing collateral

* fix: add check for required griefing collateral

* fix: vault on-boarding

* chore: version bump

* chore: bump bridge version

* chore: bump bridge version

* chore: version bump

* chore: add a comment to ReplaceTX

* chore: format some code automatically

* feat: add view-details column to IssueRequestsTable

* feat: add view-details to RedeemRequestsTable

* feat: add view-details columns to VaultIssueRequestsTable & VaultRedeemRequestsTable

* refactor: componentize with ViewRequestDetailsLink

* feat: add owner check to ManualIssueExecutionUI

* chore: bump lib

* chore: version bump

* chore: correct version bump

* hotfix: filter erroring vaults

* chore: add comment

* chore: comment

* chore: change discord link

* chore: bump bridge version

* chore: bump lib

* chore: specify correct lib version

* chore: comment out breaking changes

* chore: remove block time banner

* chore: remove unused dependencies

* Trigger Build

* chore: bump lib

* feat: added kint faucet, cond. on kint balance to topbar

---------

Co-authored-by: tomjeatt <[email protected]>
Co-authored-by: Thomas Jeatt <[email protected]>
Co-authored-by: Dominik Harz <[email protected]>
Co-authored-by: Rui Simão <[email protected]>
Co-authored-by: crypto-engineer <[email protected]>
Co-authored-by: crypto-engineer <[email protected]>
Co-authored-by: Peter <[email protected]>
Co-authored-by: Dominik Harz <[email protected]>

* chore: release v2.28.3

* fix: available balance to use transfarable

* feat: change get prices refetch interval

* chore: release v2.28.4

* feat(Pools): add custom input amounts mode

* chore: release v2.28.5

* feat: add refetch balances and form validation deps

* chore: trigger build

* refactor: remove substrate developer console

* chore: release v2.28.6

* chore: fix test workflow

* fix: code review

* chore: improve pipeline performance (#1075)

* fix: package.json resolutions (#1077)

* fix: show transferable balance for selected currency

* refactor: apply top bar patch

* refactor: validate issue against transferable balance

* chore: bump version

* refactor: update validation message

* refactor: correct translation entry

* refactor: update validation message

* api: add market data api

* api: add market data api

* api: add market data api

* api: add market data api

* api: add market data api

* api: add market data api

* chore: fix issue form snapshot test

* api: add market data api

* api: add market data api

* api: add market data api

* refactor: improve github workflows, remove unused code and clean-up package.json (#1076)

* refactor: prices endpoint can be absolute or relative

* chore: add market data endpoint to config

* chore: add missing env variable

* chore: remove stray comma

* refactor: improve variable name

* chore: release v2.28.8

* chore: add resolutions for various polkadot packages (#1089)

* Fix input field width issue (#1090)

* fix: input field width

* fix: rename max weeks to total weeks

* chore: bump ui version

* chore: bump XCM bridge (#1093)

* feat(Wallet): add page (#1001)

* feat(Wallet): add page

* feat: add WalletIcon

* feat: copy address

* wip

* feat: staking table

* feat: refactor and add lending

* refactor: clean up code

* wip

* feat: add List card

* continue

* fix: continue

* feat: continue

* feat(CTALink): improve

* feat: add responsiveness and swap handling

* feat: final

* feat: add responsive prop

* fix: clean up List and Divider

* feat: add tests

* feat: add final tests

* fix: code review

* feat: add vesting and tests

* fix: code review

* Tom/bug/burn form collateral tokens (#1042)

* refactor: loop collateral to get burnable tokens

* refactor: revert previous change and simplify

* refactor: add function to filter tokens

* refactor: fetch collateral currencies and render token values

* wip: form layout and translation

* wip: set data and selected collateral

* chore: remove console log

* refactor: remove single collateral code

* chore: comment

* fix: incorrect USD value

* chore: remove testing code

* refactor: remove native token import

* refactor: add BurnableCollateral type

* refactor: add fullWidth prop and label to token selector

* refactor: collateral icon

* chore: add dictionary item

* chore: remove unnecessary conditional operators

* refactor: handle callback

* refactor: fix failing test

* chore: remove unused code

* refactor: add success notification to burn form

* Add CORS to market data (#1096)

* chore: add env variables to config

* chore: add cors to market data api

---------

Co-authored-by: ns212 <[email protected]>

* fix: revert to using 0.2.x version of the bridge (#1095)

* chore: improve price impact warning copy

* chore: release v2.29.0

---------

Co-authored-by: crypto-engineer <[email protected]>
Co-authored-by: Daniel Simão <[email protected]>
Co-authored-by: crypto-engineer <[email protected]>
Co-authored-by: Peter <[email protected]>
Co-authored-by: Peter Slaný <[email protected]>
Co-authored-by: Dominik Harz <[email protected]>
Co-authored-by: Dominik Harz <[email protected]>
Co-authored-by: alexei <[email protected]>
Co-authored-by: Alexei Zamyatin <[email protected]>
Co-authored-by: ns212 <[email protected]>
Co-authored-by: Brendon Votteler <[email protected]>
Co-authored-by: Chanakya888 <[email protected]>
  • Loading branch information
13 people authored Apr 5, 2023
1 parent 45b6b71 commit c17dfcb
Show file tree
Hide file tree
Showing 572 changed files with 13,483 additions and 7,806 deletions.
4 changes: 3 additions & 1 deletion .env.dev
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@

/* FEATURE FLAGS */
REACT_APP_FEATURE_FLAG_LENDING=disabled
REACT_APP_FEATURE_FLAG_LENDING=enabled
REACT_APP_FEATURE_FLAG_AMM=enabled
REACT_APP_FEATURE_FLAG_WALLET=enabled

/* DEVELOPMENT */

Expand Down
22 changes: 22 additions & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Setup
description: Sets up a Node.js environment, installs the dependencies using Yarn,
and caches the installed dependencies for faster future builds.
runs:
using: composite
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://registry.npmjs.org
cache: yarn

- uses: actions/cache@v3
id: install-cache
with:
path: node_modules/
key: ${{ runner.os }}-install-${{ hashFiles('**/yarn.lock') }}

- if: steps.install-cache.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile --ignore-scripts --ignore-engines
shell: bash
22 changes: 10 additions & 12 deletions .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,29 @@
# Workflow name
name: 'Chromatic Deployment'

# Event for the workflow
on: [push, pull_request_target]
on:
push:
branches:
- master
pull_request:
# manual trigger
workflow_dispatch:

# List of jobs
jobs:
chromatic-deployment:
# Operating System
runs-on: ubuntu-latest
# Job steps
steps:
# 👇 Version 2 of the action
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0 # 👈 Required to retrieve git history
# Required to retrieve git history
fetch-depth: 0
- uses: actions/setup-node@v2
with:
node-version: '16'
- name: Install dependencies
run: yarn
# 👇 Adds Chromatic as a step in the workflow
- name: Publish to Chromatic
uses: chromaui/action@v1
# Chromatic GitHub Action options
with:
token: ${{ secrets.GITHUB_TOKEN }}
# 👇 Chromatic projectToken, refer to the manage page to obtain it.
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
4 changes: 0 additions & 4 deletions .github/workflows/projects.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@

name: Add issues and pull requests to backlog

on:
issues:
types:
- opened
pull_request:
types:
- opened

jobs:
add-to-project:
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Test

on:
push:
branches:
- master
pull_request:
# manual trigger
workflow_dispatch:

env:
REACT_APP_RELAY_CHAIN_NAME: polkadot
REACT_APP_PARACHAIN_ID: 2032
DOCKER_RELAY_CHAIN_CURRENCY: DOT
REACT_APP_FEATURE_FLAG_LENDING: enabled
REACT_APP_FEATURE_FLAG_AMM: enabled
REACT_APP_FEATURE_FLAG_WALLET: enabled

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup
- run: yarn lint

unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup
- run: yarn test:ci
26 changes: 0 additions & 26 deletions .github/workflows/yarn-test.yml

This file was deleted.

6 changes: 5 additions & 1 deletion .storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
const path = require('path');

module.exports = {
reactOptions: {
strictMode: false,
},
stories: [
'../src/**/*.stories.mdx',
'../src/**/*.stories.@(js|jsx|ts|tsx)'
Expand All @@ -10,7 +13,8 @@ module.exports = {
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/preset-create-react-app',
'storybook-addon-themes'
'storybook-addon-themes',
"@storybook/addon-actions"
],
webpackFinal: config => {
// MEMO: inspired by https://github.com/storybookjs/storybook/issues/3916
Expand Down
2 changes: 2 additions & 0 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import '../src/component-library/theme/theme.interlay.css';
import '../src/component-library/theme/theme.kintsugi.css';
import './sb-preview.css';
import '../src/i18n';
import "../src/lib/form/yup.custom"
import { withThemes } from 'storybook-addon-themes/react';
import { addDecorator } from "@storybook/react";
import { MemoryRouter } from "react-router-dom";
Expand Down
2 changes: 2 additions & 0 deletions api/market_data.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
from flask import Flask, request, jsonify
from flask_cors import CORS
import requests
import os

app = Flask(__name__)
CORS(app)

api_key = os.environ.get("CG_API_KEY")

Expand Down
3 changes: 2 additions & 1 deletion api/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Flask
flask-cors
requests
python-dateutil
python-dateutil
33 changes: 14 additions & 19 deletions jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
* For a detailed explanation regarding each configuration property and type check, visit:
* https://jestjs.io/docs/en/configuration.html
*/
import dotenv from "dotenv"
dotenv.config({ path: "./.env.test" })
import dotenv from 'dotenv';
dotenv.config({ path: './.env.test' });

const config = {
// All imported modules in your tests should be mocked automatically
Expand Down Expand Up @@ -33,7 +33,7 @@ const config = {
// ],

// Indicates which provider should be used to instrument code for coverage
coverageProvider: "v8",
coverageProvider: 'v8',

// A list of reporter names that Jest uses when writing coverage reports
// coverageReporters: [
Expand Down Expand Up @@ -68,24 +68,15 @@ const config = {
// maxWorkers: "50%",

// An array of directory names to be searched recursively up from the requiring module's location
moduleDirectories: [
"node_modules"
],
moduleDirectories: ['node_modules'],

// An array of file extensions your modules use
moduleFileExtensions: [
"js",
"json",
"jsx",
"ts",
"tsx",
"node"
],
moduleFileExtensions: ['js', 'json', 'jsx', 'ts', 'tsx', 'node'],

// A map from regular expressions to module names or to arrays of module names that allow to stub out resources with a single module
moduleNameMapper: {
"^@/(.+)": "<rootDir>/src/$1",
"\\.css$": "identity-obj-proxy"
'^@/(.+)': '<rootDir>/src/$1',
'\\.css$': 'identity-obj-proxy'
},

// An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader
Expand Down Expand Up @@ -133,7 +124,7 @@ const config = {
// setupFiles: [],

// A list of paths to modules that run some code to configure or set up the testing framework before each test
setupFilesAfterEnv: ['<rootDir>/src/test/mocks/setup.ts'],
setupFilesAfterEnv: ['<rootDir>/src/test/mocks/setup.tsx'],

// The number of seconds after which a test is considered as slow and reported as such in the results.
// slowTestThreshold: 5,
Expand All @@ -153,7 +144,7 @@ const config = {
// The glob patterns Jest uses to detect test files
testMatch: [
// "**/__tests__/**/*.[jt]s?(x)",
"**/test/**/*?(*.)+(spec|test).[tj]s?(x)"
'**/test/**/*?(*.)+(spec|test).[tj]s?(x)'
],

// An array of regexp pattern strings that are matched against all test paths, matched tests are skipped
Expand All @@ -179,7 +170,7 @@ const config = {
// A map from regular expressions to paths to transformers
transform: {
'^.+\\.svg$': '<rootDir>/src/test/transformers/svg.js',
"\\.[jt]sx?$": "babel-jest",
'\\.[jt]sx?$': 'babel-jest'
},

// An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
Expand All @@ -199,6 +190,10 @@ const config = {

// Whether to use watchman for file crawling
// watchman: true,

// RE: inspired by https://stackoverflow.com/a/49864436
// MEMO: the root cause of this fix may be that these operations (running tests) can take longer to complete in a CI environment than on your local machine so the timeout might be increased accordingly
testTimeout: 30000
};

export default config;
Loading

1 comment on commit c17dfcb

@vercel
Copy link

@vercel vercel bot commented on c17dfcb Apr 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.