Skip to content

Commit

Permalink
Release/1.12.0 (#904)
Browse files Browse the repository at this point in the history
* [PW-670] Provide environment variables for tst and dev stands on Polkaswap

* [PW-670] Provide environment variables for tst and dev stands on Polkaswap

* add plugin & adjust config (#672)

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

* enable NFT tab & add languages (#701)

* add Sonar

* 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 <[email protected]>
Co-authored-by: Nikita-Polyakov <[email protected]>
Co-authored-by: Nikita Polyakov <[email protected]>

* [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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>
Co-authored-by: Stefan Popov <[email protected]>

* Removed focus for tooltip. (#816)

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

* Fix max input value (#817)

* Fix max input value

* Update Swap.vue

* match contract addresses in lower case (#818)

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

* 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 <[email protected]>

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

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

* fix chart y label (#826)

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

* 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 <[email protected]>

* 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 <[email protected]>
Co-authored-by: Nikita-Polyakov <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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

* remove merge conflict files

* 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 <[email protected]>

* Fix custom token logic (#905)

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

* 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 <[email protected]>

* fix address css (#911)

Co-authored-by: Bao Tran <[email protected]>
Co-authored-by: Bao Nguyen Tran <[email protected]>
Co-authored-by: Rustem <[email protected]>
Co-authored-by: Pavel Varfolomeev <[email protected]>
Co-authored-by: wpi86 <[email protected]>
Co-authored-by: Alex Natalia <[email protected]>
Co-authored-by: Dmitriy Creed <[email protected]>
Co-authored-by: Stefan Popov <[email protected]>
Co-authored-by: alexnatalia <[email protected]>
Co-authored-by: Pavel Varfolomeev <[email protected]>
Co-authored-by: German Vechtomov <[email protected]>
  • Loading branch information
12 people authored Dec 30, 2022
1 parent 614433f commit 16e63e8
Show file tree
Hide file tree
Showing 118 changed files with 5,436 additions and 3,928 deletions.
16 changes: 12 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.11.0",
"version": "1.12.0",
"repository": {
"type": "git",
"url": "https://github.com/sora-xor/polkaswap-exchange-web.git"
Expand All @@ -25,19 +25,19 @@
},
"dependencies": {
"@metamask/detect-provider": "^2.0.0",
"@soramitsu/soraneo-wallet-web": "1.11.7",
"@soramitsu/soraneo-wallet-web": "1.12.13",
"@walletconnect/web3-provider": "^1.8.0",
"base-64": "^1.0.0",
"core-js": "^3.26.0",
"direct-vuex": "^0.12.1",
"echarts": "^5.4.0",
"echarts": "^5.4.1",
"ethers": "^5.7.2",
"jwt-decode": "^3.1.2",
"lodash": "^4.17.21",
"uuidv4": "^6.2.13",
"vue": "2.6.14",
"vue-class-component": "^7.2.6",
"vue-echarts": "^6.2.3",
"vue-echarts": "^6.3.3",
"vue-i18n": "^8.11.2",
"vue-plugin-load-script": "^2.x.x",
"vue-property-decorator": "^9.1.2",
Expand Down Expand Up @@ -91,6 +91,14 @@
"vue-svg-loader": "^0.16.0",
"vue-template-compiler": "2.6.14"
},
"resolutions": {
"@polkadot/extension-dapp": "^0.44.7",
"@polkadot/extension-inject": "^0.44.7",
"@polkadot/util": "^10.2.1",
"ipfs-unixfs": "6.0.6",
"ipfs-unixfs-exporter": "7.0.6",
"ipfs-unixfs-importer": "9.0.6"
},
"gitHooks": {
"pre-commit": "lint-staged"
},
Expand Down
45 changes: 25 additions & 20 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
<notification-enabling-page v-if="showNotifsDarkPage">
{{ t('browserNotificationDialog.pointer') }}
</notification-enabling-page>
<confirm-dialog v-if="isDesktop" />
</s-design-system-provider>
</template>

Expand Down Expand Up @@ -91,6 +92,7 @@ import type { FeatureFlags } from '@/store/settings/types';
BrowserNotifsEnableDialog: lazyComponent(Components.BrowserNotifsEnableDialog),
BrowserNotifsBlockedDialog: lazyComponent(Components.BrowserNotifsBlockedDialog),
NotificationEnablingPage: components.NotificationEnablingPage,
ConfirmDialog: components.ConfirmDialog,
MobilePopup,
},
})
Expand Down Expand Up @@ -121,25 +123,28 @@ export default class App extends Mixins(mixins.TransactionMixin, NodeErrorMixin)
@mutation.settings.setFeatureFlags private setFeatureFlags!: (data: FeatureFlags) => void;
@mutation.settings.setBrowserNotifsPopupEnabled private setBrowserNotifsPopup!: (flag: boolean) => void;
@mutation.settings.setBrowserNotifsPopupBlocked private setBrowserNotifsPopupBlocked!: (flag: boolean) => void;
@mutation.settings.resetBlockNumberSubscription private resetBlockNumberSubscription!: VoidFunction;
@mutation.rewards.unsubscribeAccountMarketMakerInfo private unsubscribeMarketMakerInfo!: VoidFunction;
@mutation.referrals.unsubscribeFromInvitedUsers private unsubscribeFromInvitedUsers!: VoidFunction;
@mutation.settings.resetBlockNumberSubscription private resetBlockNumberSubscription!: FnWithoutArgs;
@mutation.rewards.unsubscribeAccountMarketMakerInfo private unsubscribeMarketMakerInfo!: FnWithoutArgs;
@mutation.referrals.unsubscribeFromInvitedUsers private unsubscribeFromInvitedUsers!: FnWithoutArgs;
@mutation.web3.setSubNetworks private setSubNetworks!: (data: Array<SubNetwork>) => void;
@mutation.referrals.resetStorageReferrer private resetStorageReferrer!: VoidFunction;
@mutation.referrals.resetStorageReferrer private resetStorageReferrer!: FnWithoutArgs;
@action.wallet.settings.setApiKeys private setApiKeys!: (apiKeys: WALLET_TYPES.ApiKeysObject) => Promise<void>;
@action.wallet.subscriptions.resetNetworkSubscriptions private resetNetworkSubscriptions!: AsyncVoidFn;
@action.wallet.subscriptions.resetInternalSubscriptions private resetInternalSubscriptions!: AsyncVoidFn;
@action.wallet.subscriptions.activateNetwokSubscriptions private activateNetwokSubscriptions!: AsyncVoidFn;
@action.wallet.subscriptions.resetNetworkSubscriptions private resetNetworkSubscriptions!: AsyncFnWithoutArgs;
@action.wallet.subscriptions.resetInternalSubscriptions private resetInternalSubscriptions!: AsyncFnWithoutArgs;
@action.wallet.subscriptions.activateNetwokSubscriptions private activateNetwokSubscriptions!: AsyncFnWithoutArgs;
@action.settings.connectToNode private connectToNode!: (options: ConnectToNodeOptions) => Promise<void>;
@action.settings.setLanguage private setLanguage!: (lang: Language) => Promise<void>;
@action.settings.setBlockNumber private setBlockNumber!: AsyncVoidFn;
@action.settings.setBlockNumber private setBlockNumber!: AsyncFnWithoutArgs;
@action.web3.setSmartContracts private setSmartContracts!: (data: Array<SubNetwork>) => Promise<void>;
@action.referrals.getReferrer private getReferrer!: AsyncVoidFn;
@action.referrals.getReferrer private getReferrer!: AsyncFnWithoutArgs;
@action.wallet.account.notifyOnDeposit private notifyOnDeposit!: (info: {
asset: WhitelistArrayItem;
message: string;
}) => AsyncVoidFn;
}) => Promise<void>;
// [DESKTOP] To Enable Desktop
// @mutation.wallet.account.setIsDesktop private setIsDesktop!: (v: boolean) => void;
@Watch('assetsToNotifyQueue')
private handleNotifyOnDeposit(whitelistAssetArray: WhitelistArrayItem[]): void {
Expand Down Expand Up @@ -205,12 +210,16 @@ export default class App extends Mixins(mixins.TransactionMixin, NodeErrorMixin)
if (this.storageReferrer === this.account.address) {
this.resetStorageReferrer();
} else {
this.showConfirmInviteUser = true;
this.withApi(() => {
this.showConfirmInviteUser = true;
});
}
}
}
async created() {
// [DESKTOP] To Enable Desktop
// this.setIsDesktop(true);
// element-icons is not common used, but should be visible after network connection lost
preloadFontFace('element-icons');
Expand Down Expand Up @@ -565,14 +574,12 @@ i.icon-divider {
}
@include large-desktop(true) {
.app-main {
&.app-main--tokens {
.app-menu {
position: relative;
.app-main[class*='app-main--explore/'] {
.app-menu {
position: relative;
@include large-mobile(true) {
position: fixed;
}
@include large-mobile(true) {
position: fixed;
}
}
}
Expand Down Expand Up @@ -660,14 +667,12 @@ $sora-logo-width: 173.7px;
overflow: hidden;
.app-content .app-disclaimer-container {
min-width: 800px;
width: 100%;
max-width: 900px;
padding: 0 20px;
margin: 0 auto 120px;
}
.app-footer {
min-width: 800px;
justify-content: center;
}
}
Expand Down
13 changes: 5 additions & 8 deletions src/components/App/Header/AppHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -132,20 +132,17 @@ export default class AppHeader extends Mixins(WalletConnectMixin, NodeErrorMixin
&--history {
max-width: 134px;
.moonpay-button-text {
display: none;
@include large-mobile {
display: inline-block;
}
}
}
&-text {
display: none;
white-space: normal;
text-align: left;
letter-spacing: var(--s-letter-spacing-small);
@include large-mobile {
display: inline-block;
}
}
& i + &-text {
Expand Down
2 changes: 1 addition & 1 deletion src/components/App/Header/AppHeaderMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export default class AppHeaderMenu extends Mixins(TranslationMixin) {
@getter.libraryTheme private libraryTheme!: Theme;
@getter.settings.notificationActivated notificationActivated!: boolean;
@mutation.wallet.settings.toggleHideBalance private toggleHideBalance!: AsyncVoidFn;
@mutation.wallet.settings.toggleHideBalance private toggleHideBalance!: FnWithoutArgs;
@mutation.settings.setBrowserNotifsPopupEnabled private setBrowserNotifsPopupEnabled!: (flag: boolean) => void;
@mutation.settings.setBrowserNotifsPopupBlocked private setBrowserNotifsPopupBlocked!: (flag: boolean) => void;
@mutation.settings.setSelectLanguageDialogVisibility private setLanguageDialogVisibility!: (flag: boolean) => void;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,8 @@ const BLOCKS_IN_MONTH = BLOCKS_IN_DAY * 30;
},
})
export default class MarketMakerCountdown extends Mixins(mixins.NumberFormatterMixin, TranslationMixin) {
@action.rewards.subscribeOnAccountMarketMakerInfo
private subscribeOnAccountMarketMakerInfo!: AsyncVoidFn;
@mutation.rewards.unsubscribeAccountMarketMakerInfo
private unsubscribeAccountMarketMakerInfo!: VoidFunction;
@action.rewards.subscribeOnAccountMarketMakerInfo private subscribe!: AsyncFnWithoutArgs;
@mutation.rewards.unsubscribeAccountMarketMakerInfo private unsubscribe!: FnWithoutArgs;
@getter.wallet.account.isLoggedIn isLoggedIn!: boolean;
@getter.settings.nodeIsConnected nodeIsConnected!: boolean;
Expand All @@ -86,9 +83,9 @@ export default class MarketMakerCountdown extends Mixins(mixins.NumberFormatterM
@Watch('nodeIsConnected')
private async updateSubscriptions(value: boolean) {
if (value) {
await this.subscribeOnAccountMarketMakerInfo();
await this.subscribe();
} else {
this.unsubscribeAccountMarketMakerInfo();
this.unsubscribe();
}
}
Expand Down
23 changes: 14 additions & 9 deletions src/components/App/Menu/AppMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
text-color="var(--s-color-base-content-primary)"
:active-text-color="mainMenuActiveColor"
active-hover-color="transparent"
:default-active="getCurrentPath()"
:default-active="currentPath"
@select="onSelect"
>
<s-menu-item-group v-for="(item, index) in sidebarMenuItems" :key="index">
Expand Down Expand Up @@ -93,13 +93,14 @@ import {
BridgeChildPages,
RewardsChildPages,
StakingChildPages,
ExploreChildPages,
SidebarMenuGroups,
SidebarMenuItem,
FaucetLink,
Components,
} from '@/consts';
import router, { lazyComponent } from '@/router';
import { lazyComponent } from '@/router';
import { getter, state } from '@/store/decorators';
@Component({
Expand All @@ -111,7 +112,7 @@ import { getter, state } from '@/store/decorators';
export default class AppMenu extends Mixins(TranslationMixin) {
@Prop({ default: false, type: Boolean }) readonly visible!: boolean;
@Prop({ default: false, type: Boolean }) readonly isAboutPageOpened!: boolean;
@Prop({ default: () => {}, type: Function }) readonly onSelect!: VoidFunction;
@Prop({ default: () => {}, type: Function }) readonly onSelect!: FnWithoutArgs;
@state.settings.faucetUrl faucetUrl!: string;
@getter.settings.soraCardEnabled private soraCardEnabled!: boolean;
Expand All @@ -129,20 +130,24 @@ export default class AppMenu extends Mixins(TranslationMixin) {
return SidebarMenuGroups.filter((menuItem) => menuItem.title !== PageNames.SoraCard);
}
getCurrentPath(): string {
if (PoolChildPages.includes(router.currentRoute.name as PageNames)) {
get currentPath(): string {
const currentName = this.$route.name as any;
if (PoolChildPages.includes(currentName)) {
return PageNames.Pool;
}
if (BridgeChildPages.includes(router.currentRoute.name as PageNames)) {
if (BridgeChildPages.includes(currentName)) {
return PageNames.Bridge;
}
if (RewardsChildPages.includes(router.currentRoute.name as PageNames)) {
if (RewardsChildPages.includes(currentName)) {
return PageNames.Rewards;
}
if (StakingChildPages.includes(router.currentRoute.name as any)) {
if (StakingChildPages.includes(currentName)) {
return PageNames.StakingContainer;
}
return router.currentRoute.name as string;
if (ExploreChildPages.includes(currentName)) {
return PageNames.ExploreContainer;
}
return currentName as string;
}
openSoraDownloadDialog(): void {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ interface SortData {
export default class SortButton extends Vue {
@Prop({ default: '', type: String }) readonly name!: string;
@Prop({ default: () => ({}), type: Object }) readonly sort!: SortData;
@Prop({ default: SortDirection.DESC, type: String }) readonly defaultSort!: SortDirection;
get active(): boolean {
return this.name === this.sort.property;
Expand All @@ -36,9 +37,16 @@ export default class SortButton extends Vue {
}
onClick(): void {
const order =
this.name === this.sort.property
? this.sort.order === SortDirection.ASC
? SortDirection.DESC
: SortDirection.ASC
: this.defaultSort;
this.$emit('change-sort', {
property: this.name,
order: this.sort.order === SortDirection.ASC ? SortDirection.DESC : SortDirection.ASC,
order,
});
}
}
Expand Down
39 changes: 39 additions & 0 deletions src/components/Button/SvgIconButton/SvgIconButton.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<template>
<s-button :class="['svg-icon-button', { 's-pressed': active }]" type="action" v-bind="$attrs" v-on="$listeners">
<component :is="icon" :class="{ active }" />
</s-button>
</template>

<script lang="ts">
import { Component, Prop, Vue } from 'vue-property-decorator';
import { SvgIcons } from './icons';
const components = {
[SvgIcons.LineIcon]: () => import('@/assets/img/charts/line.svg?inline'),
[SvgIcons.CandleIcon]: () => import('@/assets/img/charts/candle.svg?inline'),
};
@Component({
components,
})
export default class SvgIconButton extends Vue {
@Prop({ default: false, type: Boolean }) readonly active!: boolean;
@Prop({ default: '', type: String }) readonly icon!: SvgIcons;
}
</script>

<style lang="scss">
.svg-icon-button {
svg {
& > path {
fill: var(--s-color-base-content-tertiary);
}
&.active {
& > path {
fill: var(--s-color-theme-accent);
}
}
}
}
</style>
4 changes: 4 additions & 0 deletions src/components/Button/SvgIconButton/icons.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export enum SvgIcons {
LineIcon = 'line-icon',
CandleIcon = 'candle-icon',
}
7 changes: 4 additions & 3 deletions src/components/ConfirmTokenPairDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ import { Component, Mixins, Prop } from 'vue-property-decorator';
import { components, mixins } from '@soramitsu/soraneo-wallet-web';
import TranslationMixin from '@/components/mixins/TranslationMixin';
import PoolApyMixin from '@/components/mixins/PoolApyMixin';
import { lazyComponent } from '@/router';
import { Components } from '@/consts';
import { AccountAsset } from '@sora-substrate/util/build/assets/types';
Expand All @@ -76,7 +77,8 @@ export default class ConfirmTokenPairDialog extends Mixins(
mixins.FormattedAmountMixin,
mixins.LoadingMixin,
mixins.DialogMixin,
TranslationMixin
TranslationMixin,
PoolApyMixin
) {
@Prop({ type: String, default: '100' }) readonly shareOfPool!: string;
@Prop({ type: Object }) readonly firstToken!: Nullable<AccountAsset>;
Expand Down Expand Up @@ -121,9 +123,8 @@ export default class ConfirmTokenPairDialog extends Mixins(
}
get strategicBonusApy(): Nullable<string> {
if (!this.secondToken) return null;
// It won't be in template when not defined
const strategicBonusApy = this.fiatPriceAndApyObject[this.secondToken.address]?.strategicBonusApy;
const strategicBonusApy = this.getPoolApy(this.firstToken?.address, this.secondToken?.address);
if (!strategicBonusApy) {
return null;
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/Moonpay/Moonpay.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import type { MoonpayTransaction } from '@/utils/moonpay';
})
export default class Moonpay extends Mixins(MoonpayBridgeInitMixin) {
widgetUrl = '';
transactionsPolling!: VoidFunction;
transactionsPolling!: FnWithoutArgs;
@getter.wallet.account.account private account!: WALLET_TYPES.PolkadotJsAccount;
@getter.wallet.account.isLoggedIn isLoggedIn!: boolean;
Expand All @@ -44,7 +44,7 @@ export default class Moonpay extends Mixins(MoonpayBridgeInitMixin) {
@state.moonpay.dialogVisibility private dialogVisibility!: boolean;
@mutation.moonpay.setDialogVisibility private setDialogVisibility!: (flag: boolean) => void;
@action.moonpay.createTransactionsPolling private createTransactionsPolling!: () => Promise<VoidFunction>;
@action.moonpay.createTransactionsPolling private createTransactionsPolling!: () => Promise<FnWithoutArgs>;
@Watch('isLoggedIn', { immediate: true })
private handleLoggedInStateChange(isLoggedIn: boolean): void {
Expand Down
Loading

0 comments on commit 16e63e8

Please sign in to comment.