Skip to content

Commit

Permalink
Release 1.13.0 (#927)
Browse files Browse the repository at this point in the history
* Charts: Added Charts Enabled Settings. (#708)

* PW-650: Refactor Tooltips/Notifications For Copy Address Operation (#703)

* Refactored Copy Address Functionality.
* Updated Translation.
* Increased wallet version.

* Wallet 1.9.8 (#709)

* update wallet to 1.9.7

* wallet 1.9.8

* change env var (#710)

* loop through the node list (#711)

* add copy static

* add translations (#712)

* add translations

* add 2 translations

* Feature/pw 679 (#705)

* create demeter store

* add PoolStatusBadge component

* wip pool card

* show/hide badge in title

* update translations & info lines

* add dialog templates

* stake dialog content

* fix percent css

* fix ts error

* subscriptions examples

* update store

* claim dialog wip

* add AccountPoolMixin

* buttons texts

* add claim rewards action

* fix claim handler

* add staking route

* wip Staking page

* connect wallet on card

* add PageMixin

* refactoring common methods

* add staking actions

* add DemeterDataContainer

* new folder structure

* remove liqudity calculations

* add APR for staking

* fix apr formula

* add liquidty apr

* update calc

* refactoring params

* hide removed inactive pools

* fix calculations after

* add float input for stake

* add fiat amounts to stake dialog

* refactoring balance

* fix pool share after

* update translation keys

* fix some translations, max button visibility

* update removeLiquidity

* update messages

* update translations

* revert env.json

* staking empty card

* fix status-badge css

* update icon & balance text

* update badges

* fix click on stopped pool badge

* fix bugs

* fixes after review

* up wallet (#717)

* test

* remove test values

* test

* revert values

* add stage deploy

* fix rewards list after claim (#725)

* fix calc for availableFunds (#724)

* move textLinks to computed (#723)

* remove initial sync with metamask on page loading (#726)

* add demeter link (#727)

* update wallet to 1.10.0 (#731)

* Upgrade to Metadata 14 (#732)

* Fix migration issues

* Update imports

* Fix JSON.parse

* tmp

* Fix issues

* Up wallet version

* PW-686: Charts - Add Chart for 1 Token (XYK Pool) (#719)

* Added Chart For One Token Draft.

* Updated charts.

* load new data, price change

* chart for double tokens

* Updated styles and responsive behaviour.

* chart for 2 tokens fixes (#733)

* move @vue/composition-api to devDependencies

* add echarts plugin

Co-authored-by: alexnatalia <alekseenko@soramitsu.co.jp>
Co-authored-by: Nikita-Polyakov <polyakov@soramitsu.co.jp>
Co-authored-by: Nikita Polyakov <53777036+Nikita-Polyakov@users.noreply.github.com>

* [Line Chart]: Add Filtering by Time (#734)

* Added Chart For One Token Draft.

* Updated charts.

* load new data, price change

* chart for double tokens

* Updated styles and responsive behaviour.

* chart for 2 tokens fixes (#733)

* zoom chart and fetch data

* line chart filters

* add candle filters

* fix timeFormat

* set line chart grid option

* refactoring

* remove merge artifacts

Co-authored-by: alexnatalia <alekseenko@soramitsu.co.jp>

* chart theme colors (#736)

* add candle chart filters (#737)

* PW-687: Charts - Add Dark Theme (#735)

* Charts: Updated Dark theme.

* Update chart specs & rendering (#738)

* update specs, precision for value

* token logos

* token logos

* Update deps (#739)

* Swap Chart refactorng & fix rendering issues (#740)

* add ThemePaletteMixin

* move components to swap folder

* rendering fixes

* revert env.json

* fix tabs

* return any types temporary

* Update env.json (#744)

* Update wallet to 1.10.3 (#745)

* update wallet to 1.10.3

* update wallet to 1.10.4

* update translations from localise

* update translations

* Fix router warning (#746)

* Fix router warning

* Update wallet

* Charts Skeleton (#741)

* Charts: Added Skeleton for Loading and Error States.

* Add scan QR feature (#747)

* update wallet to 1.10.6 & refactoring

* update translations

* fix remove liquidity with locked tokens (#748)

* Fixed Receive Misspelling. (#750)

* bridge confirm loading state (#751)

* fix loading historical prices (#755)

* Modify Tokens page (#743)

* add price column

* add data to table

* fetch fix

* improve table components

* add ethereumAddress

* fix registered assets fetch

* sticky column

* scrollable table

* style & ui fixes

* fix price change format

* fix prettier warning

* APR Calculator (#754)

* merge b50b4a7

* refactoring AddLiquidity input fields

* update StakeDialog

* pass balance to TokenInput

* merge 07bcac7

* update Swap

* update ReferralBonding

* merge f50f6ce

* merge c55e6eb

* add demeter copyright

* fix ts erros

* update translations

* add TranslationConsts

* add ~ sign to rewards

* Update dev config (#758)

* remove CreatePair view (#757)

* fix ROI (#759)

* Remove whitelist.json (#761)

* Remove whitelist.json

* Update wallet

* fix fetchHistoryElements ts errors

Co-authored-by: Nikita-Polyakov <polyakov@soramitsu.co.jp>

* local browser notification (#752)

* prework

* add notification modals

* refactor & change watcher source

* refactor

* Update en.json

* fix translation nesting

* translation fixes

* translations

* add bell icon

* add svg icon

* add missing translations

* fixes

* upd translations

* delete space between comma

* PW-747: Fix Responsive Behaviour and OX Axis Formatting (#760)

* Fixed Responsive Design Issues (skeleton width, filters position, breakpoints)

* Feature/pw 755 (#765)

* wip axis labels

* wip label interval setting

* polling new prices

* fix bugs

* format labels

* fix overlapping

* add beforeDestroy hook

* return LT format for hours

* add no data message

* reduce hour filter items count

* Update Jenkinsfile

refactor

* Update QR scan UI with select input (#768)

* update wallet to 1.10.13

* remove NotificationEnablingPage

* update wallet to 1.10.14

* add MAX buttons to farming and remove liquidity (#769)

* add copyFile

* test

* revert test values

* fix chart data fetching (#771)

* Save selected token in state manager (#772)

* update swap page

* update Bridge page

* remove unused imports

* fix typo

* up app-menu z-index for fix token page table

* update port regexp

* add layers as scss variables

* add newline

* clear addLiqudity selected token on destroyed (#773)

* Fix bridge issues (#776)

* Fix bridge issues

* Update deps

* update wallet to 1.10.15 (#775)

* fix getEvmNetworkType (#777)

* add checks (#778)

* Create generateNftServiceKeypair.js

* add dep

* PW-733: Activity Should Have First/Last Page Buttons (#774)

* Bridge and MoonPay History: Added First and Last pagination buttons.

* Consts Code Duplication Refactoring (#780)

* Refactored Consts Code Duplication.

* Bridge, Moonpay History: Added Pagination Page State.

Co-authored-by: alexnatalia <alekseenko@soramitsu.co.jp>

* write to file

* add ipfs hash notif

* refactor

* provide README

* Update README.md

* fix styling

* Update README.md

* Update README.md

* revert test changes

* use UCAN tokens for NFT marketplace (#779)

* Create generateNftServiceKeypair.js

* add dep

* write to file

* provide README

* Update README.md

* fix styling

* Update README.md

* Update README.md

* use iife

* add ucan jenkinsfile

* fix var

* add api key, fix dependency install

* test env var

* test

* test2

* test3

* test4

* debug

* remove debug steps

* get token

* test api key

* use explicit

* remove debug step

* test error notif

* add registering & change path

* fix path

* debug

* fix output file name

* fix path

* remove path

* test

* refactor

* refactor

* test

* test

* debug

* debug

* debug

* debug

* debug

* debug

* debug

* Update generateNftServiceKeypair.js

* Delete ucan.json

* fix secret scaner alert

* debug

* revert

* debug

* refactor

* debug

* refactor

* revert test changes

* add schedule

* change endpoint, set candlestick bar max width (#785)

* Fix chart price change (#786)

* calc price change by closing prices

* update wallet to 1.10.20

* update wallet to 1.10.21 & update not translated strings (#787)

* reset zoom end (#788)

* Replace chart price updates polling to Subquery subscription (#790)

* wip watch fiatPrice

* price timestamp sync

* refactoring

* improve chart price updates (#791)

* switch to polkadot channel

* break parsing when price is zero (#793)

* filter & dnd update (#800)

* add translations

* update wallet

* do not show add token btn for native token (#805)

* enable xstusd pools (#798)

* prework

* Increase version

* Update SelectToken.vue

* Update AddLiquidity.vue

* Up version

Co-authored-by: Stefan Popov <stefanpopov@list.ru>

* Swap using different dexes (#809)

* swap using different dexes

* fix market algorithm

* Cherry pick commits from master (#807)

* Fix Subquery endpoint (#762)

* Update AppHeader.vue

* Update Jenkinsfile

* Update bridge contract for mainnet (#802)

Co-authored-by: Nikita Polyakov <53777036+Nikita-Polyakov@users.noreply.github.com>

* PW-752: Add tab index for all needed components (#789)

* Improved focus functionality.

* Cherry pick all changes from master (#815)

* Fix demeter styles (#808)

* Fix demeter styles

* Update whitelist.json

* Add link to UX research (#813)

* Add link to UX research

* Add an ability to remove less than 1 (#814)

* PW-855: Charts Enable Button (#812)

* Added Charts Enable Switch.

* Updated translations.

* Updated translations.

* Charts Switch: Updated design.

* Charts Switch: Cosmetic Fix.

* Improve storage validation

Co-authored-by: alexnatalia <alekseenko@soramitsu.co.jp>
Co-authored-by: Stefan Popov <stefanpopov@list.ru>

* Removed focus for tooltip. (#816)

Co-authored-by: alexnatalia <alekseenko@soramitsu.co.jp>
Co-authored-by: Stefan Popov <stefanpopov@list.ru>

* Fix max input value (#817)

* Fix max input value

* Update Swap.vue

* match contract addresses in lower case (#818)

Co-authored-by: Stefan Popov <stefanpopov@list.ru>

* Updated translation. (#821)

* Fix 1.10 issues (#823)

* Fix wallet send paddings

* Fix zero fiat values when subquery is down

* Fix zero fiat when subquery is down for rewards header

* Update yarn.lock

* Tokens page fixes (#822)

* tokens page fixes

* fix app menu on tokens page

* refactoring tokens container class

Co-authored-by: Stefan Popov <stefanpopov@list.ru>

* Add Sepolia support (#799) (#824)

* Hide Charts Switch Settings By Env Flag. (#825)

* fix chart y label (#826)

Co-authored-by: Stefan Popov <stefanpopov@list.ru>

* Enabling Settings For Undefined Second Asset Or Only One Market Algorithm (#827)

* Turned On Market Algorithms Settings.

* Enabled Settings For Undefined Second Asset Or Only One Market Algorithm.

* Fixed Custom Slippage Tolerance Outline.

Co-authored-by: alexnatalia <alekseenko@soramitsu.co.jp>

* Fixed Referral Page Tabs. (#828)

* update swap route (#830)

* Fixed Rewards Tabs Underline. (#832)

* update reserves subscription (#833)

* Update extensions links & translations (#834)

* remove unused translations

* update wallet

* update translations

* fix swap token switch (#835)

* [Swap chart] Fix X-axis labels css (#836)

* swap chart fix x axis labels css

* remove unused option

* update wallet & add translations (#837)

* [Demeter Farming] dont show APR& TVL if no prices from subquery (#839)

* dont show apr & tvl if no prices from subquery'

* fix roi

* revert env.json

* Optimize swap subscription (#842)

* freeze subscription payload

* update wallet to 1.10.36

* update swap subscriptions (#843)

* update swap subscriptions

* update wallet to 1.10.37

* Fix max btn visibility for remove liquidity & farming (#844)

* fix max btn visibility for remove liquidity & farming

* add MAX_PART

* Use consts in translations (#845)

* use translation consts

* update wallet to 1.10.38

* reimport from localise

* revert change in ReferalProgram

* PW-626: Refactor Languages (#756)

* Refactored Translation.

* Updated translation.

* remove unused vars

* fix sora in translations

* translation fixes

* fix whitespaces

* remove @:appName

* reimport from localise

* add AppName const

* remove unused import

Co-authored-by: alexnatalia <alekseenko@soramitsu.co.jp>
Co-authored-by: Nikita-Polyakov <polyakov@soramitsu.co.jp>

* fix balance check for adding liqudity & messages (#846)

* Update project dependencies (#847)

* add @types/jsdom

* replace file-loader for asset resource

* replace node-sass to sass

* update types packages

* upgrade babel & @typescript-eslint

* try to add logs to webpack

* update ethers

* update vue-template-compiler

* update sass loader

* update node-polyfill

* update dependency tree using yarn-deduplicate

* Fix bridge thischain & fiat when subquery is down (#848)

* Enable USDT for HASHI bridge

* Hide marketing section

* Update lib version with bridge fix

* Update lib

* Fix issues (#850)

* Fix block explorer links

* Fix local config

* Fix issue with infinite loader because of subquery

* Update BridgeTransactionsHistory.vue

* test image updater

* Fix release issues (#851)

* Fix moonpay behavior during log in

* Update translation strings

* Update wallet

* Hide balances fields for not connected accounts

* Update languages

* Fix low XOR value dialog behavior

* Fix type checking issue

* Fix connect account text

* Fix block number on swap with chart & tokens pages

* Update bridge contract

* Remove evm network type from local storage & fix network checks (#854)

* Remove it cuz assets were removed from the whitelist

* update wallet (#856)

* fix available pools farming (#860)

* Fix crowdloan rewards amount (#862)

* fix crowdloan amount

* fix crowdloan total amount

* fix crowdloan amount precision (#863)

* Fix remove xstusd liquidity (#864)

* fix remove xstusd liquidity

* fix apr formatting

* update demeter subscriptions (#866)

* Sora Card (#841)

* draft

* add observer and logic

* prework #2

* prework #3

* up wallet

* refactoring

* remove console.logs

* clear sessionStorage

* Update env.json

* improve btn state & add comments & unload script

* move to separate module (#871)

* move to separate module

* add enabling flag

* Update getters.ts

* remove route

* Update types.ts

* Update Dockerfile

* Update Dockerfile

* Add reserves subscription to addLiquidity (#870)

* add reserves subscription to addLiquidity

* check pool properties subscription

* refactoring liquidities vies

* fix imports

* fix addLiquidity confirm

* fix remove liquidity

* fix liquidity provider message

* fix slider input

* removeLiquidity totalSupply updates

* fix addLiquidity input field reset

* addLiquidity update subscriptions after disconnect

* refactoring token balance subscriptions

* remove unnecessary code from swap

* refactoring liquidity stores

* fix slider

* return env

* update demeter farming

* computed property for optimization

* update staking page

* update wallet to 1.11.5

* return env

* fix getLockedAmount getter

* update prod env.json (#878)

* Fix page document title for the first load (#880)

* Fix page title for the first load

* Refactor router logic

* update wallet

* update wallet & override tokens table css

Co-authored-by: Nikita-Polyakov <polyakov@soramitsu.co.jp>

* Fix confirm buttons loading state (#881)

* fix confirm buttons loading state

* fix tabs

* Remove console logs

* Fix styles

* Fix styles

* Update subquery endpoint

Co-authored-by: Stefan Popov <stefanpopov@list.ru>

* Update ReferralProgram.vue (#884)

* From master to develop (#885)

* fix calculator fields (#888)

* fix calculator fields

* remove rewards crowdloan hardfix

* fix token row css

* Fix bridge loader styles (#886)

* Reduce assets size (#887)

* Reduce png & svg size using minimizer

* Remove not used svg

* Replace svg with icon font for referrer error

* Reduce png size using minimizer

* Remove unused styles for About page

* Explore page (#857)

* add route for explore & tokens pages

* add routes for explore pages & tabs

* refactoring explore container, add search field

* change config to stage, use demeter mixin

* explore-table styles to mixin

* refactoring explore pages

* show user token balances

* table fixes

* add calculator

* add some columns to explore pools page

* refactoring tables

* update titles

* fix loader on demeter faming staking

* refactoring demeter page mixin

* fix ts issues

* update translations

* refactoring explore pages & fix issues

* revert pools & tokens subscriptions

* update default sort tokens page

* fix demeter explore

* add keys for rendering

* refactoring types

* change tabs order & fix en translations

* fixes after review

* Add desktop support (#891)

* Add desktop support

* Add delay to ConfirmInviteUser dialog

* Add desktop settings

* improve connection process (#892)

* Fix css for swap fiat values (#893)

* fix css on swap fiat value

* update wallet 1.12.6

* fix PW-811 node adress check

* pw-913 tokens page prices

* Refactoring pools rendering (#890)

* refactoring pool page

* refactoring mixins

* change v-if to v-show badges

* refactoring apr calc & assetsTable getter

* transfer some computed properties

* refactoring mixins

* prepare data in parent'

* fix staking page

* refactoring usages

* remove unused properties

* update demeter explore calculator

* return env.json

* remove unnecessary code

* chart refactoring & fix demeter farming page list

* fix multiple chart requests after switching tokens

* fix types

* Update for new subquery (#894)

* update charts & tokens

* refactoring normalize function

* update pool apy

* pool apy subscription

* update wallet

* dedup yarn.lock & fix env.json

* update yarn.lock

* fix getPoolApy arg types

* charts button on swap view (#895)

* Swap Chart: Invert tokens (#896)

* update switch token logic, optimize chart rendering

* fix chart algorithm

* improve types & fix chart data calc

* render filter count

* refactoring fetchData

* add chart reverse button & update technic

* update comments

* rename investment to balance (#899)

* use reactive  instead of router (#897)

* fix staking page title (#898)

* add restore history button (#900)

* Fix rewards screen flashing (#901)

* change default gradient & tokens on rewards screen

* refactoring rewards tabs

* update formattedAmount component & add prefix to explore balance (#902)

* Update referral system messages (#903)

* update messages for referral system locally

* update wallet

* Fix candlestick chart empty space (#907)

* fill empty space between last snapshot & current timestamp

* refactoring

* update wallet to 1.12.11

* revert env.json

* Fix referral system delay (#906)

Co-authored-by: Nikita Polyakov <53777036+Nikita-Polyakov@users.noreply.github.com>

* Fix custom token logic (#905)

Co-authored-by: Nikita Polyakov <53777036+Nikita-Polyakov@users.noreply.github.com>

* Add switch to explore (#908)

* add switch to explore

* sync switcher with storage

* Fix fee warning dialog behavior (#910)

* Fix fee warning dialog behavior

* Update deps

* Update yarn.lock

* Fix table overrides

* Fix Demeter explore active positions (#909)

* css fixes & demeter

* update wallet

* Update deps

Co-authored-by: Stefan Popov <stefanpopov@list.ru>

* fix address css (#911)

* Fix asset-asset search in pools on explore page (#913)

* Add tooltips to TVL & ROI (#912)

* add tooltips

* add translations

* up version to 1.13.0

Co-authored-by: Stefan Popov <stefanpopov@list.ru>

* XST tokenomics & remove market maker countdown (#917)

* update views

* update wallet & remove market maker countdown

* update wallet 1.13.1 (#918)

* deploy trigger removal

Signed-off-by: Nikita Zaporozhets <zaporozhets@soramitsu.co.jp>

* Liiquidity proxy 1.6 (#923)

* update wallet with liqudity proxy

* update swap view

* improve btn loading state (#924)

* up wallet version 1.13.4 (#925)

* up wallet version

* update wallet

* up wallet version to 1.13.5 (#926)

* up wallet version

* update wallet to 1.13.5

* fix ts issues

Signed-off-by: Nikita Zaporozhets <zaporozhets@soramitsu.co.jp>
Co-authored-by: wpi86 <86880521+wpi86@users.noreply.github.com>
Co-authored-by: Alex Natalia <38787212+alexnatalia@users.noreply.github.com>
Co-authored-by: Nikita Polyakov <53777036+Nikita-Polyakov@users.noreply.github.com>
Co-authored-by: Pavel Varfolomeev <varfolomeev@soramitsu.co.jp>
Co-authored-by: Rustem <rustem.yuzlibaev@yandex.ru>
Co-authored-by: Dmitriy Creed <creed@soramitsu.co.jp>
Co-authored-by: alexnatalia <alekseenko@soramitsu.co.jp>
Co-authored-by: Nikita-Polyakov <polyakov@soramitsu.co.jp>
Co-authored-by: Pavel Varfolomeev <wpi86@yandex.ru>
Co-authored-by: German Vechtomov <89127595+ox7a59@users.noreply.github.com>
Co-authored-by: Nikita Zaporozhets <zaporozhets@soramitsu.co.jp>
Co-authored-by: Nikita Zaporozhets <95526886+f33r0@users.noreply.github.com>
  • Loading branch information
13 people authored Jan 23, 2023
1 parent 6b33871 commit 0b9d1de
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 59 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
},
"dependencies": {
"@metamask/detect-provider": "^2.0.0",
"@soramitsu/soraneo-wallet-web": "1.13.1",
"@soramitsu/soraneo-wallet-web": "1.13.5",
"@walletconnect/web3-provider": "^1.8.0",
"base-64": "^1.0.0",
"core-js": "^3.26.0",
Expand Down
9 changes: 7 additions & 2 deletions src/store/swap/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,15 @@ const actions = defineActions({

async switchTokens(context): Promise<void> {
const { commit, state } = swapActionContext(context);
const { tokenFromAddress: from, tokenToAddress: to } = state;
const { tokenFromAddress: from, tokenToAddress: to, fromValue, toValue, isExchangeB } = state;
if (from && to) {
const [valueFrom, valueTo] = isExchangeB ? [toValue, ''] : ['', fromValue];

commit.setTokenFromAddress(to);
commit.setTokenToAddress(from);
commit.setFromValue(valueFrom);
commit.setToValue(valueTo);
commit.setExchangeB(!isExchangeB);
updateTokenSubscription(context, Direction.From);
updateTokenSubscription(context, Direction.To);
}
Expand All @@ -81,7 +86,7 @@ const actions = defineActions({
}

// tbc & xst is enabled only on dex 0
const enabledAssets = dexId === DexId.XOR ? state.enabledAssets : { tbc: [], xst: [] };
const enabledAssets = dexId === DexId.XOR ? state.enabledAssets : { tbc: [], xst: [], lockedSources: [] };
const baseAssetId = api.dex.getBaseAssetId(dexId);
const syntheticBaseAssetId = api.dex.getSyntheticBaseAssetId(dexId);

Expand Down
4 changes: 3 additions & 1 deletion src/store/swap/state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ export function initialState(): SwapState {
amountWithoutImpact: '',
liquidityProviderFee: '',
isExchangeB: false,
enabledAssets: {},
enabledAssets: {
lockedSources: [],
},
rewards: [],
path: [],
selectedDexId: DexId.XOR,
Expand Down
29 changes: 10 additions & 19 deletions src/views/Swap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
data-test-name="confirmSwap"
type="primary"
:disabled="isConfirmSwapDisabled"
:loading="isSelectAssetLoading"
:loading="loading || isSelectAssetLoading"
@click="handleConfirmSwap"
>
<template v-if="!areTokensSelected">
Expand Down Expand Up @@ -402,7 +402,7 @@ export default class Swap extends Mixins(
this.setToValue('');
}
handleInputFieldFrom(value: string, recount = true): void {
handleInputFieldFrom(value: string): void {
if (!this.areTokensSelected || asZeroValue(value)) {
this.resetFieldTo();
}
Expand All @@ -411,12 +411,10 @@ export default class Swap extends Mixins(
this.setFromValue(value);
if (recount) {
this.recountSwapValues();
}
this.recountSwapValues();
}
handleInputFieldTo(value: string, recount = true): void {
handleInputFieldTo(value: string): void {
if (!this.areTokensSelected || asZeroValue(value)) {
this.resetFieldFrom();
}
Expand All @@ -425,9 +423,7 @@ export default class Swap extends Mixins(
this.setToValue(value);
if (recount) {
this.recountSwapValues();
}
this.recountSwapValues();
}
private runRecountSwapValues(): void {
Expand Down Expand Up @@ -477,7 +473,7 @@ export default class Swap extends Mixins(
this.setAmountWithoutImpact(amountWithoutImpact as string);
this.setLiquidityProviderFee(fee);
this.setRewards(rewards);
this.setPath(path);
this.setPath(path as string[]);
this.selectDexId(bestDexId);
} catch (error: any) {
console.error(error);
Expand Down Expand Up @@ -508,6 +504,8 @@ export default class Swap extends Mixins(
if (!this.areTokensSelected) return;
this.loading = true;
this.liquidityReservesSubscription = api.swap
.subscribeOnAllDexesReserves(
(this.tokenFrom as AccountAsset).address,
Expand All @@ -518,6 +516,7 @@ export default class Swap extends Mixins(
.subscribe((results) => {
results.forEach((result) => this.setSubscriptionPayload(result));
this.runRecountSwapValues();
this.loading = false;
});
}
Expand All @@ -538,18 +537,10 @@ export default class Swap extends Mixins(
}
async handleSwitchTokens(): Promise<void> {
if (!(this.tokenFrom && this.tokenTo)) return;
if (!this.areTokensSelected) return;
await this.switchTokens();
if (this.isExchangeB) {
this.setExchangeB(false);
this.handleInputFieldFrom(this.toValue);
} else {
this.setExchangeB(true);
this.handleInputFieldTo(this.fromValue);
}
this.subscribeOnSwapReserves();
}
Expand Down
72 changes: 36 additions & 36 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2521,60 +2521,60 @@
resolved "https://registry.yarnpkg.com/@soda/get-current-script/-/get-current-script-1.0.2.tgz#a53515db25d8038374381b73af20bb4f2e508d87"
integrity sha512-T7VNNlYVM1SgQ+VsMYhnDkcGmWhQdL0bDyGm5TlQ3GBXnJscEClUUOKduWTmm2zCnvNLC1hc3JpuXjs/nFOc5w==

"@sora-substrate/api@1.13.4":
version "1.13.4"
resolved "https://registry.yarnpkg.com/@sora-substrate/api/-/api-1.13.4.tgz#91006cc68c7657e08621e2846be921cb8a88aaaf"
integrity sha512-AGUpROkbpc5Ns4RlUTViJl63fRJMcJmFQ+BBkp/4BYcHQn2STnv78z3MET+uOb7JciGThCL7Vt+0HCdtPCSniQ==
"@sora-substrate/api@1.13.12":
version "1.13.12"
resolved "https://registry.yarnpkg.com/@sora-substrate/api/-/api-1.13.12.tgz#da46952056a98bb1407d05030f9f17f58ea53540"
integrity sha512-Mwcy4rsXrQwmtkzDdtNA2MP1HZATFgnMslz4ezMPjZ6oJRNdHmg0I5ssXo6Y8F5BospZwyaM+ywf9Y0QSZcCUw==
dependencies:
"@open-web3/orml-api-derive" "0.9.4-26"
"@polkadot/api" "9.6.2"
"@sora-substrate/types" "1.13.4"
"@sora-substrate/types" "1.13.12"

"@sora-substrate/liquidity-proxy@1.13.4":
version "1.13.4"
resolved "https://registry.yarnpkg.com/@sora-substrate/liquidity-proxy/-/liquidity-proxy-1.13.4.tgz#f210627a33b2e5468dc93e1b9d1e25d78b7eee22"
integrity sha512-XVEZxiwv2BVdKFI9SRvzQEmANsaP3mjhkUcZp4Is/ItqzocDtDzSjSzBssbvVyK0/yyNXLQwRAxG3o1X30Spdw==
"@sora-substrate/liquidity-proxy@1.13.12":
version "1.13.12"
resolved "https://registry.yarnpkg.com/@sora-substrate/liquidity-proxy/-/liquidity-proxy-1.13.12.tgz#b47d87549ae8d0d17df56ff3a5a55cecd222f822"
integrity sha512-ZYR27J49UCgzlsuyA9zfTvfkmhj9AhPnK5ycHgC3aSFebtKleUy/vBpTrW+VyiPoZqHqVMj9J6+5pqYP6skBWQ==
dependencies:
"@sora-substrate/math" "1.13.4"
"@sora-substrate/math" "1.13.12"

"@sora-substrate/math@1.13.4":
version "1.13.4"
resolved "https://registry.yarnpkg.com/@sora-substrate/math/-/math-1.13.4.tgz#8b2ed2f76a62dfe46d8e1e09fa87f154a770d0cd"
integrity sha512-Uf8eNUe4QDPDojtS0xEz3mVWVhFeNVTJsaZlenwL/iEyknUKZB1eid1JRaZaeRLl0h6RsEmllN7JC3g8zMRm6A==
"@sora-substrate/math@1.13.12":
version "1.13.12"
resolved "https://registry.yarnpkg.com/@sora-substrate/math/-/math-1.13.12.tgz#92a8cbc39f454fc37022e96e952692521c3418f6"
integrity sha512-Gz43bmKfHDKuUNtTIISB1sxFsw6HRJ3E3OTEbW83enOuopifVcUBAiaxuP3R+ILgsAWIfvgGQ59fpqAm06/JHA==
dependencies:
"@polkadot/types" "9.6.2"
bignumber.js "^9.0.1"
lodash "^4.17.15"

"@sora-substrate/type-definitions@1.13.4":
version "1.13.4"
resolved "https://registry.yarnpkg.com/@sora-substrate/type-definitions/-/type-definitions-1.13.4.tgz#60d544f6588786144305a7dfd3397e618296c9ac"
integrity sha512-9TOdFEaJxAjGcsRhD/30Efpt3rdc9kOrnlhJGQNru9QwUOWvuZ0RVi2XXZgVU7l0XVQQW3Jd4Qix9MNO1Gb4kQ==
"@sora-substrate/type-definitions@1.13.12":
version "1.13.12"
resolved "https://registry.yarnpkg.com/@sora-substrate/type-definitions/-/type-definitions-1.13.12.tgz#7a39279ecea0b1748d69ce4179970d9aabf6d658"
integrity sha512-9VkqI/eJI8LF5oDyeeTwsJGQYPlv6LeIxBAQ0OdtQgjURfYg/rRl0chcz8/95o1F0mmiv4n91+KxaJiBI6T6Aw==
dependencies:
"@open-web3/orml-type-definitions" "0.9.4-26"

"@sora-substrate/types@1.13.4":
version "1.13.4"
resolved "https://registry.yarnpkg.com/@sora-substrate/types/-/types-1.13.4.tgz#ce7347b7078275f4cb88262f66c88ddc30859892"
integrity sha512-V1uGIlfIaM25lU/hcqGz0R0LJROQgLWmw6tulQIX5/bijH8lzr0GBtj42l4mNTBwRcjRluPy8opuxBo4eX0QyQ==
"@sora-substrate/types@1.13.12":
version "1.13.12"
resolved "https://registry.yarnpkg.com/@sora-substrate/types/-/types-1.13.12.tgz#480c2e7de68b87ede8201c3ea7e9f0c7b3d93b33"
integrity sha512-TKTFSGH4ktAaLsjuRNJXVKo7QpRMI093Y+JXdbVDnOTP/aW2r0aPZ2nCGwehwRejhb5L6hzMOKYQIIj6GpcPzw==
dependencies:
"@open-web3/api-mobx" "0.9.4-26"
"@open-web3/orml-types" "0.9.4-26"
"@polkadot/api" "9.6.2"
"@polkadot/typegen" "9.6.2"
"@polkadot/types" "9.6.2"
"@sora-substrate/type-definitions" "1.13.4"
"@sora-substrate/type-definitions" "1.13.12"

"@sora-substrate/util@1.13.4":
version "1.13.4"
resolved "https://registry.yarnpkg.com/@sora-substrate/util/-/util-1.13.4.tgz#d24c52d3046dd45a03ca1263b9852a863b909827"
integrity sha512-xM0KRUY5AyVfx7JOymUSE4zNWqwLW71QKJ1rXlpzk0haBbzj8vFLyvxHYvFjklSxpC3sM8cCHQkBva4epg1vRQ==
"@sora-substrate/util@1.13.12":
version "1.13.12"
resolved "https://registry.yarnpkg.com/@sora-substrate/util/-/util-1.13.12.tgz#24b24c866c82c0fb1ed967615eb084052ce53267"
integrity sha512-tc5zfHaNWAZwD4P9qFuOOfXW7TWToYumPZ0fQYYJDCLqNRYjl61Rjp4bfCur22t9RP2BDZGPApq0prRoZKgkCQ==
dependencies:
"@polkadot/ui-keyring" "2.9.14"
"@sora-substrate/api" "1.13.4"
"@sora-substrate/liquidity-proxy" "1.13.4"
"@sora-substrate/math" "1.13.4"
"@sora-substrate/types" "1.13.4"
"@sora-substrate/api" "1.13.12"
"@sora-substrate/liquidity-proxy" "1.13.12"
"@sora-substrate/math" "1.13.12"
"@sora-substrate/types" "1.13.12"
axios "^0.21.1"
bignumber.js "^9.0.1"
crypto-js "^4.0.0"
Expand All @@ -2597,13 +2597,13 @@
vue-property-decorator "^9.1.2"
vuex "^3.6.2"

"@soramitsu/soraneo-wallet-web@1.13.1":
version "1.13.1"
resolved "https://nexus.iroha.tech/repository/npm-group/@soramitsu/soraneo-wallet-web/-/soraneo-wallet-web-1.13.1.tgz#326986d846c7e3fcb7671b652e0f82dcb6e05935"
integrity sha512-Y6TF/drUA3C1C9T85gDIKI1+xj194HVlUt2Ivce01IYA6thZGwkRCyzew4wAW3DTLCjRWIMgeUms7RVZ1tpd/g==
"@soramitsu/soraneo-wallet-web@1.13.5":
version "1.13.5"
resolved "https://nexus.iroha.tech/repository/npm-group/@soramitsu/soraneo-wallet-web/-/soraneo-wallet-web-1.13.5.tgz#87aa3fa89001561ebb3d39e403186bb66f07c911"
integrity sha512-MCJv99i7ssIfdkVOul00bxzze5LnpAoy5hraBd2mPZja1d1Z4ksxz4vQBXyPjhQpzkrJDIY6aGoRR86kPTq2eA==
dependencies:
"@polkadot/vue-identicon" "2.9.14"
"@sora-substrate/util" "1.13.4"
"@sora-substrate/util" "1.13.12"
"@soramitsu/soramitsu-js-ui" "^1.0.42"
"@subwallet/wallet-connect" "^0.2.3"
"@urql/core" "^3.0.5"
Expand Down

0 comments on commit 0b9d1de

Please sign in to comment.