Skip to content

Commit

Permalink
Enable Liberland (sora-xor#1414)
Browse files Browse the repository at this point in the history
* Fix release 1.21 issues (#1160)

* Update address book input props

* Replace toPromise

* Update wallet lib

* Update translations

* Update referral system strings

---------

Co-authored-by: Stefan Popov <[email protected]>

* Remove synths blockers from Add LP (#1162)

Co-authored-by: Stefan Popov <[email protected]>

* Add synthetic switcher to select asset (#1161)

* add synthetic switcher to select asset

* fix check in create alert

* update add liquidity select token

---------

Co-authored-by: Stefan Popov <[email protected]>

* Improve ads (#1163)

* Add first version of dynamic ads

* Add responsive

* Fix sora card progress bar styles

* Add screenBreakpointClass

* Make header responsive

* Make FiatDeposit view responsive

* Fix names & remove unused svg-s

* Update AppAd.vue

---------

Co-authored-by: Stefan Popov <[email protected]>

* Add debounce to resize event (#1164)

* Add debounce to resize event

* Fix names

* Fix images size

---------

Co-authored-by: Stefan Popov <[email protected]>

* Fix content bottom margin (#1165)

Co-authored-by: Stefan Popov <[email protected]>

* Update App.vue (#1167)

Co-authored-by: Stefan Popov <[email protected]>

* Merge master (#1168)

* Release 0.1.2 (#80)

* Add base project files

* Add About page

* Add unit tests

* Remove unused files

* Update library version

* Moved images to img folder.

* Refactored some styles, added normalize css.

* Fixed article card header font weight.

* Fix About snapshot

* Fix styles and its imports

* PSS-132: Token list store

* Add env.json and readme

* PSS-134  DevOps: Develop CI and CD processes for Polkaswap web project (#5)

* add ci cd

Signed-off-by: Bulat Saifullin <[email protected]>

* fix Dockerfile

Signed-off-by: Bulat Saifullin <[email protected]>

* add pull_request_template.md

Signed-off-by: Bulat Saifullin <[email protected]>

* fix template

Signed-off-by: Bulat Saifullin <[email protected]>

* PSS-132: Select token screen

* PSS-132: Refactoring

* PSS-132: Change short name to symbol

* PSS-132: Add i18n to select token

* PSS-132: Add unit tests

* PSS-132: Remove elements from tests

* Added Swap Interface draft (#4)

* Swap Interface: Added screen, Unit Tests, Updated UI Lib version.

* PSS-132: Create pair

* PSS-132: Fixes for select token

* PSS-132: Fix title style

* PSS-132: UPdate snaphots

* PSS-132: Fix shadow

* PSS-132: Fix variable style using

* Swap Interface Confirmation Screens (#8)

* Added Transaction Submit dialog.
* Swap Interface: Moved some variables to store for better relations between different screens and dialogs.
* Confirm Swap Dialog: Fixed dialog opening, added confirmation flag to the store.
* Added token default logo image, refactored translation call for liquidity.
* Added SelectToken dialog on click.

* PSS-126: Confirm supply modal

* Confirmation screens for create pair

* Design fixes

* Update ui lib

* PSS-126: Logo component

* Update tests

* Wallet integration and styles issues (#10)

* Wallet integration

* Fix routing issues

* Update UI library version

* Refactor all styles

* Fix wallet connected state

* Update tests

* Update test

* Update Dockerfile (#12)

* PSS-129: Add and remove liquidity page

* Design fixes

* Token logo check fixes

* Refactoring and fixes

* Add pair token logo for add liquidity

* Settings implementation (#15)

* Add settings dialog

* Add tests

* Update tests

* Fix titles for info card

* Pool Interface Start Screens (#11)

* Pool Interface: Added Start Screen.
* Refactored components due to UI Lib updates: set size and border-radius of elements.
* Created Dialog wrapper component, refactored dialogs, added fixed top position, fixed close behaviour.
* Refactored components imports.
* Converted logo icon to link to the home page.
* Fixed error in console for Create pair component.
* Added Back link behaviour for several components.
* Updated unit tests.

* PSS-172: Dynamic Page Title (#14)

* Added dynamic page title.

* PSS-128: Add confirmation screens for pool (#16)

* PSS-128: Add confirmation screens for pool
Co-authored-by: alexnatalia <[email protected]>

* Mocks for pool screen

* Refactoring

* Update tests

* Add liquidity button for pairs

* Design Fixes and Refactoring (#17)

* Refactored TokenLogo and PairTokenLogo components, fixed some bugs, updated unit tests. Refactored components headers.
* Added Popper class for info tooltips. Fixed default prop value for Object types. Updated Unit tests.

* Design Issues Fix (#19)

* Updated configuration variables and Exchange tabs styles.
* Updated About page images and styles, Header styles and Menu colors settings. Hid unused links and buttons in header.
* Updeted typography variables and Font Styles: Updated Font Size, Line Height and Font Weight Configuration. 
* Updated Create Pair button styles. Updated Ui Lib version.
* Fixed tokens icons for Pool screen.
* Updated tooltips to one consistent style. Fixed Pool screen bug. 
* Refactored: Created special component for Generic Header. Fixed Back icon.
* Updated some fonts and Pool screen styles.
* Added Empty icon for Select token popup.
* Added First Liquidity Provider message to Create a Pair screen.
* Hid tooltip for Slider element on Settings screen, hid tooltips for Swap Confirmation.
* Updated unit tests.

* PSS-205: Remove liquidity: everything should be clickable and with recalculation

* Update tests

* Fix set remove part to 0

* Inpur for remove part

* Fixes

* Price container fixes

* Update tests

* PS-223: Fix remove liquidity in safari

* PSS-205: Design Review Issues (#21)

* Fixed titles case. Updated buttons with text and icons. Updated typography styles.

* Update wallet version & add blockchain integration (#23)

* Update wallet version & add blockchain integration
* Commented out unit tests.

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

* PSS-123: Select token integration

* Fix async behavior for dexApi (#25)

* Fix async behavior for dexApi

* Update .eslintrc.js

* PSS-247: Custom Slippage Tolerance Fix (#27)

* Updated STab styles.
* Updated UI Lib and Wallet versions and styles according to UI Lib fixes.

* PSS-129: Add liquiditiy integration

* PSS-74 Swap Interface Integration (#26)

* Hid swap info for not connected wallet.
* Updated SelectToken search by name, added check for translation existance.
* Added Swap Integration.
* Refactored formatNumber calls.
* Hid swap info under buttons for zero amount.
* Fixed Header Menu colors.
* Fixed swap from Wallet assets.
* Updated tooltips.
* Updated About page text and Main menu links order.
* Fixed Card title color for About page.
* Updated Default token setting.
* Updated Wallet version.
* Hid Transaction Deadline area for Settings.
* Removed unneeded tooltip from Settings dialog.
* Added validation for Settings.
* Added validation for Insufficient Amount error from server.
* Added loading while not conencted, changed store to not strict mode, updated tokens setting in store.
* Fixed focused behaviour for Swap input fields.
* Fix wallet connection & select token behavior
* Fixed Min Received format.

Co-authored-by: Stefan Popov <[email protected]>

* Swap result calculation for non connected mode (#28)

* Fixed Swap result calculation for non connected mode.
* Fixed About page text and styles.

* Fix i18n (#30)

* Updated Swap input width and Max swap behaviour. Updated Swap Info styles. (#29)

* PSS-271: Medium and GitHub links (#31)

* Added Github and Medium links for About page.
* Upated the Wallet version.
* Fixed wallet button color on hover.

* Calculate total suply

* PSS-216: Design Issues Fixing (#32)

* Updated content primary color.
* Fixed Price and Token areas horizontal alignment.
* Updated tooltips.
* Updated Generic Header tooltip.
* Updated Token item height for Select Token dialog.
* Added Token icons.
* Updated token icons  names.

* PSS-129: Create pair integration

* Remove mocks

* Refactoring

* Add network fee calculation

* Fixes

* PSS-281: Recalculate Input Values On Select Token (#33)

* Added util method to check isNumber value. Removed Max button from token To area.
* Added Max sold for reversed swap.
* Updated Swap Integration.
* Updated UI Lib version.
* Added recalc on Select Token.
* Fixed Swap for Polkadot.js
* Updated isExchangeB param in methods.
* Hid Node Address area for Settings popup.
* Added Network Fee field to Swap component.
* Updated Custom slippage tolerance for Settings.
* Fixed paste string value to Swap fields.
* Updated Network Fee calls, updated Wallet version, fixed swap tokens balance.
* Added isExchangeB parameter to swap call.

* Refactoring

* fix total supply

* PSS-129: Share of pool

* Remove share of pool mock

* Fix get asset symbol

* Hide add liquidity
Fix slippage tolerance for add liquidity
Fix share of pool
Fix unsupprted assets error message

* Disable max button for add liquidity
Reset values after change tokens

* Fixes

* Updated Tokens Icons, added PAL icon. (#35)

* Wallet connection issues (#38)

* Fix wallet connection issues

* Fix styles

* Update wallet version

* Update favicon.ico

* PSS-297: check fee on max amount

* PSS-295: Added Insufficient Balance Checking (#37)

* Added Insufficient balance checking.
* Updated FPNumber parameters.
* Removed formatNumber usage from Swap screens.
* Fixed focus and placeholders values for Swap.
* Updated some styles for huge number values.
* Refactored due to PR comments.

* Result Dialog Styles Fix (#41)

* Fixed Result Dialog button styles.
* Renamed USD icon.
* Update library
* Fix swap, liquidity behavior
* Update index.ts
* TODO: Revert this commit after PSS-309
* Updated wallet version.

Co-authored-by: Stefan Popov <[email protected]>

* PSS-273: WEB UI: Connect Wallet - Close button leads always on Exchange page, not to the previous page (#42)

* Fix routing issue

* Update wallet version

* PSS-295: Confirm Swap Insufficient Balance Checking (#43)

* Fixed console error on tokens switch.
* Added Is Insufficient Balance checking for Confirm Swap dialog.
* Updated Confirm Swap styles.

* Updated Swap info after Swap, added max button to init screen. (#44)

* Update ui library version (#46)

* Update ui library version

* Update wallet

* BP-312: Fixes for pool

* Fix icons position (#47)

* Fix icons position

* Fix logo

* PSS-287: Swap Amount Fields Formatting (#45)

* Added Swap fields formatter.
* Fixed Slippage Tolerance editing and Swap fields formatting.
* Updated wallet version.

* Change toString to toFixed

* Change formatNumber to toFixed

* Fix remove liquidity price

* Move back toFixed to toString

* Fixed estimated label existence for zero values (#50)

* Refactored, added some comments, fixed estimated label existence for zero values.

* Modify env config file (#49)

Co-authored-by: Bulat Saifullin <[email protected]>

* Add custom notifications & notification tracking service (#51)

* Add custom notifications & notification tracking service

* Update notifications & strings according to latest changes

* Update api

* Update soramitsu-variables.scss

* PSS-335: Designer Feedback Fixes FE (#53)

* Fixed functionality and layout bugs.
* Added draft component to fix layout behaviour.
* Fixed Settings behaviour.
* Swap: removed Result dialog, edited Network Fee tooltip.
* Fixed translation bugs.

* Account info implementation & fix loading state (#54)

* Add account info

* Fix styles

* Hide test assets (#55)

* Update connection

* Remove usdt mock

* Add liquidity issues & update notifications (#56)

* Add missing notifications

* Update RemoveLiquidity

* Fix add liquidity screen

* Add async loading of liquidity

* Fix pool issues

* Updated not connected pool interface message. (#60)

* PSS-300: Swap confirmation dialog message update (#61)

* Updated Swap confirmation dialog message.
* Confirm Swap Dialog: Updated message for max sold behaviour.

* Swap screen: Fixed Min Received/Max Sold area asset symbol. (#62)

* PSS-379: WEB UI. Add liquidity. Click MAX button on 0 balance of XOR (#59)

* Updated wallet version. Swap, Add Liquidity, Create Pair components: Updated Max button availability, refactored.
* Refactored due to PR comments.
* Swap, Add Liquidity: Fixed negative amount after max. Updated wallet version.

* Create pair implementation & fix liquidity issues (#63)

* Add create pair implementation & fix logic for add liquidity

* PSS-297: WEB UI: Restrict Adding liquidity if balance is insufficient (#64)

* Add Liquidity: Refactored Insufficient Balance.
* Create Pair, Remove Liquidity: Updated Max functionality.

* Add insufficient liquidity message for swap (#66)

* link @soramitsu/soraneo-wallet-web 0.4.6

* return network address

* use wallet routes in app.vue to correctly handle wallet icon click

* set changePage method as private

* removed local model for inputs: createPairModel

* refactoring CreatePair methods

* add input maxlength check

* fix inputMaxLength method

* improve formatNumberField method

* refactoring inputMaxLength method

* refactoring AddLiquidity view

* create TokenPair mixin

* wip refactoring

* add maxlength to removeLiquidity view inputs

* create TokenInputMixin

* add input handlers on removeLiquidity view

* handle swap inputs

* return commented line

* PSS-400: WEB UI. Minimum receive/Maximum sold token not changed (#69)

* Fixed min received/max sold symbol.

* Update wallet & api version (#70)

* fixes after review

* add store state interfaces

* PSS-467: On the swap screen user should be able to select all tokens excecpt pool tokens (#71)

* Update wallet & api version

* Fix swap with assets created by user

* Update wallet & api version

* add watcher for slippageTolerance in Swap.vue

* remove console lgos

* use state types in store mutations & getters

* apply transaction mixin changes from wallet

* update @soramitsu/soraneo-wallet-web dependency

* navigate to wallet connection view on wallet click (#75)

* PSS-419: restrict precision in inputs (#74)

* add TokenInput component

* use TokenInput in Swap.vue

* add ConfirmDialogMixin

* prepare to refactoring modals

* remove comments

* remove unneccessary actions

* add TODO comments

* fix TokenInput handler

* link js-ui-library with input fix

* PSS-398: WEB UI. Multiple click on Confirm - create multiple transactions. (#76)

* Fix multiple confirm for operations

* Fix notifications view

* Update env.json

* PSS-364: reuse s-float-input component (#77)

* prepare TokenInput component for export

* use s-float-input instead of TokenInput

* refactoring Settings component

* refactoring RemoveLiquidity

* Update wallet (#79)

Co-authored-by: alexnatalia <[email protected]>
Co-authored-by: Aleksandr Makhnev <[email protected]>
Co-authored-by: Bulat Saifullin <[email protected]>
Co-authored-by: Alex Natalia <[email protected]>
Co-authored-by: Dmitriy Creed <[email protected]>
Co-authored-by: alexnatalia <[email protected]>
Co-authored-by: Nikita Polyakov <[email protected]>
Co-authored-by: Nikita-Polyakov <[email protected]>
Co-authored-by: Nikita Polyakov <[email protected]>

* Release 0.1.3 (#97)

* Add base project files

* Add About page

* Add unit tests

* Remove unused files

* Update library version

* Moved images to img folder.

* Refactored some styles, added normalize css.

* Fixed article card header font weight.

* Fix About snapshot

* Fix styles and its imports

* PSS-132: Token list store

* Add env.json and readme

* PSS-134  DevOps: Develop CI and CD processes for Polkaswap web project (#5)

* add ci cd

Signed-off-by: Bulat Saifullin <[email protected]>

* fix Dockerfile

Signed-off-by: Bulat Saifullin <[email protected]>

* add pull_request_template.md

Signed-off-by: Bulat Saifullin <[email protected]>

* fix template

Signed-off-by: Bulat Saifullin <[email protected]>

* PSS-132: Select token screen

* PSS-132: Refactoring

* PSS-132: Change short name to symbol

* PSS-132: Add i18n to select token

* PSS-132: Add unit tests

* PSS-132: Remove elements from tests

* Added Swap Interface draft (#4)

* Swap Interface: Added screen, Unit Tests, Updated UI Lib version.

* PSS-132: Create pair

* PSS-132: Fixes for select token

* PSS-132: Fix title style

* PSS-132: UPdate snaphots

* PSS-132: Fix shadow

* PSS-132: Fix variable style using

* Swap Interface Confirmation Screens (#8)

* Added Transaction Submit dialog.
* Swap Interface: Moved some variables to store for better relations between different screens and dialogs.
* Confirm Swap Dialog: Fixed dialog opening, added confirmation flag to the store.
* Added token default logo image, refactored translation call for liquidity.
* Added SelectToken dialog on click.

* PSS-126: Confirm supply modal

* Confirmation screens for create pair

* Design fixes

* Update ui lib

* PSS-126: Logo component

* Update tests

* Wallet integration and styles issues (#10)

* Wallet integration

* Fix routing issues

* Update UI library version

* Refactor all styles

* Fix wallet connected state

* Update tests

* Update test

* Update Dockerfile (#12)

* PSS-129: Add and remove liquidity page

* Design fixes

* Token logo check fixes

* Refactoring and fixes

* Add pair token logo for add liquidity

* Settings implementation (#15)

* Add settings dialog

* Add tests

* Update tests

* Fix titles for info card

* Pool Interface Start Screens (#11)

* Pool Interface: Added Start Screen.
* Refactored components due to UI Lib updates: set size and border-radius of elements.
* Created Dialog wrapper component, refactored dialogs, added fixed top position, fixed close behaviour.
* Refactored components imports.
* Converted logo icon to link to the home page.
* Fixed error in console for Create pair component.
* Added Back link behaviour for several components.
* Updated unit tests.

* PSS-172: Dynamic Page Title (#14)

* Added dynamic page title.

* PSS-128: Add confirmation screens for pool (#16)

* PSS-128: Add confirmation screens for pool
Co-authored-by: alexnatalia <[email protected]>

* Mocks for pool screen

* Refactoring

* Update tests

* Add liquidity button for pairs

* Design Fixes and Refactoring (#17)

* Refactored TokenLogo and PairTokenLogo components, fixed some bugs, updated unit tests. Refactored components headers.
* Added Popper class for info tooltips. Fixed default prop value for Object types. Updated Unit tests.

* Design Issues Fix (#19)

* Updated configuration variables and Exchange tabs styles.
* Updated About page images and styles, Header styles and Menu colors settings. Hid unused links and buttons in header.
* Updeted typography variables and Font Styles: Updated Font Size, Line Height and Font Weight Configuration. 
* Updated Create Pair button styles. Updated Ui Lib version.
* Fixed tokens icons for Pool screen.
* Updated tooltips to one consistent style. Fixed Pool screen bug. 
* Refactored: Created special component for Generic Header. Fixed Back icon.
* Updated some fonts and Pool screen styles.
* Added Empty icon for Select token popup.
* Added First Liquidity Provider message to Create a Pair screen.
* Hid tooltip for Slider element on Settings screen, hid tooltips for Swap Confirmation.
* Updated unit tests.

* PSS-205: Remove liquidity: everything should be clickable and with recalculation

* Update tests

* Fix set remove part to 0

* Inpur for remove part

* Fixes

* Price container fixes

* Update tests

* PS-223: Fix remove liquidity in safari

* PSS-205: Design Review Issues (#21)

* Fixed titles case. Updated buttons with text and icons. Updated typography styles.

* Update wallet version & add blockchain integration (#23)

* Update wallet version & add blockchain integration
* Commented out unit tests.

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

* PSS-123: Select token integration

* Fix async behavior for dexApi (#25)

* Fix async behavior for dexApi

* Update .eslintrc.js

* PSS-247: Custom Slippage Tolerance Fix (#27)

* Updated STab styles.
* Updated UI Lib and Wallet versions and styles according to UI Lib fixes.

* PSS-129: Add liquiditiy integration

* PSS-74 Swap Interface Integration (#26)

* Hid swap info for not connected wallet.
* Updated SelectToken search by name, added check for translation existance.
* Added Swap Integration.
* Refactored formatNumber calls.
* Hid swap info under buttons for zero amount.
* Fixed Header Menu colors.
* Fixed swap from Wallet assets.
* Updated tooltips.
* Updated About page text and Main menu links order.
* Fixed Card title color for About page.
* Updated Default token setting.
* Updated Wallet version.
* Hid Transaction Deadline area for Settings.
* Removed unneeded tooltip from Settings dialog.
* Added validation for Settings.
* Added validation for Insufficient Amount error from server.
* Added loading while not conencted, changed store to not strict mode, updated tokens setting in store.
* Fixed focused behaviour for Swap input fields.
* Fix wallet connection & select token behavior
* Fixed Min Received format.

Co-authored-by: Stefan Popov <[email protected]>

* Swap result calculation for non connected mode (#28)

* Fixed Swap result calculation for non connected mode.
* Fixed About page text and styles.

* Fix i18n (#30)

* Updated Swap input width and Max swap behaviour. Updated Swap Info styles. (#29)

* PSS-271: Medium and GitHub links (#31)

* Added Github and Medium links for About page.
* Upated the Wallet version.
* Fixed wallet button color on hover.

* Calculate total suply

* PSS-216: Design Issues Fixing (#32)

* Updated content primary color.
* Fixed Price and Token areas horizontal alignment.
* Updated tooltips.
* Updated Generic Header tooltip.
* Updated Token item height for Select Token dialog.
* Added Token icons.
* Updated token icons  names.

* PSS-129: Create pair integration

* Remove mocks

* Refactoring

* Add network fee calculation

* Fixes

* PSS-281: Recalculate Input Values On Select Token (#33)

* Added util method to check isNumber value. Removed Max button from token To area.
* Added Max sold for reversed swap.
* Updated Swap Integration.
* Updated UI Lib version.
* Added recalc on Select Token.
* Fixed Swap for Polkadot.js
* Updated isExchangeB param in methods.
* Hid Node Address area for Settings popup.
* Added Network Fee field to Swap component.
* Updated Custom slippage tolerance for Settings.
* Fixed paste string value to Swap fields.
* Updated Network Fee calls, updated Wallet version, fixed swap tokens balance.
* Added isExchangeB parameter to swap call.

* Refactoring

* fix total supply

* PSS-129: Share of pool

* Remove share of pool mock

* Fix get asset symbol

* Hide add liquidity
Fix slippage tolerance for add liquidity
Fix share of pool
Fix unsupprted assets error message

* Disable max button for add liquidity
Reset values after change tokens

* Fixes

* Updated Tokens Icons, added PAL icon. (#35)

* Wallet connection issues (#38)

* Fix wallet connection issues

* Fix styles

* Update wallet version

* Update favicon.ico

* PSS-297: check fee on max amount

* PSS-295: Added Insufficient Balance Checking (#37)

* Added Insufficient balance checking.
* Updated FPNumber parameters.
* Removed formatNumber usage from Swap screens.
* Fixed focus and placeholders values for Swap.
* Updated some styles for huge number values.
* Refactored due to PR comments.

* Result Dialog Styles Fix (#41)

* Fixed Result Dialog button styles.
* Renamed USD icon.
* Update library
* Fix swap, liquidity behavior
* Update index.ts
* TODO: Revert this commit after PSS-309
* Updated wallet version.

Co-authored-by: Stefan Popov <[email protected]>

* PSS-273: WEB UI: Connect Wallet - Close button leads always on Exchange page, not to the previous page (#42)

* Fix routing issue

* Update wallet version

* PSS-295: Confirm Swap Insufficient Balance Checking (#43)

* Fixed console error on tokens switch.
* Added Is Insufficient Balance checking for Confirm Swap dialog.
* Updated Confirm Swap styles.

* Updated Swap info after Swap, added max button to init screen. (#44)

* Update ui library version (#46)

* Update ui library version

* Update wallet

* BP-312: Fixes for pool

* Fix icons position (#47)

* Fix icons position

* Fix logo

* PSS-287: Swap Amount Fields Formatting (#45)

* Added Swap fields formatter.
* Fixed Slippage Tolerance editing and Swap fields formatting.
* Updated wallet version.

* Change toString to toFixed

* Change formatNumber to toFixed

* Fix remove liquidity price

* Move back toFixed to toString

* Fixed estimated label existence for zero values (#50)

* Refactored, added some comments, fixed estimated label existence for zero values.

* Modify env config file (#49)

Co-authored-by: Bulat Saifullin <[email protected]>

* Add custom notifications & notification tracking service (#51)

* Add custom notifications & notification tracking service

* Update notifications & strings according to latest changes

* Update api

* Update soramitsu-variables.scss

* PSS-335: Designer Feedback Fixes FE (#53)

* Fixed functionality and layout bugs.
* Added draft component to fix layout behaviour.
* Fixed Settings behaviour.
* Swap: removed Result dialog, edited Network Fee tooltip.
* Fixed translation bugs.

* Account info implementation & fix loading state (#54)

* Add account info

* Fix styles

* Hide test assets (#55)

* Update connection

* Remove usdt mock

* Add liquidity issues & update notifications (#56)

* Add missing notifications

* Update RemoveLiquidity

* Fix add liquidity screen

* Add async loading of liquidity

* Fix pool issues

* Updated not connected pool interface message. (#60)

* PSS-300: Swap confirmation dialog message update (#61)

* Updated Swap confirmation dialog message.
* Confirm Swap Dialog: Updated message for max sold behaviour.

* Swap screen: Fixed Min Received/Max Sold area asset symbol. (#62)

* PSS-379: WEB UI. Add liquidity. Click MAX button on 0 balance of XOR (#59)

* Updated wallet version. Swap, Add Liquidity, Create Pair components: Updated Max button availability, refactored.
* Refactored due to PR comments.
* Swap, Add Liquidity: Fixed negative amount after max. Updated wallet version.

* Create pair implementation & fix liquidity issues (#63)

* Add create pair implementation & fix logic for add liquidity

* PSS-297: WEB UI: Restrict Adding liquidity if balance is insufficient (#64)

* Add Liquidity: Refactored Insufficient Balance.
* Create Pair, Remove Liquidity: Updated Max functionality.

* Add insufficient liquidity message for swap (#66)

* link @soramitsu/soraneo-wallet-web 0.4.6

* return network address

* use wallet routes in app.vue to correctly handle wallet icon click

* set changePage method as private

* removed local model for inputs: createPairModel

* refactoring CreatePair methods

* add input maxlength check

* fix inputMaxLength method

* improve formatNumberField method

* refactoring inputMaxLength method

* refactoring AddLiquidity view

* create TokenPair mixin

* wip refactoring

* add maxlength to removeLiquidity view inputs

* create TokenInputMixin

* add input handlers on removeLiquidity view

* handle swap inputs

* return commented line

* PSS-400: WEB UI. Minimum receive/Maximum sold token not changed (#69)

* Fixed min received/max sold symbol.

* Update wallet & api version (#70)

* fixes after review

* add store state interfaces

* PSS-467: On the swap screen user should be able to select all tokens excecpt pool tokens (#71)

* Update wallet & api version

* Fix swap with assets created by user

* Update wallet & api version

* add watcher for slippageTolerance in Swap.vue

* remove console lgos

* use state types in store mutations & getters

* apply transaction mixin changes from wallet

* update @soramitsu/soraneo-wallet-web dependency

* navigate to wallet connection view on wallet click (#75)

* PSS-419: restrict precision in inputs (#74)

* add TokenInput component

* use TokenInput in Swap.vue

* add ConfirmDialogMixin

* prepare to refactoring modals

* remove comments

* remove unneccessary actions

* add TODO comments

* fix TokenInput handler

* link js-ui-library with input fix

* PSS-398: WEB UI. Multiple click on Confirm - create multiple transactions. (#76)

* Fix multiple confirm for operations

* Fix notifications view

* Update env.json

* PSS-364: reuse s-float-input component (#77)

* prepare TokenInput component for export

* use s-float-input instead of TokenInput

* refactoring Settings component

* refactoring RemoveLiquidity

* Update wallet (#79)

* SFloatInput Fixes (#82)

* Reseted values and tokens for Add Liquidity and Create Pair components, added placeholders for all SFloatInput elements.

* PSS-378: WEB UI. Remove liquidity. Troubles with entering of amount manually (#83)

* Reseted values and tokens for Add Liquidity and Create Pair components, added placeholders for all SFloatInput elements.
* Remove liquidity: fixed fields editing and insufficient balance calculation.
* Remove Liquidity: Fixed editing behaviour.
* Updated due to PR comments.

* PSS-486: reset vuex values after transaction (#81)

* PSS-351: Show balance in select token dialog (#84)

* wip assetList

* fixes in swap

* fix types

* remove unused imports

* Refactoring Modals: add ConfirmTokenPairDialog component (#78)

* add ConfirmTokenPairDialog component

* add modal props fix and throw error on create pair failure

* fix openSelectTokenDialog method in Swap.vue(#86)

* PSS-350: Add clear button to select token search input (#85)

* add clear button

* refactoring mixin

* remove global style in SelectToken

* use global style for input button

* Update wallet (#87)

* Update wallet

* Change s-form-item to div in SelectToken dialog (#88)

* remove s-form-item

* change wrapper classname

* Refactoring swap view (#89)

* wip

* remove formModel

* add reset fields method

* wip swap values

* refactoring minMaxRecieved calls

* wip refactoring

* use exchangeB as source of truth

* use isExchangeB instead of activeField

* disable switch during values calculation

* recounting check

* use promise all for parallel calculation

* update ui library

* discarding env.json

* fixes after revie

* Hide balance in SelectToken dialog, if wallet not connected (#91)

* Add license (#92)

* PSS-248 Web UI: Settings - Problems with input in Custom field (#90)

* allow type any value

* fix error

* add local model

* PSS-418: Precision management (#93)

* Create NumberFormatterMixin.ts

* Improve precision management for pool

* Improve precision management for swap operation

* Improve precision management for select token dialog

* Update AddLiquidity.vue

* Improve precision management for remove liquidity operation

* Update todo sections

* Fix issues

* Update wallet & api versions

* Add balance updates

* Add zero string const

* update wallet (#94)

* PSS-351 Select Token fixes (#95)

* select-token fixes

* show 0 balance as -

Co-authored-by: alexnatalia <[email protected]>
Co-authored-by: Aleksandr Makhnev <[email protected]>
Co-authored-by: Bulat Saifullin <[email protected]>
Co-authored-by: Alex Natalia <[email protected]>
Co-authored-by: Dmitriy Creed <[email protected]>
Co-authored-by: alexnatalia <[email protected]>
Co-authored-by: Nikita Polyakov <[email protected]>
Co-authored-by: Nikita-Polyakov <[email protected]>
Co-authored-by: Nikita Polyakov <[email protected]>

* Release 0.1.3 (#100)

* PSS-516: WEB UI. Can go to remove liquidity page without liquidity on account (#96)

* Added Page Not Found Draft.
* Fixed Add and Remove Liquidity router bags, hid some screens for unauthorized access. Added redirect to exchange for Page Not Found error.
* Disabled selects for existed liquidity addition.

* Update Swap.vue (#99)

* Release 0.1.4 (#126)

* Add base project files

* Add About page

* Add unit tests

* Remove unused files

* Update library version

* Moved images to img folder.

* Refactored some styles, added normalize css.

* Fixed article card header font weight.

* Fix About snapshot

* Fix styles and its imports

* PSS-132: Token list store

* Add env.json and readme

* PSS-134  DevOps: Develop CI and CD processes for Polkaswap web project (#5)

* add ci cd

Signed-off-by: Bulat Saifullin <[email protected]>

* fix Dockerfile

Signed-off-by: Bulat Saifullin <[email protected]>

* add pull_request_template.md

Signed-off-by: Bulat Saifullin <[email protected]>

* fix template

Signed-off-by: Bulat Saifullin <[email protected]>

* PSS-132: Select token screen

* PSS-132: Refactoring

* PSS-132: Change short name to symbol

* PSS-132: Add i18n to select token

* PSS-132: Add unit tests

* PSS-132: Remove elements from tests

* Added Swap Interface draft (#4)

* Swap Interface: Added screen, Unit Tests, Updated UI Lib version.

* PSS-132: Create pair

* PSS-132: Fixes for select token

* PSS-132: Fix title style

* PSS-132: UPdate snaphots

* PSS-132: Fix shadow

* PSS-132: Fix variable style using

* Swap Interface Confirmation Screens (#8)

* Added Transaction Submit dialog.
* Swap Interface: Moved some variables to store for better relations between different screens and dialogs.
* Confirm Swap Dialog: Fixed dialog opening, added confirmation flag to the store.
* Added token default logo image, refactored translation call for liquidity.
* Added SelectToken dialog on click.

* PSS-126: Confirm supply modal

* Confirmation screens for create pair

* Design fixes

* Update ui lib

* PSS-126: Logo component

* Update tests

* Wallet integration and styles issues (#10)

* Wallet integration

* Fix routing issues

* Update UI library version

* Refactor all styles

* Fix wallet connected state

* Update tests

* Update test

* Update Dockerfile (#12)

* PSS-129: Add and remove liquidity page

* Design fixes

* Token logo check fixes

* Refactoring and fixes

* Add pair token logo for add liquidity

* Settings implementation (#15)

* Add settings dialog

* Add tests

* Update tests

* Fix titles for info card

* Pool Interface Start Screens (#11)

* Pool Interface: Added Start Screen.
* Refactored components due to UI Lib updates: set size and border-radius of elements.
* Created Dialog wrapper component, refactored dialogs, added fixed top position, fixed close behaviour.
* Refactored components imports.
* Converted logo icon to link to the home page.
* Fixed error in console for Create pair component.
* Added Back link behaviour for several components.
* Updated unit tests.

* PSS-172: Dynamic Page Title (#14)

* Added dynamic page title.

* PSS-128: Add confirmation screens for pool (#16)

* PSS-128: Add confirmation screens for pool
Co-authored-by: alexnatalia <[email protected]>

* Mocks for pool screen

* Refactoring

* Update tests

* Add liquidity button for pairs

* Design Fixes and Refactoring (#17)

* Refactored TokenLogo and PairTokenLogo components, fixed some bugs, updated unit tests. Refactored components headers.
* Added Popper class for info tooltips. Fixed default prop value for Object types. Updated Unit tests.

* Design Issues Fix (#19)

* Updated configuration variables and Exchange tabs styles.
* Updated About page images and styles, Header styles and Menu colors settings. Hid unused links and buttons in header.
* Updeted typography variables and Font Styles: Updated Font Size, Line Height and Font Weight Configuration. 
* Updated Create Pair button styles. Updated Ui Lib version.
* Fixed tokens icons for Pool screen.
* Updated tooltips to one consistent style. Fixed Pool screen bug. 
* Refactored: Created special component for Generic Header. Fixed Back icon.
* Updated some fonts and Pool screen styles.
* Added Empty icon for Select token popup.
* Added First Liquidity Provider message to Create a Pair screen.
* Hid tooltip for Slider element on Settings screen, hid tooltips for Swap Confirmation.
* Updated unit tests.

* PSS-205: Remove liquidity: everything should be clickable and with recalculation

* Update tests

* Fix set remove part to 0

* Inpur for remove part

* Fixes

* Price container fixes

* Update tests

* PS-223: Fix remove liquidity in safari

* PSS-205: Design Review Issues (#21)

* Fixed titles case. Updated buttons with text and icons. Updated typography styles.

* Update wallet version & add blockchain integration (#23)

* Update wallet version & add blockchain integration
* Commented out unit tests.

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

* PSS-123: Select token integration

* Fix async behavior for dexApi (#25)

* Fix async behavior for dexApi

* Update .eslintrc.js

* PSS-247: Custom Slippage Tolerance Fix (#27)

* Updated STab styles.
* Updated UI Lib and Wallet versions and styles according to UI Lib fixes.

* PSS-129: Add liquiditiy integration

* PSS-74 Swap Interface Integration (#26)

* Hid swap info for not connected wallet.
* Updated SelectToken search by name, added check for translation existance.
* Added Swap Integration.
* Refactored formatNumber calls.
* Hid swap info under buttons for zero amount.
* Fixed Header Menu colors.
* Fixed swap from Wallet assets.
* Updated tooltips.
* Updated About page text and Main menu links order.
* Fixed Card title color for About page.
* Updated Default token setting.
* Updated Wallet version.
* Hid Transaction Deadline area for Settings.
* Removed unneeded tooltip from Settings dialog.
* Added validation for Settings.
* Added validation for Insufficient Amount error from server.
* Added loading while not conencted, changed store to not strict mode, updated tokens setting in store.
* Fixed focused behaviour for Swap input fields.
* Fix wallet connection & select token behavior
* Fixed Min Received format.

Co-authored-by: Stefan Popov <[email protected]>

* Swap result calculation for non connected mode (#28)

* Fixed Swap result calculation for non connected mode.
* Fixed About page text and styles.

* Fix i18n (#30)

* Updated Swap input width and Max swap behaviour. Updated Swap Info styles. (#29)

* PSS-271: Medium and GitHub links (#31)

* Added Github and Medium links for About page.
* Upated the Wallet version.
* Fixed wallet button color on hover.

* Calculate total suply

* PSS-216: Design Issues Fixing (#32)

* Updated content primary color.
* Fixed Price and Token areas horizontal alignment.
* Updated tooltips.
* Updated Generic Header tooltip.
* Updated Token item height for Select Token dialog.
* Added Token icons.
* Updated token icons  names.

* PSS-129: Create pair integration

* Remove mocks

* Refactoring

* Add network fee calculation

* Fixes

* PSS-281: Recalculate Input Values On Select Token (#33)

* Added util method to check isNumber value. Removed Max button from token To area.
* Added Max sold for reversed swap.
* Updated Swap Integration.
* Updated UI Lib version.
* Added recalc on Select Token.
* Fixed Swap for Polkadot.js
* Updated isExchangeB param in methods.
* Hid Node Address area for Settings popup.
* Added Network Fee field to Swap component.
* Updated Custom slippage tolerance for Settings.
* Fixed paste string value to Swap fields.
* Updated Network Fee calls, updated Wallet version, fixed swap tokens balance.
* Added isExchangeB parameter to swap call.

* Refactoring

* fix total supply

* PSS-129: Share of pool

* Remove share of pool mock

* Fix get asset symbol

* Hide add liquidity
Fix slippage tolerance for add liquidity
Fix share of pool
Fix unsupprted assets error message

* Disable max button for add liquidity
Reset values after change tokens

* Fixes

* Updated Tokens Icons, added PAL icon. (#35)

* Wallet connection issues (#38)

* Fix wallet connection issues

* Fix styles

* Update wallet version

* Update favicon.ico

* PSS-297: check fee on max amount

* PSS-295: Added Insufficient Balance Checking (#37)

* Added Insufficient balance checking.
* Updated FPNumber parameters.
* Removed formatNumber usage from Swap screens.
* Fixed focus and placeholders values for Swap.
* Updated some styles for huge number values.
* Refactored due to PR comments.

* Result Dialog Styles Fix (#41)

* Fixed Result Dialog button styles.
* Renamed USD icon.
* Update library
* Fix swap, liquidity behavior
* Update index.ts
* TODO: Revert this commit after PSS-309
* Updated wallet version.

Co-authored-by: Stefan Popov <[email protected]>

* PSS-273: WEB UI: Connect Wallet - Close button leads always on Exchange page, not to the previous page (#42)

* Fix routing issue

* Update wallet version

* PSS-295: Confirm Swap Insufficient Balance Checking (#43)

* Fixed console error on tokens switch.
* Added Is Insufficient Balance checking for Confirm Swap dialog.
* Updated Confirm Swap styles.

* Updated Swap info after Swap, added max button to init screen. (#44)

* Update ui library version (#46)

* Update ui library version

* Update wallet

* BP-312: Fixes for pool

* Fix icons position (#47)

* Fix icons position

* Fix logo

* PSS-287: Swap Amount Fields Formatting (#45)

* Added Swap fields formatter.
* Fixed Slippage Tolerance editing and Swap fields formatting.
* Updated wallet version.

* Change toString to toFixed

* Change formatNumber to toFixed

* Fix remove liquidity price

* Move back toFixed to toString

* Fixed estimated label existence for zero values (#50)

* Refactored, added some comments, fixed estimated label existence for zero values.

* Modify env config file (#49)

Co-authored-by: Bulat Saifullin <[email protected]>

* Add custom notifications & notification tracking service (#51)

* Add custom notifications & notification tracking service

* Update notifications & strings according to latest changes

* Update api

* Update soramitsu-variables.scss

* PSS-335: Designer Feedback Fixes FE (#53)

* Fixed functionality and layout bugs.
* Added draft component to fix layout behaviour.
* Fixed Settings behaviour.
* Swap: removed Result dialog, edited Network Fee tooltip.
* Fixed translation bugs.

* Account info implementation & fix loading state (#54)

* Add account info

* Fix styles

* Hide test assets (#55)

* Update connection

* Remove usdt mock

* Add liquidity issues & update notifications (#56)

* Add missing notifications

* Update RemoveLiquidity

* Fix add liquidity screen

* Add async loading of liquidity

* Fix pool issues

* Updated not connected pool interface message. (#60)

* PSS-300: Swap confirmation dialog message update (#61)

* Updated Swap confirmation dialog message.
* Confirm Swap Dialog: Updated message for max sold behaviour.

* Swap screen: Fixed Min Received/Max Sold area asset symbol. (#62)

* PSS-379: WEB UI. Add liquidity. Click MAX button on 0 balance of XOR (#59)

* Updated wallet version. Swap, Add Liquidity, Create Pair components: Updated Max button availability, refactored.
* Refactored due to PR comments.
* Swap, Add Liquidity: Fixed negative amount after max. Updated wallet version.

* Create pair implementation & fix liquidity issues (#63)

* Add create pair implementation & fix logic for add liquidity

* PSS-297: WEB UI: Restrict Adding liquidity if balance is insufficient (#64)

* Add Liquidity: Refactored Insufficient Balance.
* Create Pair, Remove Liquidity: Updated Max functionality.

* Add insufficient liquidity message for swap (#66)

* link @soramitsu/soraneo-wallet-web 0.4.6

* return network address

* use wallet routes in app.vue to correctly handle wallet icon click

* set changePage method as private

* removed local model for inputs: createPairModel

* refactoring CreatePair methods

* add input maxlength check

* fix inputMaxLength method

* improve formatNumberField method

* refactoring inputMaxLength method

* refactoring AddLiquidity view

* create TokenPair mixin

* wip refactoring

* add maxlength to removeLiquidity view inputs

* create TokenInputMixin

* add input handlers on removeLiquidity view

* handle swap inputs

* return commented line

* PSS-400: WEB UI. Minimum receive/Maximum sold token not changed (#69)

* Fixed min received/max sold symbol.

* Update wallet & api version (#70)

* fixes after review

* add store state interfaces

* PSS-467: On the swap screen user should be able to select all tokens excecpt pool tokens (#71)

* Update wallet & api version

* Fix swap with assets created by user

* Update wallet & api version

* add watcher for slippageTolerance in Swap.vue

* remove console lgos

* use state types in store mutations & getters

* apply transaction mixin changes from wallet

* update @soramitsu/soraneo-wallet-web dependency

* navigate to wallet connection view on wallet click (#75)

* PSS-419: restrict precision in inputs (#74)

* add TokenInput component

* use TokenInput in Swap.vue

* add ConfirmDialogMixin

* prepare to refactoring modals

* remove comments

* remove unneccessary actions

* add TODO comments

* fix TokenInput handler

* link js-ui-library with input fix

* PSS-398: WEB UI. Multiple click on Confirm - create multiple transactions. (#76)

* Fix multiple confirm for operations

* Fix notifications view

* Update env.json

* PSS-364: reuse s-float-input component (#77)

* prepare TokenInput component for export

* use s-float-input instead of TokenInput

* refactoring Settings component

* refactoring RemoveLiquidity

* Update wallet (#79)

* SFloatInput Fixes (#82)

* Reseted values and tokens for Add Liquidity and Create Pair components, added placeholders for all SFloatInput elements.

* PSS-378: WEB UI. Remove liquidity. Troubles with entering of amount manually (#83)

* Reseted values and tokens for Add Liquidity and Create Pair components, added placeholders for all SFloatInput elements.
* Remove liquidity: fixed fields editing and insufficient balance calculation.
* Remove Liquidity: Fixed editing behaviour.
* Updated due to PR comments.

* PSS-486: reset vuex values after transaction (#81)

* PSS-351: Show balance in select token dialog (#84)

* wip assetList

* fixes in swap

* fix types

* remove unused imports

* Refactoring Modals: add ConfirmTokenPairDialog component (#78)

* add ConfirmTokenPairDialog component

* add modal props fix and throw error on create pair failure

* fix openSelectTokenDialog method in Swap.vue(#86)

* PSS-350: Add clear button to select token search input (#85)

* add clear button

* refactoring mixin

* remove global style in SelectToken

* use global style for input button

* Update wallet (#87)

* Update wallet

* Change s-form-item to div in SelectToken dialog (#88)

* remove s-form-item

* change wrapper classname

* Refactoring swap view (#89)

* wip

* remove formModel

* add reset fields method

* wip swap values

* refactoring minMaxRecieved calls

* wip refactoring

* use exchangeB as source of truth

* use isExchangeB instead of activeField

* disable switch during values calculation

* recounting check

* use promise all for parallel calculation

* update ui library

* discarding env.json

* fixes after revie

* Hide balance in SelectToken dialog, if wallet not connected (#91)

* Add license (#92)

* PSS-248 Web UI: Settings - Problems with input in Custom field (#90)

* allow type any value

* fix error

* add local model

* PSS-418: Precision management (#93)

* Create NumberFormatterMixin.ts

* Improve precision management for pool

* Improve precision management for swap operation

* Improve precision management for select token dialog

* Update AddLiquidity.vue

* Improve precision management for remove liquidity operation

* Update todo sections

* Fix issues

* Update wallet & api versions

* Add balance updates

* Add zero string const

* update wallet (#94)

* PSS-351 Select Token fixes (#95)

* select-token fixes

* show 0 balance as -

* PSS-516: WEB UI. Can go to remove liquidity page without liquidity on account (#96)

* Added Page Not Found Draft.
* Fixed Add and Remove Liquidity router bags, hid some screens for unauthorized access. Added redirect to exchange for Page Not Found error.
* Disabled selects for existed liquidity addition.

* Update Swap.vue (#99)

* Add namespace & types for swap (#101)

* Fix price and swap info (#104)

* Fix price calculations

* Update SwapInfo.vue

* Update wallet & api (#105)

* Fix swap links (#106)

* Fix swap links

* Update wallet

* Update api (#111)

* up wallet version (#112)

* Updated wallet version to 0.6.3 (#113)

* Updated wallet version to 0.6.4. (#114)

* Polkaswap layout redesign (#98) (#102)

* Polkaswap layout redesign (#98)

* pss-498 header redesign

* wip pss-496

* style fixes

* add HelpDialog component

* reexport package.json

* exchange routing fix

* add Rewards stub with coming soon text

* refactoring SidebarItemContent

* refactoring styles

* add FAUCET_URL to env.json

* fixes after review

* fix sidebar item hover css

* fix disabled item css

* Move bridge functionality (#103)

* pss-498 header redesign

* wip pss-496

* style fixes

* add HelpDialog component

* reexport package.json

* exchange routing fix

* add Rewards stub with coming soon text

* refactoring SidebarItemContent

* refactoring styles

* add FAUCET_URL to env.json

* fixes after review

* Move bridge functionality

Co-authored-by: Nikita-Polyakov <[email protected]>

* Update wallet & api

* PSS-524: Bridge (#107)

* pss-498 header redesign

* wip pss-496

* style fixes

* add HelpDialog component
* reexport package.json
* exchange routing fix
* add Rewards stub with coming soon text
* refactoring SidebarItemContent
* refactoring styles
* add FAUCET_URL to env.json
* fixes after review
* Move bridge functionality
* Bridge: Updated unauthorized routes.
* Updated Generic Page Header, updated Bridge screens.
* Fixed token icons.
* Bridge: Updated styles.
* Updated tooltips.
* Removed unused token images.
* Refactored due to PR comments.

Co-authored-by: Nikita-Polyakov <[email protected]>
Co-authored-by: Stefan Popov <[email protected]>

* Fix/pss 539 metamsk lock issue (#108)

* improve subscribers

* add check account is connected

* Fix/balance flickering (#109)

* wip update balance flow

* refactoring views and store modules

* remove unused code

* fixes after review

* Update yarn.lock

* Updated wallet version.

* Updated wallet version to 0.6.4.

* Updated wallet version to 0.6.5.

* PSS-540: Add Pending Transactions to Bridge History (#115)

* pss-498 header redesign

* wip pss-496

* style fixes

* add HelpDialog component

* reexport package.json

* exchange routing fix

* add Rewards stub with coming soon text

* refactoring SidebarItemContent

* refactoring styles

* add FAUCET_URL to env.json

* fixes after review

* Move bridge functionality

* Bridge: Updated unauthorized routes.

* Updated Generic Page Header, updated Bridge screens.

* Fixed token icons.

* Bridge: Updated styles.

* Updated tooltips.

* Removed btc icon.

* Updated due to PR comments.

* Updated due to PR comments.

* Reverted formatAddress changes.

* Added pending state.

* Updated wallet version.

* Fix bridge functionality

Co-authored-by: Nikita-Polyakov <[email protected]>
Co-authored-by: Stefan Popov <[email protected]>
Co-authored-by: Alex Natalia <[email protected]>

* Select dialog updates (#118)

* Modify select dialog
* Remove all symbol dependencies

* PSS-502: Swap And Pool Redesign (#117)

* Separated Swap and Pool.

* Changed assets filter from symbol to address.

* Updated wallet version to 0.7.1.

* Fixed assets addresses behaviour for bridge.

* Reverted previous version of the wallet, fixed some places due to PR comments.

Co-authored-by: Alex Natalia <[email protected]>

* Update styles and icons (#119)

* Fix styles and icons

* Update BrandedTooltip.vue

* Update wallet & ui library versions

* Update LICENSE

* Update package.json

* Fix issues

Co-authored-by: Stefan Popov <[email protected]>
Co-authored-by: Alex Natalia <[email protected]>
Co-authored-by: Alex Natalia <[email protected]>

* Redesign Updates (#120)

* Refactored buttons styles, changed some translation to common one.
* Updated tooltips, screens info area.
* Updated info blocks.
* Updated info blocks in confirmation and pool screens.
* Combined input area styles.
* Update About.vue
* GenericPageHeader: Changed default prop of tooltip placement.

Signed-off-by: alexnatalia <[email protected]>
Co-authored-by: Stefan Popov <[email protected]>

* update wallet to 0.7.4 (#121)

* remove getAssets from select-token dialog (#123)

* PSS-573 WEB UI. MAX button for bridge work incorrect. (#124)

* fix calc max value

* remove console.log

* update wallet 0.7.7 & hide farming in menu

* refactoring (#122)

* Fix issues (#125)

* Remove default values from props

* Fix issues

Co-authored-by: alexnatalia <[email protected]>
Co-authored-by: Aleksandr Makhnev <[email protected]>
Co-authored-by: Bulat Saifullin <[email protected]>
Co-authored-by: Alex Natalia <[email protected]>
Co-authored-by: Dmitriy Creed <[email protected]>
Co-authored-by: alexnatalia <[email protected]>
Co-authored-by: Nikita Polyakov <[email protected]>
Co-authored-by: Nikita-Polyakov <[email protected]>
Co-authored-by: Nikita Polyakov <[email protected]>
Co-authored-by: Alex Natalia <[email protected]>

* Release 0.1.5 (#158)

* Release 0.1.5 (#161)

* Release 0.1.6 (#170)

* Release 0.1.6 (#174)

* Release 0.1.7 (#190)

* Release 0.1.8 (#200)

* Release 0.1.9 (#206)

* Release 1.0.0 (#208)

* Update styles

* Update wallet

* Fix wait message for bridge eth->sora flow

* Fix page amount for bridge

* Fix bridge icons

* Fix swap checks for XOR output without XOR or with XOR balance < network fee

* Release 1.0.0 (#212)

* Release 1.0.0 (#215)

* Release 1.0.0 (#219)

* Release 1.0.1 (#226)

* Release 1.0.2 (#234)

* Release 1.1.0 (#244)

* PSS-281: Recalculate Input Values On Select Token (#33)

* Added util method to check isNumber value. Removed Max button from token To area.
* Added Max sold for reversed swap.
* Updated Swap Integration.
* Updated UI Lib version.
* Added recalc on Select Token.
* Fixed Swap for Polkadot.js
* Updated isExchangeB param in methods.
* Hid Node Address area for Settings popup.
* Added Network Fee field to Swap component.
* Updated Custom slippage tolerance for Settings.
* Fixed paste string value to Swap fields.
* Updated Network Fee calls, updated Wallet version, fixed swap tokens balance.
* Added isExchangeB parameter to swap call.

* Refactoring

* fix total supply

* PSS-129: Share of pool

* Remove share of pool mock

* Fix get asset symbol

* Hide add liquidity
Fix slippage tolerance for add liquidity
Fix share of pool
Fix unsupprted assets error message

* Disable max button for add liquidity
Reset values after change tokens

* Fixes

* Updated Tokens Icons, added PAL icon. (#35)

* Wallet connection issues (#38)

* Fix wallet connection issues

* Fix styles

* Update wallet version

* Update favicon.ico

* PSS-297: check fee on max amount

* PSS-295: Added Insufficient Balance Checking (#37)

* Added Insufficient balance checking.
* Updated FPNumber parameters.
* Removed formatNumber usage from Swap screens.
* Fixed focus and placeholders values for Swap.
* Updated some styles for huge number values.
* Refactored due to PR comments.

* Result Dialog Styles Fix (#41)

* Fixed Result Dialog button styles.
* Renamed USD icon.
* Update library
* Fix swap, liquidity behavior
* Update index.ts
* TODO: Revert this commit after PSS-309
* Updated wallet version.

Co-authored-by: Stefan Popov <[email protected]>

* PSS-273: WEB UI: Connect Wallet - Close button leads always on Exchange page, not to the previous page (#42)

* Fix routing issue

* Update wallet version

* PSS-295: Confirm Swap Insufficient Balance Checking (#43)

* Fixed console error on tokens switch.
* Added Is Insufficient Balance checking for Confirm Swap dialog.
* Updated Confirm Swap styles.

* Updated Swap info after Swap, added max button to init screen. (#44)

* Update ui library version (#46)

* Update ui library version

* Update wallet

* BP-312: Fixes for pool

* Fix icons position (#47)

* Fix icons position

* Fix logo

* PSS-287: Swap Amount Fields Formatting (#45)

* Added Swap fields formatter.
* Fixed Slippage Tolerance editing and Swap fields formatting.
* Updated wallet version.

* Change toString to toFixed

* Change formatNumber to toFixed

* Fix remove liquidity price

* Move back toFixed to toString

* Fixed estimated label existence for zero values (#50)

* Refactored, added some comments, fixed estimated label existence for zero values.

* Modify env config file (#49)

Co-authored-by: Bulat Saifullin <[email protected]>

* Add custom notifications & notification tracking service (#51)

* Add custom notifications & notification tracking service

* Update notifications & strings according to latest changes

* Update api

* Update soramitsu-variables.scss

* PSS-335: Designer Feedback Fixes FE (#53)

* Fixed functionality and layout bugs.
* Added draft component to fix layout behaviour.
* Fixed Settings behaviour.
* Swap: removed Result dialog, edited Network Fee tooltip.
* Fixed translation bugs.

* Account info implementation & fix loading state (#54)

* Add account info

* Fix styles

* Hide test assets (#55)

* Update connection

* Remove usdt mock

* Add liquidity issues & update notifications (#56)

* Add missing notifications

* Update RemoveLiquidity

* Fix add liquidity screen

* Add async loading of liquidity

* Fix pool issues

* Updated not connected pool interface message. (#60)

* PSS-300: Swap confirmation dialog message update (#61)

* Updated Swap confirmation dialog message.
* Confirm Swap Dialog: Updated message for max sold behaviour.

* Swap screen: Fixed Min Received/Max Sold area asset symbol. (#62)

* PSS-379: WEB UI. Add liquidity. Click MAX button on 0 balance of XOR (#59)

* Updated wallet version. Swap, Add Liquidity, Create Pair components: Updated Max button availability, refactored.
* Refactored due to PR comments.
* Swap, Add Liquidity: Fixed negative amount after max. Updated wallet version.

* Create pair implementation & fix liquidity issues (#63)

* Add create pair implementation & fix logic for add liquidity

* PSS-297: WEB UI: Restrict Adding liquidity if balance is insufficient (#64)

* Add Liquidity: Refactored Insufficient Balance.
* Create Pair, Remove Liquidity: Updated Max functionality.

* Add insufficient liquidity message for swap (#66)

* link @soramitsu/soraneo-wallet-web 0.4.6

* return network address

* use wallet routes in app.vue to correctly handle wallet icon click

* set changePage method as private

* removed local model for inputs: createPairModel

* refactoring CreatePair methods

* add input maxlength check

* fix inputMaxLength method

* improve formatNumberField method

* refactoring inputMaxLength method

* refactoring AddLiquidity view

* create TokenPair mixin

* wip refactoring

* add maxlength to removeLiquidity view inputs

* create TokenInputMixin

* add input handlers on removeLiquidity view

* handle swap inputs

* return commented line

* PSS-400: WEB UI. Minimum receive/Maximum sold token not changed (#69)

* Fixed min received/max sold symbol.

* Update wallet & api version (#70)

* fixes after review

* add store state interfaces

* PSS-467: On the swap screen user should be able to select all tokens excecpt pool tokens (#71)

* Update wallet & api version

* Fix swap with assets created by user

* Update wallet & api version

* add watcher for slippageTolerance in Swap.vue

* remove console lgos

* use state types in store mutations & getters

* apply transaction mixin changes from wallet

* update @soramitsu/soraneo-wallet-web dependency

* navigate to wallet connection view on wallet click (#75)

* PSS-419: restrict precision in inputs (#74)

* add TokenInput component

* use TokenInput in Swap.vue

* add ConfirmDialogMixin

* prepare to refactoring modals

* remove comments

* remove unneccessary actions

* add TODO comments

* fix TokenInput handler

* link js-ui-library with input fix

* PSS-398: WEB UI. Multiple click on Confirm - create multiple transactions. (#76)

* Fix multiple confirm for operations

* Fix notifications view

* Update env.json

* PSS-364: reuse s-float-input component (#77)

* prepare TokenInput component for export

* use s-float-input instead of TokenInput

* refactoring Settings component

* refactoring RemoveLiquidity

* Update wallet (#79)

* SFloatInput Fixes (#82)

* Reseted values and tokens for Add Liquidity and Create Pair components, added placeholders for all SFloatInput elements.

* PSS-378: WEB UI. Remove liquidity. Troubles with entering of amount manually (#83)

* Reseted values and tokens for Add Liquidity and Create Pair components, added placeholders for all SFloatInput elements.
* Remove liquidity: fixed fields editing and insufficient balance calculation.
* Remove Liquidity: Fixed editing behaviour.
* Updated due to PR comments.

* PSS-486: reset vuex values after transaction (#81)

* PSS-351: Show balance in select token dialog (#84)

* wip assetList

* fixes in swap

* fix types

* remove unused imports

* Refactoring Modals: add ConfirmTokenPairDialog component (#78)

* add ConfirmTokenPairDialog component

* add modal props fix and throw error on create pair failure

* fix openSelectTokenDialog method in Swap.vue(#86)

* PSS-350: Add clear button to select token search input (#85)

* add clear button

* refactoring mixin

* remove global style in SelectToken

* use global style for input button

* Update wallet (#87)

* Update wallet

* Change s-form-item to div in SelectToken dialog (#88)

* remove s-form-item

* change wrapper classname

* Refactoring swap view (#89)

* wip

* remove formModel

* add reset fields method

* wip swap values

* refactoring minMaxRecieved calls

* wip refactoring

* use exchangeB as source of truth

* use isExchangeB instead of activeField

* disable switch during values calculation

* recounting check

* use promise all for parallel calculation

* update ui library

* discarding env.json

* fixes after revie

* Hide balance in SelectToken dialog, if wallet not connected (#91)

* Add license (#92)

* PSS-248 Web UI: Settings - Problems with input in Custom field (#…
  • Loading branch information
1 parent 29bb145 commit 695c84e
Show file tree
Hide file tree
Showing 138 changed files with 8,763 additions and 2,032 deletions.
8 changes: 4 additions & 4 deletions env.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
"BASE_API_URL": "",
"API_KEYS": {
"moonpay": "pk_live_LEyw9bsfK0n0v3cdHUaZS1z0qYdDRDu6",
"x1ex": "sprkwdgt-WUQBA5U2",
"etherscan": "XBS98SSP8J5FNS7EKQHMHRU94Z2YG7HFFK",
"nftStorage": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkaWQ6ZXRocjoweDBmMzgwOTMyQTNDODM3ZDNiN2JEYzBBNTc0NmNkMDlBRGIyNUZGMzQiLCJpc3MiOiJuZnQtc3RvcmFnZSIsImlhdCI6MTY0NTU0MDQ4MTQ5OSwibmFtZSI6Im5mdC1zdG9yYWdlLXByb2QifQ.CnW1bq8eWEYQxA6cggGMeAqCTozCJZ6s2oL_bssqnmc",
"googleApi": "AIzaSyCazdRheGfy7_bwVi0m5UgUYjz7l0c54nM",
"googleClientId": "728106973134-pfmcagr0t4lchepajcp7llp7f1t09lf0.apps.googleusercontent.com"
},
"FEATURE_FLAGS": {
"moonpay": true,
"x1ex": false,
"charts": true,
"soraCard": false,
"orderBook": true
"orderBook": true,
"kensetsu": true,
"assetOwner": false
},
"SUBQUERY_ENDPOINT": "https://api.subquery.network/sq/sora-xor/sora-prod",
"SUBSQUID_ENDPOINT": "",
Expand Down Expand Up @@ -57,7 +57,7 @@
"Polkadot": true,
"PolkadotSora": true,
"PolkadotAcala": true,
"Liberland": false
"Liberland": true
},
"EVM_NETWORKS_IDS": [56, 8217],
"ETH_BRIDGE": {
Expand Down
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "polkaswap-exchange-web",
"version": "1.34.2",
"version": "1.35.0",
"repository": {
"type": "git",
"url": "https://github.com/sora-xor/polkaswap-exchange-web.git"
Expand All @@ -26,8 +26,9 @@
"test:all": "yarn test:unit --coverage"
},
"dependencies": {
"@cedelabs/widgets-universal": "^1.3.1",
"@metamask/detect-provider": "^2.0.0",
"@soramitsu/soraneo-wallet-web": "1.34.3-1",
"@soramitsu/soraneo-wallet-web": "1.34.7",
"@walletconnect/ethereum-provider": "^2.12.2",
"@walletconnect/modal": "^2.6.2",
"core-js": "^3.37.0",
Expand All @@ -53,7 +54,7 @@
"@types/electron-devtools-installer": "^2.2.5",
"@types/jest": "^29.5.12",
"@types/jsdom": "^21.1.6",
"@types/lodash": "^4.17.1",
"@types/lodash": "^4.17.3",
"@types/node": "^20.12.10",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
Expand All @@ -72,7 +73,7 @@
"@vue/vue2-jest": "^27.0.0",
"babel-plugin-require-context-hook": "^1.0.0",
"css-unicode-loader": "^1.0.3",
"electron": "^13.0.0",
"electron": "^30.0.6",
"electron-devtools-installer": "^3.2.0",
"eslint": "^7.32.0",
"eslint-plugin-import": "^2.29.1",
Expand Down
Binary file added public/asset-owner/dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/asset-owner/light.png
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 public/env.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
"BASE_API_URL": "",
"API_KEYS": {
"moonpay": "pk_test_4ASGxHKGpLPE6sdQq1V3QjtpUFSpWLk",
"x1ex": "sprkwdgt-WYL6QBNC",
"nftStorage": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkaWQ6ZXRocjoweDBmMzgwOTMyQTNDODM3ZDNiN2JEYzBBNTc0NmNkMDlBRGIyNUZGMzQiLCJpc3MiOiJuZnQtc3RvcmFnZSIsImlhdCI6MTY0MjU4OTQ2ODA4MSwibmFtZSI6Im5mdC1zdG9yYWdlLWRldiJ9.hkvzea9ltcriXXHKoYd3F2Iu1Y8X5H-zunAQboC_3vw",
"etherscan": "YBR7IWEBEXFICT8M7GRV77NBX4AXJ9T53H",
"googleApi": "AIzaSyAzj7JxB-j8pJixtt6JSqLPhG0y02CGYOU",
"googleClientId": "498393666682-9eeiioee0a2sgb1671e9qir645f9n6cv.apps.googleusercontent.com"
},
"FEATURE_FLAGS": {
"moonpay": true,
"x1ex": false,
"charts": true,
"soraCard": false,
"orderBook": true
"orderBook": true,
"kensetsu": true,
"assetOwner": false
},
"FAUCET_URL": "https://faucet.dev.sora2.tachi.soramitsu.co.jp/",
"DEFAULT_NETWORKS": [
Expand Down Expand Up @@ -41,7 +41,7 @@
}
],
"SUBQUERY_ENDPOINT": "https://api.subquery.network/sq/sora-xor/sora-dev",
"SUBSQUID_ENDPOINT": "https://squid.subsquid.io/sora-dev/v/v1/graphql",
"SUBSQUID_ENDPOINT": "https://sora.squids.live/sora-dev/v/v1/graphql",
"NETWORK_TYPE": "Dev",
"CHAIN_GENESIS_HASH": "",
"EVM_NETWORKS_IDS": [97, 1001],
Expand Down Expand Up @@ -76,4 +76,4 @@
"OTHER": "0x401c6A23a44f72151D90878DF0aa86E77fBde0e2"
}
}
}
}
5 changes: 0 additions & 5 deletions public/marketing.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
[
{
"title": "ORDERBOOK SURVEY",
"img": "/marketing/orderbook.png",
"link": "https://form.typeform.com/to/DMieGaJI"
},
{
"title": "GET SORA CARD",
"img": "/marketing/card.png",
Expand Down
Binary file removed public/marketing/orderbook.png
Binary file not shown.
30 changes: 11 additions & 19 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ import NodeErrorMixin from '@/components/mixins/NodeErrorMixin';
import SoraLogo from '@/components/shared/Logo/Sora.vue';
import { PageNames, Components, Language, BreakpointClass, Breakpoint, WalletPermissions } from '@/consts';
import { getLocale } from '@/lang';
import { isDashboardPage } from '@/modules/dashboard/router';
import { isVaultPage } from '@/modules/vault/router';
import router, { goTo, lazyComponent } from '@/router';
import { action, getter, mutation, state } from '@/store/decorators';
import { getMobileCssClasses, preloadFontFace, updateDocumentTitle } from '@/utils';
Expand Down Expand Up @@ -95,9 +97,9 @@ export default class App extends Mixins(mixins.TransactionMixin, NodeErrorMixin)
menuVisibility = false;
showConfirmInviteUser = false;
showNotifsDarkPage = false;
responsiveClass = BreakpointClass.LargeDesktop;
@state.settings.appConnection appConnection!: NodesConnection;
@state.settings.screenBreakpointClass private responsiveClass!: BreakpointClass;
@state.settings.appConnection private appConnection!: NodesConnection;
@state.settings.browserNotifPopupVisibility private browserNotifPopup!: boolean;
@state.settings.browserNotifPopupBlockedVisibility private browserNotifPopupBlocked!: boolean;
@state.wallet.account.assetsToNotifyQueue assetsToNotifyQueue!: Array<WhitelistArrayItem>;
Expand All @@ -123,7 +125,7 @@ export default class App extends Mixins(mixins.TransactionMixin, NodeErrorMixin)
@mutation.settings.setBrowserNotifsPopupBlocked private setBrowserNotifsPopupBlocked!: (flag: boolean) => void;
@mutation.settings.toggleDisclaimerDialogVisibility private toggleDisclaimerDialogVisibility!: FnWithoutArgs;
@mutation.settings.resetBlockNumberSubscription private resetBlockNumberSubscription!: FnWithoutArgs;
@mutation.settings.setScreenBreakpointClass private setScreenBreakpointClass!: (cssClass: string) => void;
@mutation.settings.setScreenBreakpointClass private setScreenBreakpointClass!: (windowWidth: number) => void;
@mutation.referrals.unsubscribeFromInvitedUsers private unsubscribeFromInvitedUsers!: FnWithoutArgs;
@mutation.web3.setEvmNetworksApp private setEvmNetworksApp!: (data: EvmNetwork[]) => void;
@mutation.web3.setSubNetworkApps private setSubNetworkApps!: (data: SubNetworkApps) => void;
Expand Down Expand Up @@ -198,21 +200,7 @@ export default class App extends Mixins(mixins.TransactionMixin, NodeErrorMixin)
}
private setResponsiveClass(): void {
const width = window.innerWidth;
if (width >= Breakpoint.HugeDesktop) {
this.responsiveClass = BreakpointClass.HugeDesktop;
} else if (width >= Breakpoint.LargeDesktop) {
this.responsiveClass = BreakpointClass.LargeDesktop;
} else if (width >= Breakpoint.Desktop) {
this.responsiveClass = BreakpointClass.Desktop;
} else if (width >= Breakpoint.Tablet) {
this.responsiveClass = BreakpointClass.Tablet;
} else if (width >= Breakpoint.LargeMobile) {
this.responsiveClass = BreakpointClass.LargeMobile;
} else if (width < Breakpoint.LargeMobile) {
this.responsiveClass = BreakpointClass.Mobile;
}
this.setScreenBreakpointClass(this.responsiveClass);
this.setScreenBreakpointClass(window.innerWidth);
}
private setResponsiveClassDebounced = debounce(this.setResponsiveClass, 250);
Expand Down Expand Up @@ -572,7 +560,11 @@ i.icon-divider {
}
@include desktop {
.app-main--swap {
.app-main--swap,
.app-main--vaults,
.app-main--vaultdetails,
.app-main--assetowner,
.app-main--assetownerdetails {
&.app-main {
.app-menu {
&:not(.collapsed) {
Expand Down
Binary file modified src/assets/fonts/polkaswap_icons.ttf
Binary file not shown.
14 changes: 8 additions & 6 deletions src/background.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ const isDevelopment = process.env.NODE_ENV !== 'production';
// Scheme must be registered before the app is ready
protocol.registerSchemesAsPrivileged([{ scheme: 'app', privileges: { secure: true, standard: true } }]);

async function createWindow() {
async function createWindow(): Promise<void> {
const ELECTRON_NODE_INTEGRATION = !!process.env.ELECTRON_NODE_INTEGRATION;
// Create the browser window.
const win = new BrowserWindow({
width: 800,
Expand All @@ -17,14 +18,14 @@ async function createWindow() {
webPreferences: {
// Use pluginOptions.nodeIntegration, leave this alone
// See nklayman.github.io/vue-cli-plugin-electron-builder/guide/security.html#node-integration for more info
nodeIntegration: process.env.ELECTRON_NODE_INTEGRATION as unknown as boolean,
contextIsolation: !process.env.ELECTRON_NODE_INTEGRATION,
nodeIntegration: ELECTRON_NODE_INTEGRATION,
contextIsolation: !ELECTRON_NODE_INTEGRATION,
},
});

if (process.env.WEBPACK_DEV_SERVER_URL) {
// Load the url of the dev server if in development mode
await win.loadURL(process.env.WEBPACK_DEV_SERVER_URL as string);
await win.loadURL(process.env.WEBPACK_DEV_SERVER_URL);
if (!process.env.IS_TEST) win.webContents.openDevTools();
} else {
createProtocol('app');
Expand All @@ -33,9 +34,10 @@ async function createWindow() {
}

// It's required for external links
win.webContents.on('new-window', function (e, url) {
e.preventDefault();
win.webContents.setWindowOpenHandler(({ url }) => {
// Prevent default behavior
shell.openExternal(url);
return { action: 'deny' };
});
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/App/Alerts/AlertList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ $list-items: 5;
font-weight: 300;
font-size: var(--s-font-size-medium);
line-height: 150%;
letter-spacing: -0.02em;
letter-spacing: var(--s-letter-spacing-small);
span {
margin-left: $inner-spacing-mini;
Expand Down
49 changes: 45 additions & 4 deletions src/components/App/Menu/AppMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,17 @@ import {
PoolChildPages,
BridgeChildPages,
RewardsChildPages,
StakingChildPages,
ExploreChildPages,
SidebarMenuGroups,
SidebarMenuItemLink,
FaucetLink,
} from '@/consts';
import { DashboardPageNames } from '@/modules/dashboard/consts';
import { isDashboardPage } from '@/modules/dashboard/router';
import { StakingPageNames } from '@/modules/staking/consts';
import { isStakingPage } from '@/modules/staking/router';
import { VaultPageNames } from '@/modules/vault/consts';
import { isVaultPage } from '@/modules/vault/router';
import { getter, mutation, state } from '@/store/decorators';
import AppInfoPopper from './AppInfoPopper.vue';
Expand All @@ -135,12 +139,34 @@ export default class AppMenu extends Mixins(TranslationMixin) {
@state.settings.menuCollapsed collapsed!: boolean;
@getter.settings.orderBookEnabled private orderBookEnabled!: boolean;
@getter.settings.kensetsuEnabled private kensetsuEnabled!: boolean;
@getter.settings.assetOwnerEnabled private assetOwnerEnabled!: boolean;
@getter.libraryTheme private libraryTheme!: Theme;
@mutation.settings.setMenuCollapsed private setMenuCollapsed!: (collapsed: boolean) => void;
readonly FaucetLink = FaucetLink;
private resizeObserver: Nullable<ResizeObserver> = null;
private onMenuWidthChange(): void {
const width = this.$el?.clientWidth ?? 0;
if (!width) return;
document.documentElement.style.setProperty('--sidebar-width', `${width}px`);
}
async mounted(): Promise<void> {
await this.$nextTick();
if (!(this.$el && window.ResizeObserver)) return;
this.resizeObserver = new ResizeObserver(this.onMenuWidthChange);
this.resizeObserver.observe(this.$el);
}
beforeDestroy(): void {
this.resizeObserver?.disconnect();
}
get collapseIcon(): string {
return this.collapsed ? 'arrows-chevron-right-24' : 'arrows-chevron-left-24';
}
Expand All @@ -154,10 +180,19 @@ export default class AppMenu extends Mixins(TranslationMixin) {
}
get sidebarMenuItems(): Array<SidebarMenuItemLink> {
let menuItems = SidebarMenuGroups;
if (!this.orderBookEnabled) {
return SidebarMenuGroups.filter(({ title }) => title !== PageNames.OrderBook);
menuItems = menuItems.filter(({ title }) => title !== PageNames.OrderBook);
}
if (!this.kensetsuEnabled) {
menuItems = menuItems.filter(({ title }) => title !== PageNames.VaultsContainer);
}
if (!this.assetOwnerEnabled) {
menuItems = menuItems.filter(({ title }) => title !== PageNames.AssetOwnerContainer);
}
return SidebarMenuGroups;
return menuItems;
}
get currentPath(): string {
Expand All @@ -171,12 +206,18 @@ export default class AppMenu extends Mixins(TranslationMixin) {
if (RewardsChildPages.includes(currentName)) {
return PageNames.Rewards;
}
if (StakingChildPages.includes(currentName)) {
if (isStakingPage(currentName)) {
return StakingPageNames.Staking;
}
if (ExploreChildPages.includes(currentName)) {
return PageNames.ExploreTokens;
}
if (isDashboardPage(currentName)) {
return DashboardPageNames.AssetOwner;
}
if (isVaultPage(currentName)) {
return VaultPageNames.Vaults;
}
return currentName as string;
}
Expand Down
Loading

0 comments on commit 695c84e

Please sign in to comment.