Skip to content

Commit

Permalink
[Release] Interlay 2.36.0 (#1471)
Browse files Browse the repository at this point in the history
* feat: redirect when access from forbidden country is detected (#1209)

* Feature/updated transfer UI (#876)

* refactor: use updated tab component

* refactor: duplicated form titles

* refactor: remove redundant hook calls

* refactor: prefer title case

* wip: XCM transfer form UI

* wip: updated form UI

* wip: account selector placeholder component

* wip: account selector modal

* wip: modal open and close actions

* wip: update modal type

* wip: get accounts

* wip: add identicon and rename component for consistency

* wip: account input component

* fix: remove redundant icons prop

* feat: implement with SelectTrigger

* wip: styling and account selection value

* wip: handle setting account data

* refactor: better naming

* wip: address list styling

* refactor: rename defaultAccount

* wip: chain selector placeholder component

* wip: duplicate account component and rename

* chore: delete redundant legacy component

* wip: logic for fetching and rendering chain ids

* wip: chain item styling

* wip: selected chain styling

* chore: add comment

* refactor: pass through native token to icon component

* feature: add chain icon component

* chore: add comment

* chore: correct file name casing

* refactor: improve folder structure

* wip: form layout styling

* chore: add arrow icon

* chore: add logos and correct svg titles

* chore: remove redundant svg prop

* chore: rename arrow icon

* chore: consistent use of styled components

* refactor: remove padding from modal body

* wip: formik integration work

* wip: extend useXCMBridge to return available chains and utility methods

* chore: move Chain and Chains types to types directory

* feat: layout and form implementation

* feat: add schema

* feat: final

* wip: refactor useXCMBridge hook

* refactor: add endpoints type

* refactor: wrap methods in useCallback

* refactor: fix bug in hook method

* chore: bump bridge version

* wip: set originating and destination chain values

* refactor: set from chain value on field change

* wip: set originating chain value

* refactor: mergeProps to set field value

* refactor: handle setting origin/destination chain values

* wip: get tokens method

* wip: first iteration of balances function

* wip: handle tokens array

* wip: set token value

* wip: get token balances

* wip: return token and balances in single method

* wip: mapped tokens

* refactor: handle default chain values

* refactor: better organised function order

* wip: handle change events

* wip: handle setting tokens

* wip: handle fetching tokens and balances

* wip: convert input configs

* wip: handle token change

* wip: get token USD price

* Trigger Build

* chore: remove unused import

* chore: correct eslintignore syntax

* wip: handle breaking changes

* wip: disable token input when select items value is 1

* chore: set first token item as variable

* wip: handle setting and changing values

* chire: add loading spinner

* refactor: add loading state

* refactor: filter destination chains

* chore: remove console log

* chore: bump XCM bridge version

* chore: update config

* refactor: configure validation

* chore: revert change to useForm hook

* wip: form validation

* wip: working form validation

* wip: undefined validation parameters

* refactor: return dest fee estimate from bridge hook

* feature: show fees and fee estimates

* chore: conditional operators

* refactor: handle ticker change correctly

* wip: sendTransaction method

* Revert "wip: sendTransaction method"

This reverts commit 3ade26d.

* fix: USD amounts

* wip: send transactions

* refactor: bump bridge and use getNativeToken method

* chore: bump bridge

* refactor: move submit logic to useMutation hook

* fix: type mismatches

* refactor: white space/comments

* refactor: add transaction fee validation

* chore: typo

* chore: remove console log

* refactor: remove duplicated monetary conversion

* refactor: remove duplicate code

* Revert "refactor: remove duplicate code"

This reverts commit bd29f8c.

* Revert "refactor: remove duplicated monetary conversion"

This reverts commit 5fd3d64.

* refactor: use monetaryAmount when constructing transaction

* refactor: remove duplicated code for fetching tokens

* refactor: default XCM origin

* Revert "refactor: remove duplicated code for fetching tokens"

This reverts commit 8f31ee8.

* chore: remove comment

* chore: fix errors

* fix: set default value to empty string to prevent React error

* refactor: removed unwanted force validation parameters

* refactor: remove redundant method

* refactor: add method return type

* refactor: add method return type

* refactor: correct type error

* refactor: fix destFee type error

* refactor: remove fees validation and revert destFee return value

* chore: remove console log

* refactor: remove redundant method

* refactor: disable validation on change

* chore: remove commented out code

* wip: use select component for chain selector

* fix: handle chain select functions

* refactor: type chain id as ChainName

* Revert "refactor: type chain id as ChainName"

This reverts commit d05e012.

* chore: remove unused component files

* refactor: remove duplicated transaction logic

* fix: make to/from field types more specific

* fix: revert yup.custom changes and cast validation

* fix: set correct destination chain

* refator: handle token data

* refactor: add use callback

* fix: correct rendering logic

* fix: update dependencies

* chore: delete unused styles

* chore: fix merge issue with transfer form

* fix: change validation handling

* Revert "fix: change validation handling"

This reverts commit c0cb306.

* refactor: only display transfer amount if amount has been entered

* chore: config changes

* chore: add missing icons

* chore: Hydra chain icon

* fix: add error text to CTA

* Tom/xcm fixes (#1213)

* refactor: specify endpoints and remove unnecessary logic

* fix: save file before committing

* fix: disable refetch

* chore: update endpoints

* chore: remove log

* chore: rename file

* chore: add additional acala/karura endpoints

---------

Co-authored-by: Rui Simão <[email protected]>

* chore: release v2.32.0

* Update API healthchecks (#778)

* Chore - add vault healthcheck

* Chore - add vault healthcheck

* Chore - add vault healthcheck

* [earn strategies] placeholder page, nav and feature flag (#1216)

* chore: bump icons dependency

* feature: earn strategies placeholder page and feature flag

* feat: add useTransaction (#1189)

* chore: update monetary to latest 0.7.3 (#1214)

* chore: update monetary to latest 0.7.3

* chore: update lib

* chore: bump lib and bridge (#1219)

* chore: release v2.32.1

* fix: add missing icons and remove erroring RPC (#1222)

* fix: add missing icons and remove erroring RPC

* Update src/pages/Transfer/CrossChainTransferForm/components/ChainIcon/icons/Acala.tsx

Co-authored-by: Peter Slaný <[email protected]>

* Update src/pages/Transfer/CrossChainTransferForm/components/ChainIcon/icons/Astar.tsx

Co-authored-by: Peter Slaný <[email protected]>

* Update src/pages/Transfer/CrossChainTransferForm/components/ChainIcon/icons/Parallel.tsx

Co-authored-by: Peter Slaný <[email protected]>

---------

Co-authored-by: Peter Slaný <[email protected]>

* chore: release v2.32.2

* fix: compare input configs with method not operator (#1225)

* refactor: reset selected account on account change (#1226)

* chore: release v2.32.3

* feature: add geoblock feature flag (#1230)

* chore: release v2.32.4

* chore: bump bridge (#1233)

* chore: release v2.32.5

* Peter/earn strategies feat deposit withdraw form (#1229)

* chore: update monetary to latest 0.7.3

* wip

* feat(earn-strategies): add deposit and withdrawal form components

* refactor: add padding under tabs in earn strategy forms

* chore(earn-strategies): change file structure

* feat: add Popover, Underlay and ProgressBar. Changes to Dialog, Modal and Overlay. (#1236)

* fix: Dialog, Modal and Popover (#1245)

* chore: rename strategies feature (#1247)

* chore: release v2.32.6

* Fix: back button behaviour from bridge page (#1246)

* fix: use history replace instead of push to fix looping of bridge page

* chore: clean up and bump version

---------

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

* feat: add transaction notifications (#1177)

* chore: remove console.log (#1262)

* fix(TokenInput): adorment ticker (#1257)

* fix: get vesting data (#1264)

* Peter/chore update lib 2.3.0 (#1267)

* chore: update monetary to latest 0.7.3

* chore: update lib version

* fix: sort notifications (#1270)

* fix: transaction none (#1271)

* fix(Loans): apy label (#1275)

* Peter/loans fix subsidy rewards (#1276)

* chore: update monetary to latest 0.7.3

* fix(loans): display correct subsidy rewards accrued amount and APY

* chore: console log cleanup

* chore: replace GOVERNANCE_TOKEN_SYMBOL with GOVERNANCE_TOKEN.ticker

* Peter/fix loans incentive apr computation (#1256)

* chore: update monetary to latest 0.7.3

* fix: convert incentives apr computation to percentage

* fix: change loans incentives annualized return to have label APR

* chore: release v2.33.0

* Peter/chore update lib 2.3.3 (#1282)

* chore: update monetary to latest 0.7.3

* chore: update lib to 2.3.3.

* fix: enable faucet on Interlay testnet (#1289)

* fix: enable faucet on Interlay testnet

* fix: prefer governance token ticker to symbol

* chore: bump bridge (#1285)

* fix(Swap): update trade object on each block (#1297)

* api: use diadata as main datasource (#1277)

* api: use diadata as main datasource

* api: add header to select price source

---------

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

* Peter/fix interlay issues (#1300)

* chore: update monetary to latest 0.7.3

* fix: add missing translation and fix lend APY display

* refactor: bring back formatting with 0 amount case covered

* refactor: code review

* refactor: code review

* api: select price source via query param and ticker renaming (#1307)

* api: fix tether label for dia (#1309)

* chore: release v2.34.0

* chore: update XCM RPCs (#1324)

* chore: release v2.34.1

* fix: correct wallet balance (#1334)

* api: switch to coingecko pro url (#1321)

* Peter/feat tx fee with swapped currency (#1340)

* chore: update monetary to latest 0.7.3

* feat: refactor Transfer and theme (#1244)

* wip: initial changes to move table

* chore: remove unused component

* Revert "chore: remove unused component"

This reverts commit 0db71a1.

* chore: remove unused component

* chore: use translation file

* fix: add missing p tags

* wip

* feat: refactor Transfer and theme (#1244)

* feat(Bridge): revamp Issue and Redeem (#1279)

* wip

* feat(TransactionDetails): extend component to support fee selector (#1292)

* feat: add tx fee estimation and swap for tx fee payment integration

* fix: remove impossible condition

* feat: integrate use-transaction with TransactionFeeDetails (#1294)

* feat: integrate use-transaction with TransactionFeeDetails

* fix: code review

* refactor: code review

* feat: add fee estimate loading state

* Rui/fee estimate transfer form (#1296)

* feat: add fee estimate to transfer form

* Update src/pages/Transfer/TransferForms/components/TransferForm/TransferForm.tsx

Co-authored-by: Peter Slaný <[email protected]>

---------

Co-authored-by: Peter Slaný <[email protected]>

* Feature/UI updates/navigation styling (#1293)

* wip: initial navigation styling

* refactor: remove icons from secondary navigation items

* refactor: split navigation into primary/secondary

* fix: add bg colour to nav to prevent problems on small screens

* refactor: update accordion styles

* refactor: remove redundant code and console log

* refactor: change Kintsugi background colour

* fix: show navigation item names

* fix: remove redundant conditional

* fix: code

* fix: changes to list style and disable 0 balance fee tokens

* feat(bringyourownfee): add check for existing trade path

* Update src/utils/hooks/transaction/use-transaction.ts

Co-authored-by: Dominik Harz <[email protected]>

* Update src/utils/hooks/transaction/use-transaction.ts

Co-authored-by: Dominik Harz <[email protected]>

* refactor: move multiplier to constant

* feat: add fee validation and other improvements to form validation (#1303)

* Peter/feat griefing collateral multicurrency (#1310)

* feat: add selectable griefing collateral currency to issue request form

* feat: add oracle currency hook and wrap up griefing collateral work

* feat(Swap): add custom fee (#1315)

* Peter/feat byof bridge page (#1328)

* wip

* refactor: issue page with griefing collateral select

* feat(bringyourownfees): redeem form

* refactor: renaming

* feat: add redeem request to getActionAmount

* feat(Pools): add fee estimate (#1322)

* feat(Loans): add fee estimate (#1332)

* feat(Vaults): add fee estimate to vault creation (#1333)

* fix(Redeem): add missing BTC address validation (#1336)

* fix: redeem getActionAmount type mismatch

* Tom/UI updates/minor changes (#1308)

* refactor: add vault table background colour

* fix: typo

* refactor: styled card for vault selector

* refactor: wrap vault transaction tables in card component

* fix: typo

* refactor: add shadowed prop to card component

* refactor: use card component for transactions table

* refactor: move request id in legacy issue/request modal

* refactor: use request id dictionary item

* chore: update Interlay logo

* refactor: update icon and logo colours

* feature: add bg image

* wip: add background image to Layout component

* refactor: add Wrapper component

* wip: initial values for background image position

* refactor: minor styling changes

* refactor: revert unneeded change

* refactor: move and rename Transaction component

* feat: sort currencies by balance (#1338)

---------

Co-authored-by: Peter <[email protected]>
Co-authored-by: Thomas Jeatt <[email protected]>
Co-authored-by: Peter Slaný <[email protected]>
Co-authored-by: tomjeatt <[email protected]>
Co-authored-by: Dominik Harz <[email protected]>

* chore: release v2.35.0

* Tom/feature/wallet buttons (#1346)

* refactor: add tab props

* feature: add bridge button to assets table

* refactor: don't show buy button for wrapped token

* [wallet] add default currencies to wallet (#1335)

* refactor: add default currencies to wallet

* refactor: use NATIVE_CURRENCIES

* chore: update navigation (#1344)

* refatctor: remove LBANK configuration and assets (#1355)

* feature: add LDOT icon (#1356)

* Peter/refactor fetch oracle status from chain (#1359)

* chore: update monetary to latest 0.7.3

* refactor: fetch oracle status from chain

* chore: remove commented-out code

* Peter/fix add wrapped currency as security deposit option (#1360)

* chore: update monetary to latest 0.7.3

* fix: add wrapped token to useGetOracleCurrencies result

* chore: update price impact warning copy (#1358)

* [transfer/bridge] open correct tab (#1366)

* fix: bridge query parameter

* fix: revert to previous tab name

* refactor: close redeem modal (#1367)

* refactor: close redeem modal

* fix: correct user messaging copy

* fix: remove unnecessary translation

* fix: correct copy

* feat: change LoadingSpinner styles and CTA loading spinner (#1372)

* feat: replace legacy toast with new notification toast (#1370)

* fix: UI styling bugs (#1371)

* fix: change broken gradient id ref

* refactor: add opacity value to navigation separator

* fix: update padding

* fix: border opacity

* fix: use transaction details component

* refactor: change how padding is set

* Peter/fix bridge dust value validation (#1374)

* chore: update monetary to latest 0.7.3

* fix: dust value calculation

* feat(Wallet): add USDT and change switch label (#1363)

* fix(Modal): prevent user from clicking when closed (#1364)

* fix(Swap): handle when schema params are undefined (#1375)

* feat(Wallet): add welcome banner (#1337)

* fix: correct subscan link (#1378)

* fix: select token modal list style (#1382)

* fix: improve issue form insufficient funds notice (#1380)

* feature: add tooltip to asset cell (#1345)

* feature: add tooltip to asset cell

* fix: typo

* wip: ReactNode tooltip so that we can pass in link

* feature: add fee asset tooltip

* update text link component

* fix: revert changes to text links

* revert changes to text links

* fix: maintain compatibility with existing text links

* use correct location variable

* fix: remove log

* fix: tooltip const

* Onboarding page (#1373)

* feat: add draft of onboarding page

* chore: update t&c links

* feat: add guided tour through app

* fix: typos and eslint warnings

* restrict width of onboarding cards

* feat: replace  UI faucet with discord link

* feat: improve CTA

* feat: add link to onboarding page

---------

Co-authored-by: Thomas Jeatt <[email protected]>

* fix: disable fetch on focus (#1386)

* fix(Onboarding): improve styles, semantics and file structure (#1387)

Co-authored-by: Dominik Harz <[email protected]>

* fix: typo (#1392)

* Peter/feat pools trading fee apr (#1389)

* chore: update monetary to latest 0.7.3

* feat(pools): add trading fee APR

* refactor: clean-up naming

* Peter/ choreupdate lib 2.3.5 (#1393)

* chore: update monetary to latest 0.7.3

* chore: update lib to 2.3.5

* chore: release v2.35.1

* fix: onboarding and empty fee selector (#1396)

* Onboarding feature flag (#1398)

* refactor: add feature flag

* fix: update dependencies

* add onboarding to env file

* chore: release v2.35.2

* api: add dia asset ids to market data endpoint (#1400)

* chore: release v2.35.3

* api: add dia asset ids to market data endpoint (#1403)

* chore: release v2.35.4

* fix(Wallet): add missing guide link (#1406)

* fix(Wallet): add missing guide link

* Update WelcomeBanner.tsx

* feat(Wallet): update welcome banner svg (#1407)

* wip: add T&Cs version (#1409)

* chore: release v2.35.5

* api: add support for multiple version of terms and conditions (#1411)

* api: add support for multiple version of terms and conditions

* api: add support for multiple version of terms and conditions

* chore: release v2.35.6

* feat: add parity signer companion for polkadot vault support (#1417)

* Tom/xcm copy changes (#1391)

* fix: typos

* refactor: pass chain data to transaction instead of chain id

* refactor: remove unused feature foags (#1402)

* Peter/fix pools daily volumes (#1421)

* chore: update monetary to latest 0.7.3

* fix: change pools fetching query to work when first record is younger than requested period

* fix(Pools): deposit validation (#1419)

* fix: various issues picked up from testing (#1414)

* fix: prefetching fee scenarios (#1384)

* fix: hide onboarding button when onboarding disabled (#1418)

* chore: release v2.35.7

* apply hotfix (#1428)

* Peter/fix byof not working (#1430)

* chore: update monetary to latest 0.7.3

* fix(byof): use correct field props getter for fee token select

* chore: release v2.35.8

* api: add support ethereum and karura (#1435)

* Tom/updated directory names (#1434)

* refactor: rename Bridge -> BTC

* refactor: transfer -> send and receive

* fix: rename Transfer component

* revert change to tab name

* refactor: update translation references

* update schemas

* update directory and file casing

* casing

* casing

* casing

* casing

* casing

* chore: split AMM pages into seperate folders (#1436)

* feat: check signature version (#1429)

* Fix Storybook (#1443)

* fix display name syntax

* disable snapshots

* Trigger build

* Update routes (#1442)

* update routes

* redirect crossChainTransfer query parameter

* fix redirect syntax

* fix redirect syntax

* redirect cross chain transfer

* tab redirects

* correct redirect syntax

* Peter/fix q token vaults support (#1445)

* chore: update monetary to latest 0.7.3

* wip

* wip: update lib version

* chore: install deps

* chore: fix test pipelines (#1379)

* fix(Redeem): redeem limit when there is not capcity (#1451)

* fix(Redeem): premium redeem (#1454)

* Peter/feat loans q token handle edge cases (#1449)

* chore: update monetary to latest 0.7.3

* feat(loans): handle lend position when qToken is used as vault collateral

* chore: update lib

* add nova wallet (#1453)

* add nova wallet

* delete unused config and update polkadot name

* move constant and delete redundant file

* feat: add query params handling (#1347)

* feat: add estimate fee hook and action amount deduction (#1433)

* Update number of wallets in test (#1462)

* Update number of wallets in test

* fix: remove parentheses from wallet name

* Support Banxa on Interlay (#1458)

* refactor: remove redundant env variable and UI component

* refactor: remove redundant URL parameter

* update translation file

* revert change to wallet parameter

* update translation parameter

* fix: missed file save

* chore: release v2.36.0

* fix(Swap): add missing scenario for re-computing trade obj (#1464)

* fix: use correct value for vault capacity indicator (#1465)

* fix: use correct value for vault capacity indicator

* fix: capacity ratio when there are no backed tokens

* revert version bump

* chore: release v2.36.0

* api: add fallback to coingecko for missing assets on dia (#1467)

* revert version bump

* chore: release v2.36.0

---------

Co-authored-by: Peter Slaný <[email protected]>
Co-authored-by: Rui Simão <[email protected]>
Co-authored-by: ns212 <[email protected]>
Co-authored-by: Chanakya Kilaru <[email protected]>
Co-authored-by: Peter <[email protected]>
Co-authored-by: Dominik Harz <[email protected]>
Co-authored-by: sander2 <[email protected]>
  • Loading branch information
8 people authored Jul 19, 2023
1 parent bf56478 commit ec0444c
Show file tree
Hide file tree
Showing 232 changed files with 1,933 additions and 1,438 deletions.
5 changes: 4 additions & 1 deletion .env.dev
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

/* FEATURE FLAGS */
REACT_APP_FEATURE_FLAG_BANXA=enabled
REACT_APP_FEATURE_FLAG_STRATEGIES=enabled
REACT_APP_FEATURE_FLAG_ONBOARDING=enabled

Expand Down Expand Up @@ -28,6 +27,7 @@ REACT_APP_PARACHAIN_ID="2121"
DOCKER_RELAY_CHAIN_CURRENCY="KSM"
REACT_APP_SQUID_URL="https://api-dev-kintsugi.interlay.io/graphql/graphql"
REACT_APP_MARKET_DATA_URL="https://api.coingecko.com/api/v3/simple/price?vs_currencies=usd"
REACT_APP_TC_VERSION="1.0"

// Interlay testnet

Expand All @@ -41,6 +41,7 @@ REACT_APP_RELAY_CHAIN_NAME="polkadot"
DOCKER_RELAY_CHAIN_CURRENCY="DOT"
REACT_APP_SQUID_URL="https://api-testnet.interlay.io/graphql/graphql"
REACT_APP_MARKET_DATA_URL="https://api.coingecko.com/api/v3/simple/price?vs_currencies=usd"
REACT_APP_TC_VERSION="1.0"

/* PRODUCTION */

Expand All @@ -57,6 +58,7 @@ DOCKER_RELAY_CHAIN_CURRENCY="KSM"
REACT_APP_SQUID_URL="https://api-kusama.interlay.io/graphql/graphql"
REACT_APP_MARKET_DATA_URL="https://api.coingecko.com/api/v3/simple/price?vs_currencies=usd"
REACT_APP_SIGNER_API_URL="https://interbtc-ui-kintsugi-git-api-terms-interlay.vercel.app/terms"
REACT_APP_TC_VERSION="1.0"

// Interlay mainnet

Expand All @@ -71,3 +73,4 @@ DOCKER_RELAY_CHAIN_CURRENCY="DOT"
REACT_APP_SQUID_URL="https://api.interlay.io/graphql/graphql"
REACT_APP_MARKET_DATA_URL="https://api.coingecko.com/api/v3/simple/price?vs_currencies=usd"
REACT_APP_SIGNER_API_URL="https://interbtc-ui-interlay-git-api-terms-interlay.vercel.app/terms"
REACT_APP_TC_VERSION="1.0"
1 change: 1 addition & 0 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const parameters = {
// Needed to be specified here in order to apply styles to components rendered in portal.
Decorator: withThemes
},
chromatic: { disableSnapshot: true },
};

addDecorator(story => <OverlayProvider><MemoryRouter initialEntries={['/']}>{story()}</MemoryRouter></OverlayProvider>);
Expand Down
13 changes: 9 additions & 4 deletions api/market_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@
# map coingecko ids to dia ids
dia_assets = {
"bitcoin": "/Bitcoin/0x0000000000000000000000000000000000000000",
"ethereum": "/Ethereum/0x0000000000000000000000000000000000000000",
"interlay": "/Interlay/0x0000000000000000000000000000000000000000",
"polkadot": "/Polkadot/0x0000000000000000000000000000000000000000",
"kusama": "/Kusama/0x0000000000000000000000000000000000000000",
"kintsugi": "/Kintsugi/Token:KINT",
"acala-dollar": "/Acala/Token:AUSD",
"karura": "/Bifrost/518",
"tether": "/Ethereum/0xdAC17F958D2ee523a2206206994597C13D831ec7"
}

Expand All @@ -33,10 +35,9 @@ def add_header(response):
def coingecko(args):
headers_dict = {
"content-type": "application/json",
"accept": "application/json",
"x-cg-pro-api-key": api_key,
"accept": "application/json"
}
url = "https://pro-api.coingecko.com/api/v3/simple/price"
url = "https://api.coingecko.com/api/v3/simple/price"
resp = requests.get(url, params=args, headers=headers_dict)
data = resp.json()
return data
Expand All @@ -62,7 +63,11 @@ def dia(asset):
}
}
except KeyError:
return { asset: None }
try:
return coingecko({"ids": [asset], "vs_currencies": ["usd"]})
except Exception as e:
print("Coingecko error", e)
return { asset: None }


@app.route("/marketdata/price", methods=["GET"])
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "interbtc-ui",
"version": "2.35.8",
"version": "2.36.0",
"private": true,
"dependencies": {
"@craco/craco": "^6.1.1",
"@headlessui/react": "^1.1.1",
"@heroicons/react": "^2.0.18",
"@interlay/bridge": "^0.3.13",
"@interlay/interbtc-api": "2.3.5",
"@interlay/interbtc-api": "2.3.7",
"@interlay/monetary-js": "0.7.3",
"@polkadot/api": "9.14.2",
"@polkadot/extension-dapp": "0.44.1",
Expand Down
18 changes: 8 additions & 10 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,18 @@ import * as constants from './constants';
import TestnetBanner from './legacy-components/TestnetBanner';
import { FeatureFlags, useFeatureFlag } from './utils/hooks/use-feature-flag';

const Bridge = React.lazy(() => import(/* webpackChunkName: 'bridge' */ '@/pages/Bridge'));
const BTC = React.lazy(() => import(/* webpackChunkName: 'btc' */ '@/pages/BTC'));
const Strategies = React.lazy(() => import(/* webpackChunkName: 'strategies' */ '@/pages/Strategies'));
const Transfer = React.lazy(() => import(/* webpackChunkName: 'transfer' */ '@/pages/Transfer'));
const SendAndReceive = React.lazy(() => import(/* webpackChunkName: 'sendAndReceive' */ '@/pages/SendAndReceive'));
const TX = React.lazy(() => import(/* webpackChunkName: 'tx' */ '@/pages/TX'));
const Staking = React.lazy(() => import(/* webpackChunkName: 'staking' */ '@/pages/Staking'));
const Dashboard = React.lazy(() => import(/* webpackChunkName: 'dashboard' */ '@/pages/Dashboard'));
const Vaults = React.lazy(() => import(/* webpackChunkName: 'vaults' */ '@/pages/Vaults'));
// TODO: last task will be to delete legacy dashboard and rename vault dashboard
const Vault = React.lazy(() => import(/* webpackChunkName: 'vault' */ '@/pages/Vaults/Vault'));
const Loans = React.lazy(() => import(/* webpackChunkName: 'loans' */ '@/pages/Loans'));
const Swap = React.lazy(() => import(/* webpackChunkName: 'amm' */ '@/pages/AMM'));
const Pools = React.lazy(() => import(/* webpackChunkName: 'amm/pools' */ '@/pages/AMM/Pools'));
const Swap = React.lazy(() => import(/* webpackChunkName: 'amm' */ '@/pages/Swap'));
const Pools = React.lazy(() => import(/* webpackChunkName: 'amm/pools' */ '@/pages/Pools'));
const Wallet = React.lazy(() => import(/* webpackChunkName: 'wallet' */ '@/pages/Wallet'));
const Onboarding = React.lazy(() => import(/* webpackChunkName: 'onboarding' */ '@/pages/Onboarding'));
const Actions = React.lazy(() => import(/* webpackChunkName: 'actions' */ '@/pages/Actions'));
Expand Down Expand Up @@ -184,23 +184,21 @@ const App = (): JSX.Element => {
<Route path={PAGES.TX}>
<TX />
</Route>
<Route path={PAGES.BRIDGE}>
<Bridge />
<Route path={PAGES.BTC}>
<BTC />
</Route>
<Route path={PAGES.TRANSFER}>
<Transfer />
<Route path={PAGES.SEND_AND_RECEIVE}>
<SendAndReceive />
</Route>
<Route path={PAGES.LOANS}>
<Loans />
</Route>
<Route path={PAGES.SWAP}>
<Swap />
</Route>

<Route path={PAGES.POOLS}>
<Pools />
</Route>

<Route path={PAGES.WALLET}>
<Wallet />
</Route>
Expand Down
1 change: 1 addition & 0 deletions src/assets/img/nova-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 5 additions & 5 deletions src/assets/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@
"locked_btc": "Locked BTC",
"issue": "Issue",
"redeem": "Redeem",
"nav_bridge": "Bridge",
"nav_btc": "BTC",
"nav_strategies": "Strategies",
"nav_transfer": "Transfer / Bridge",
"nav_send_and_receive": "Send and Receive",
"nav_lending": "Lending",
"nav_swap": "Swap",
"nav_pools": "Pools",
Expand Down Expand Up @@ -632,10 +632,10 @@
},
"fund_wallet_modal": {
"buy": "Buy",
"buy_via_banxa": "Purchase KINT via Banxa.",
"buy_via_banxa": "Purchase {{ticker}} via Banxa.",
"banxa_leading_solution": "Banxa is the leading global Web3 on-and-off ramp solution.",
"exchange": "Exchange",
"please_check_terms": "Please check the individual terms and conditions of each exchange before you buy / trade {{token}}."
"please_check_terms": "Please check the individual terms and conditions of each exchange before you buy / trade {{ticker}}."
},
"wallet": {
"available_assets": "Available assets",
Expand Down Expand Up @@ -726,7 +726,7 @@
"claiming_vesting": "Claiming vesting",
"claimed_vesting": "Claimed vesting"
},
"bridge": {
"btc": {
"max_issuable": "Max issuable",
"max_redeemable": "Max redeemable",
"in_single_request": "In single request",
Expand Down
16 changes: 10 additions & 6 deletions src/component-library/WalletIcon/WalletIcon.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,24 @@ import { WalletIcon, WalletIconProps } from './WalletIcon';
const Template: Story<WalletIconProps> = (args) => (
<Flex gap='spacing4' wrap>
<Flex direction='column' gap='spacing1' justifyContent='center' alignItems='center'>
<WalletIcon {...args} name='subwallet-js' />
<Span size='xs'>SubWallet</Span>
<WalletIcon {...args} name='nova' />
<Span size='xs'>Nova</Span>
</Flex>
<Flex direction='column' gap='spacing1' justifyContent='center' alignItems='center'>
<WalletIcon {...args} name='talisman' />
<Span size='xs'>Talisman</Span>
<WalletIcon {...args} name='parity-signer-companion' />
<Span size='xs'>Parity Signer Companion</Span>
</Flex>
<Flex direction='column' gap='spacing1' justifyContent='center' alignItems='center'>
<WalletIcon {...args} name='polkadot-js' />
<Span size='xs'>Polkadot.js</Span>
</Flex>
<Flex direction='column' gap='spacing1' justifyContent='center' alignItems='center'>
<WalletIcon {...args} name='parity-signer-companion' />
<Span size='xs'>Parity Signer Companion</Span>
<WalletIcon {...args} name='subwallet-js' />
<Span size='xs'>SubWallet</Span>
</Flex>
<Flex direction='column' gap='spacing1' justifyContent='center' alignItems='center'>
<WalletIcon {...args} name='talisman' />
<Span size='xs'>Talisman</Span>
</Flex>
</Flex>
);
Expand Down
7 changes: 4 additions & 3 deletions src/component-library/WalletIcon/WalletIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@ import { WalletName } from '@/utils/constants/wallets';

import { IconProps } from '../Icon';
import { FallbackIcon } from './FallbackIcon';
import { ParitySignerCompanion,PolkadotJS, SubWallet, Talisman } from './icons';
import { Nova, ParitySignerCompanion, PolkadotJS, SubWallet, Talisman } from './icons';

type WalletComponent = ForwardRefExoticComponent<IconProps & RefAttributes<SVGSVGElement>>;

const wallet: Record<string, WalletComponent> = {
[WalletName.Nova]: Nova,
[WalletName.ParitySignerCompanion]: ParitySignerCompanion,
[WalletName.PolkadotJS]: PolkadotJS,
[WalletName.SubWallet]: SubWallet,
[WalletName.Talisman]: Talisman,
[WalletName.ParitySignerCompanion]: ParitySignerCompanion
[WalletName.Talisman]: Talisman
};

type Props = {
Expand Down
42 changes: 42 additions & 0 deletions src/component-library/WalletIcon/icons/Nova.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import { forwardRef } from 'react';

import { Icon, IconProps } from '@/component-library/Icon';

const Nova = forwardRef<SVGSVGElement, IconProps>((props, ref) => (
<Icon
{...props}
ref={ref}
enableBackground='new 0 0 324 324'
viewBox='0 0 324 324'
xmlns='http://www.w3.org/2000/svg'
>
<title>Nova</title>
<radialGradient
id='novaIconRadialGradient'
cx='8.15'
cy='19.93'
r='372.636'
gradientTransform='matrix(1 0 0 -1 0 326)'
gradientUnits='userSpaceOnUse'
>
<stop offset='0.053' stopColor='#d7d3e9'></stop>
<stop offset='0.193' stopColor='#a19cde'></stop>
<stop offset='0.383' stopColor='#696bd9'></stop>
<stop offset='0.54' stopColor='#3a5ae7'></stop>
<stop offset='0.773' stopColor='#225fe7'></stop>
<stop offset='1' stopColor='#0883d1'></stop>
</radialGradient>
<path
fill='url(#novaIconRadialGradient)'
d='M84.1 0h155.8C286.3 0 324 37.7 324 84.1v155.8c0 46.5-37.7 84.1-84.1 84.1H84.1C37.7 324 0 286.3 0 239.9V84.1C0 37.7 37.7 0 84.1 0z'
></path>
<path
fill='#fff'
d='M275 166.7v3c-18.4 2.9-58 9.8-77.5 17.2-7 2.7-12.5 8.1-15.2 15.1-7.4 19.4-14.4 59.2-17.3 77.7h-6c-2.9-18.5-9.9-58.4-17.3-77.7-2.7-6.9-8.2-12.4-15.2-15.1-19.5-7.5-59-14.3-77.5-17.2v-6c18.4-2.9 58-9.8 77.5-17.2 7-2.7 12.5-8.1 15.2-15.1 7.5-19.4 14.4-59.2 17.3-77.7h6c2.9 18.5 9.9 58.3 17.3 77.7 2.7 6.9 8.2 12.4 15.2 15.1 19.5 7.4 59.1 14.3 77.5 17.2v3z'
></path>
</Icon>
));

Nova.displayName = 'Talisman';

export { Nova };
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@ import { Icon, IconProps } from '@/component-library/Icon';
const ParitySignerCompanion = forwardRef<SVGSVGElement, IconProps>((props, ref) => (
<Icon {...props} ref={ref} viewBox='0 0 40 40' fill='none' xmlns='http://www.w3.org/2000/svg'>
<title>Parity Signer Companion</title>
<path d="M24.617 0 0 15.387l3.235 5.17 6.823-4.22v-3.325h5.343l12.51-7.756L24.617 0Zm4.154 6.648-10.28 6.383h11.514l1.979-1.212-3.213-5.17Zm4.091 6.527-2.621 1.599v2.988h-4.819l-6.687 4.159h10.908l6.247-3.875-3.028-4.871Zm-22.036 4.601L4.1 21.957l3.212 5.145 2.773-1.717v-3.464h5.568l6.687-4.145H10.826Zm25.925 1.648-6.473 4.026v3.22h-5.214l-12.982 8.048 3.3 5.282L40 24.613l-3.25-5.19ZM11.077 26.67l-2.898 1.8 3.05 4.874 10.748-6.674h-10.9Z" fill="#aeaeae"/>
<path
d='M24.617 0 0 15.387l3.235 5.17 6.823-4.22v-3.325h5.343l12.51-7.756L24.617 0Zm4.154 6.648-10.28 6.383h11.514l1.979-1.212-3.213-5.17Zm4.091 6.527-2.621 1.599v2.988h-4.819l-6.687 4.159h10.908l6.247-3.875-3.028-4.871Zm-22.036 4.601L4.1 21.957l3.212 5.145 2.773-1.717v-3.464h5.568l6.687-4.145H10.826Zm25.925 1.648-6.473 4.026v3.22h-5.214l-12.982 8.048 3.3 5.282L40 24.613l-3.25-5.19ZM11.077 26.67l-2.898 1.8 3.05 4.874 10.748-6.674h-10.9Z'
fill='#aeaeae'
/>
</Icon>
));

ParitySignerCompanion.displayName = 'Parity Signer Companion';
ParitySignerCompanion.displayName = 'ParitySignerCompanion';

export { ParitySignerCompanion };
1 change: 1 addition & 0 deletions src/component-library/WalletIcon/icons/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export { Nova } from './Nova';
export { ParitySignerCompanion } from './ParitySignerCompanion';
export { PolkadotJS } from './PolkadotJS';
export { SubWallet } from './SubWallet';
Expand Down
4 changes: 2 additions & 2 deletions src/components/AuthModal/AuthModal.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ describe('AuthModal', () => {

await render(<AuthModal isOpen onClose={jest.fn} />);

expect(screen.getByRole('heading', { name: /please install supported wallet/i })).toBeInTheDocument();
expect(screen.getByRole('heading', { name: /please install a supported wallet/i })).toBeInTheDocument();

const items = screen.getAllByRole('button', { name: /navigate/i, exact: false });

expect(items).toHaveLength(3);
expect(items).toHaveLength(5);

const [item] = items;

Expand Down
4 changes: 2 additions & 2 deletions src/components/FundWallet/FundWallet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const getData = (method: FundWalletMethod, entities: UseEntitiesResult, t: TFunc
title: t('fund_wallet_modal.buy'),
description: (
<Flex direction='column' gap='spacing1'>
<P color='tertiary'>{t('fund_wallet_modal.buy_via_banxa')}</P>
<P color='tertiary'>{t('fund_wallet_modal.buy_via_banxa', { ticker: GOVERNANCE_TOKEN.ticker })}</P>
<P color='tertiary'>{t('fund_wallet_modal.banxa_leading_solution')}</P>
</Flex>
),
Expand All @@ -29,7 +29,7 @@ const getData = (method: FundWalletMethod, entities: UseEntitiesResult, t: TFunc
exchange: {
title: t('fund_wallet_modal.exchange'),
description: (
<P color='tertiary'>{t('fund_wallet_modal.please_check_terms', { token: GOVERNANCE_TOKEN.ticker })}</P>
<P color='tertiary'>{t('fund_wallet_modal.please_check_terms', { ticker: GOVERNANCE_TOKEN.ticker })}</P>
),
entities: entities.exchanges
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/PoolsTable/PoolsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { ReactNode, useMemo } from 'react';
import { useTranslation } from 'react-i18next';

import { formatPercentage, formatUSD } from '@/common/utils/utils';
import { calculateAccountLiquidityUSD, calculateTotalLiquidityUSD } from '@/pages/AMM/shared/utils';
import { getCoinIconProps } from '@/utils/helpers/coin-icon';
import { calculateAccountLiquidityUSD, calculateTotalLiquidityUSD } from '@/utils/helpers/pool';
import { getFarmingApr } from '@/utils/helpers/pools';
import { DateRangeVolume, useGetDexVolumes } from '@/utils/hooks/api/use-get-dex-volume';
import { useGetPoolsTradingApr } from '@/utils/hooks/api/use-get-pools-trading-apr';
Expand Down
File renamed without changes.
Loading

1 comment on commit ec0444c

@vercel
Copy link

@vercel vercel bot commented on ec0444c Jul 19, 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.