Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kensetsu #1352

Merged
merged 159 commits into from
May 21, 2024
Merged
Show file tree
Hide file tree
Changes from 148 commits
Commits
Show all changes
159 commits
Select commit Hold shift + click to select a range
e8d9188
Draft
stefashkaa Oct 26, 2023
ed50ed0
Merge branch 'develop' into feature/asset-owner
stefashkaa Oct 27, 2023
b551f89
Update BasePageMixin.ts
stefashkaa Nov 9, 2023
5b31da1
Update BasePageMixin.ts
stefashkaa Nov 9, 2023
93f719e
Merge branch 'develop' into feature/asset-owner
stefashkaa Nov 9, 2023
cc0d182
Merge branch 'develop' into feature/asset-owner
stefashkaa Nov 20, 2023
f12252e
Merge branch 'develop' into feature/asset-owner
stefashkaa Mar 7, 2024
8d7e45e
Update yarn.lock
stefashkaa Mar 7, 2024
5509488
Add asset owner page
stefashkaa Mar 15, 2024
048db7e
Merge branch 'develop' into feature/asset-owner
stefashkaa Mar 15, 2024
f25eaf4
Improve responsive class
stefashkaa Mar 17, 2024
2811c61
Fix responsive issues related to charts
stefashkaa Mar 17, 2024
fd690a2
Add send token tx & fix styles
stefashkaa Mar 17, 2024
185aefa
Add mint tx & fix styles during tx processing
stefashkaa Mar 17, 2024
e36bc89
Add burn tx & fix styles during tx processing
stefashkaa Mar 17, 2024
cec21e6
Fix disabled state for TokenInput with slider
stefashkaa Mar 17, 2024
2b91dbb
Support new update-name event for AddressBookInput
stefashkaa Mar 17, 2024
75344dc
Draft for token creation
stefashkaa Mar 17, 2024
975d833
Update vue.config.js
stefashkaa Mar 17, 2024
a9be756
Improve asset owner page
stefashkaa Mar 18, 2024
c99fdbb
Refactor Asset owner page
stefashkaa Mar 18, 2024
797e702
Add vault store
stefashkaa Mar 18, 2024
0c4d4e1
Update state.ts
stefashkaa Mar 18, 2024
b508751
Remove useless getter from vault
stefashkaa Mar 18, 2024
5932274
Update index.ts
stefashkaa Mar 18, 2024
66fe65d
Add bold prop for GenericPageHeader
stefashkaa Mar 19, 2024
102dfce
Add filter fn prop to SelectToken
stefashkaa Mar 19, 2024
7405686
Add kensetsu draft
stefashkaa Mar 19, 2024
405e0e5
Update AppMenu.vue
stefashkaa Mar 20, 2024
186c366
Use multiple quote subscriptions
stefashkaa Mar 20, 2024
810dff6
Update App.vue
stefashkaa Mar 20, 2024
7520ffd
Refactor CreateVaultDialog
stefashkaa Mar 20, 2024
26a23b0
Update Vaults page
stefashkaa Mar 20, 2024
48f4220
Fix max button for borrow amount
stefashkaa Mar 20, 2024
cd7d457
Improve styles
stefashkaa Mar 20, 2024
215a7a8
Add getLiquidationPenalty
stefashkaa Mar 20, 2024
ca1b9ea
Improve UI
stefashkaa Mar 20, 2024
3b3d523
Merge branch 'develop' into feature/kensetsu
stefashkaa Mar 21, 2024
b05e87e
Merge branch 'develop' into feature/kensetsu
stefashkaa Mar 22, 2024
dd934e8
Merge branch 'develop' into feature/kensetsu
stefashkaa Mar 25, 2024
4c821db
Fix
stefashkaa Mar 25, 2024
0caf39c
Update AssetOwnerDetails.vue
stefashkaa Mar 25, 2024
890d57d
Merge branch 'develop' into feature/kensetsu
stefashkaa Mar 25, 2024
e7ce5fd
Merge branch 'develop' into feature/kensetsu
stefashkaa Mar 26, 2024
b0aa20b
Merge branch 'develop' into feature/kensetsu
stefashkaa Mar 28, 2024
7074ea6
Update kusd
stefashkaa Mar 29, 2024
063f072
Fix LtvProgressBar styles
stefashkaa Mar 29, 2024
3613894
Fix negative value for XOR as collateral
stefashkaa Mar 29, 2024
7c2f7a5
Fix styles for Vaults page
stefashkaa Mar 29, 2024
3cefcef
Add draft for min deposit collateral
stefashkaa Mar 29, 2024
3d77722
Fix formatted values on Vaults page
stefashkaa Mar 29, 2024
6caabff
AddCollateralDialog draft
stefashkaa Mar 29, 2024
e7464a0
Merge branch 'develop' into feature/kensetsu
stefashkaa Mar 29, 2024
ff6ddc3
Update lib version
stefashkaa Mar 29, 2024
2564670
Add PrevNextInfoLine
stefashkaa Mar 29, 2024
995edb8
Add minDeposit check to Vault creation dialog
stefashkaa Mar 29, 2024
a85a81f
Add slot to prev-next-info-line
stefashkaa Mar 29, 2024
a33e7df
Fix styles for CreateVaultDialog
stefashkaa Mar 29, 2024
68f13f8
Add logic for AddCollateralDialog
stefashkaa Mar 29, 2024
3e72084
Update AddCollateralDialog.vue
stefashkaa Mar 30, 2024
c061741
Fix decimals issues
stefashkaa Mar 30, 2024
39fba65
Add BorrowMoreDialog
stefashkaa Mar 30, 2024
cb3161a
Update CreateVaultDialog.vue
stefashkaa Mar 30, 2024
0067b8b
Add RepayDebtDialog
stefashkaa Mar 30, 2024
b57c128
Improve dialogs error handling & reactivity
stefashkaa Mar 30, 2024
fbc161b
Add close vault dialog
stefashkaa Mar 30, 2024
2b5dfea
Add missed non-centered classes
stefashkaa Mar 30, 2024
4a8b8bc
TokenInput: remove focus & add balanceText prop
stefashkaa Mar 30, 2024
336475a
Merge branch 'develop' into feature/kensetsu
stefashkaa Mar 30, 2024
d0eeade
Improve numbers format for CloseVault and AddCollateral
stefashkaa Apr 1, 2024
c4ca661
Fix error icon size
stefashkaa Apr 1, 2024
9ff3c95
Improve LtvProgressBar
stefashkaa Apr 1, 2024
eda65b9
Merge branch 'develop' into feature/kensetsu
Naghme98 Apr 2, 2024
e7b59ee
Merge branch 'develop' into feature/kensetsu
stefashkaa Apr 2, 2024
289d6e0
Merge branch 'develop' into feature/kensetsu
stefashkaa Apr 9, 2024
8f279f0
Add new icons
stefashkaa Apr 10, 2024
47858ca
Update api
stefashkaa Apr 15, 2024
fb6f5d3
Add slippage tolerance component to Kensetsu
stefashkaa Apr 15, 2024
394c363
Add subscriptions
stefashkaa Apr 15, 2024
118cc39
Fix data kensetsu subscriptions
stefashkaa Apr 16, 2024
91343c9
Fix PW-1562
stefashkaa Apr 16, 2024
b6529ba
Update CreateVaultDialog.vue
stefashkaa Apr 16, 2024
0dd543a
Fix PW-1564
stefashkaa Apr 16, 2024
db4c90f
Add isAddCollateralUnavailable
stefashkaa Apr 16, 2024
fa59490
Update deps
stefashkaa Apr 17, 2024
48d4671
Remove ken distribution page
stefashkaa Apr 17, 2024
bbef4b7
Update translation strings
stefashkaa Apr 17, 2024
eb85096
Update en.json
stefashkaa Apr 17, 2024
f765a95
Add translation keys
stefashkaa Apr 18, 2024
417742c
Fix ltv calc and add en strings
stefashkaa Apr 18, 2024
d0d091c
Add translation strings
stefashkaa Apr 18, 2024
5105657
Merge branch 'develop' into feature/kensetsu
stefashkaa Apr 18, 2024
eb37f8f
Fix debt calc
stefashkaa Apr 18, 2024
e93d94a
Refactor templates
stefashkaa Apr 18, 2024
ac0deae
Update CloseVaultDialog.vue
stefashkaa Apr 18, 2024
5d1882c
Add history based translations
stefashkaa Apr 19, 2024
b8d459d
Update ru.json
stefashkaa Apr 19, 2024
22c696e
Improve translation strings for Kensetsu
stefashkaa Apr 20, 2024
527e6ae
Fix header styles
stefashkaa Apr 23, 2024
0989609
Add stats draft
stefashkaa Apr 25, 2024
7d0662c
Merge branch 'develop' into feature/kensetsu
stefashkaa May 8, 2024
3d29390
Update index.ts
stefashkaa May 8, 2024
109cdf0
Add stats
stefashkaa May 9, 2024
243048e
Adjust ltv with max ltv
stefashkaa May 9, 2024
99408bf
Fix format percent functions
stefashkaa May 9, 2024
5f25719
Add title divider for Vaults page
stefashkaa May 9, 2024
d493bd2
Add MAX LTV
stefashkaa May 9, 2024
b7b5fb5
Update ExploreCollaterals.vue
stefashkaa May 9, 2024
f55be94
Add kensetsu overall stats
stefashkaa May 10, 2024
232b0b6
Fix percents
stefashkaa May 10, 2024
e451cb2
Handle price tools error
stefashkaa May 10, 2024
8f787f7
Fix styles
stefashkaa May 10, 2024
e0ff485
Make borrow required during the vault creation
stefashkaa May 10, 2024
840d443
Improve vault creation dialog behaviour
stefashkaa May 10, 2024
34aa6e6
Check total available debt for collateral in Borrow More dialog
stefashkaa May 10, 2024
fa379cc
Fix
stefashkaa May 13, 2024
94cdcee
Improve hover icon
stefashkaa May 13, 2024
86a37d3
Add borrow tax to kusdAvailable for cdp creation
stefashkaa May 13, 2024
9cf408c
Update collaterals & reduce price subs updates
stefashkaa May 13, 2024
35baab5
Improve styles of CreateVaultDialog
stefashkaa May 14, 2024
868b46d
Add available check for explore collaterals
stefashkaa May 14, 2024
a2544b2
Prevent events if swap button is clicked
stefashkaa May 14, 2024
177f315
Exclude borrow tax from available to borrow
stefashkaa May 15, 2024
32629a8
Update BorrowMoreDialog.vue
stefashkaa May 15, 2024
d7d3c52
Add collaterals subscription per block
stefashkaa May 15, 2024
1a5e2a4
Add paddings for collateral stats
stefashkaa May 15, 2024
9d0f149
Add ResponsiveTabs component
stefashkaa May 15, 2024
0f8d15d
Update ResponsiveTabs.vue
stefashkaa May 15, 2024
cd7e07f
Merge branch 'develop' into feature/kensetsu
stefashkaa May 16, 2024
d3febda
Update substrate-js
stefashkaa May 16, 2024
d087b16
Update electron deps
stefashkaa May 16, 2024
abb604a
Improve responsive layouts for Kensetsu
stefashkaa May 17, 2024
7b181ef
Merge branch 'develop' into feature/kensetsu
stefashkaa May 17, 2024
563801d
Add feature flags
stefashkaa May 17, 2024
49bfc1e
Improve available debt checks for Explore collaterals
stefashkaa May 17, 2024
fd653c6
Fix borrow link in menu
stefashkaa May 17, 2024
c0d146e
Add --sidebar-width
stefashkaa May 18, 2024
776db29
Fix logout state for Explore collaterals
stefashkaa May 18, 2024
1cd29fa
Improve responsive design for Explore components
stefashkaa May 18, 2024
06741d5
Fix conflicts
stefashkaa May 18, 2024
fc0e13a
Merge branch 'develop' into feature/kensetsu
stefashkaa May 18, 2024
6463a2e
Stability fee -> Interest
stefashkaa May 18, 2024
e460ec2
Update messages.ts
stefashkaa May 18, 2024
c2ef1ce
Improve CreateVault & CloseVault translations
stefashkaa May 18, 2024
b5e91f9
Improve Vaults & VaultDetails translations
stefashkaa May 18, 2024
8f074c1
Update kensetsu translations (vault -> position))
stefashkaa May 18, 2024
e05ce79
Download files from lokalise
stefashkaa May 18, 2024
b484b02
Update ExploreCollaterals.vue
stefashkaa May 19, 2024
48de54a
Add kensetsu subquery queries
stefashkaa May 19, 2024
7ed3725
Add Vault Details History
stefashkaa May 19, 2024
cb7a2c5
Update VaultDetailsHistory.vue
stefashkaa May 20, 2024
f91be73
Merge remote-tracking branch 'origin/develop' into feature/kensetsu
Nikita-Polyakov May 20, 2024
80970dd
Add vaults history
stefashkaa May 20, 2024
b11d4a1
Merge branch 'feature/kensetsu' of https://github.com/sora-xor/polkas…
stefashkaa May 20, 2024
7065d31
Update package.json
stefashkaa May 20, 2024
bc88c83
Update package.json
stefashkaa May 20, 2024
c24b0c6
Fix checks
stefashkaa May 20, 2024
ff0bde9
Add missed translations
stefashkaa May 20, 2024
2f6b488
Update Vaults.vue
stefashkaa May 20, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion env.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
"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
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,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 +72,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 Expand Up @@ -100,7 +100,8 @@
"@polkadot/util": "^10.4.2",
"ipfs-unixfs": "6.0.6",
"ipfs-unixfs-exporter": "7.0.6",
"ipfs-unixfs-importer": "9.0.6"
"ipfs-unixfs-importer": "9.0.6",
"@sora-substrate/util": "1.34.6"
},
"gitHooks": {
"pre-commit": "lint-staged"
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.
4 changes: 3 additions & 1 deletion public/env.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
"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
29 changes: 19 additions & 10 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@
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';

Check warning on line 61 in src/App.vue

View check run for this annotation

Soramitsu-Sonar-PR-decoration / polkaswap-exchange-web Sonarqube Results

src/App.vue#L61

Remove this unused import of 'isDashboardPage'.
import { isVaultPage } from '@/modules/vault/router';

Check warning on line 62 in src/App.vue

View check run for this annotation

Soramitsu-Sonar-PR-decoration / polkaswap-exchange-web Sonarqube Results

src/App.vue#L62

Remove this unused import of 'isVaultPage'.
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 @@
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 Down Expand Up @@ -199,20 +201,23 @@

private setResponsiveClass(): void {
const width = window.innerWidth;
let newClass = this.responsiveClass;

if (width >= Breakpoint.HugeDesktop) {
this.responsiveClass = BreakpointClass.HugeDesktop;
newClass = BreakpointClass.HugeDesktop;
} else if (width >= Breakpoint.LargeDesktop) {
this.responsiveClass = BreakpointClass.LargeDesktop;
newClass = BreakpointClass.LargeDesktop;
} else if (width >= Breakpoint.Desktop) {
this.responsiveClass = BreakpointClass.Desktop;
newClass = BreakpointClass.Desktop;
} else if (width >= Breakpoint.Tablet) {
this.responsiveClass = BreakpointClass.Tablet;
newClass = BreakpointClass.Tablet;
} else if (width >= Breakpoint.LargeMobile) {
this.responsiveClass = BreakpointClass.LargeMobile;
newClass = BreakpointClass.LargeMobile;
} else if (width < Breakpoint.LargeMobile) {
this.responsiveClass = BreakpointClass.Mobile;
newClass = BreakpointClass.Mobile;
}
this.setScreenBreakpointClass(this.responsiveClass);

this.setScreenBreakpointClass(newClass);
}

private setResponsiveClassDebounced = debounce(this.setResponsiveClass, 250);
Expand Down Expand Up @@ -572,7 +577,11 @@
}

@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
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
11 changes: 7 additions & 4 deletions src/components/pages/Bridge/SelectAccount.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<dialog-base :visible.sync="visibility" :title="t('connection.selectAccount')" custom-class="account-select-dialog">
<div class="account-select">
<address-book-input v-model="address" :is-valid="validAddress" ref="input" />
<address-book-input ref="input" v-model="address" :is-valid="validAddress" @update-name="updateName" />

<s-button
class="s-typography-button--large account-select-button"
Expand Down Expand Up @@ -35,6 +35,7 @@ export default class BridgeSelectAccount extends Mixins(mixins.LoadingMixin, Tra
@mutation.web3.setSubAddress private setSubAddress!: (opts: { address: string; name: string }) => Promise<void>;

address = '';
private name = '';

@Watch('visibility')
private updateAddress(isVisible: boolean) {
Expand All @@ -54,11 +55,13 @@ export default class BridgeSelectAccount extends Mixins(mixins.LoadingMixin, Tra
}

handleSelectAddress(): void {
// [TODO] emit name from address-book-input
const name = this.address ? (this.$refs.input as any).name : '';
this.setSubAddress({ address: this.address, name });
this.setSubAddress({ address: this.address, name: this.name });
this.visibility = false;
}

updateName(name: string): void {
this.name = name;
}
}
</script>

Expand Down
2 changes: 1 addition & 1 deletion src/components/pages/OrderBook/BuySell.vue
Original file line number Diff line number Diff line change
Expand Up @@ -832,7 +832,7 @@ export default class BuySellWidget extends Mixins(
}

async singlePriceReachedLimit(): Promise<boolean> {
if (this.isMarketType) return false;
if (this.isMarketType || !this.quoteValue) return false;

const limitReached = !(await api.orderBook.isOrderPlaceable(
this.baseAsset.address,
Expand Down
6 changes: 3 additions & 3 deletions src/components/pages/Stats/NetworkStats.vue
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ export default class NetworkStats extends Mixins(mixins.LoadingMixin, Translatio
readonly FontSizeRate = WALLET_CONSTS.FontSizeRate;
readonly FontWeightRate = WALLET_CONSTS.FontWeightRate;
readonly filters = NETWORK_STATS_FILTERS;
readonly Arrow = String.fromCodePoint(0x2192);

filter = NETWORK_STATS_FILTERS[0];

Expand All @@ -91,7 +92,6 @@ export default class NetworkStats extends Mixins(mixins.LoadingMixin, Translatio

get columns() {
const { Sora, Ethereum } = this.TranslationConsts;
const Arrow = String.fromCodePoint(0x2192);

return [
{
Expand All @@ -105,12 +105,12 @@ export default class NetworkStats extends Mixins(mixins.LoadingMixin, Translatio
prop: 'accounts',
},
{
title: [Ethereum, Arrow, Sora].join(' '),
title: [Ethereum, this.Arrow, Sora].join(' '),
tooltip: this.t('tooltips.bridgeTransactions', { from: Ethereum, to: Sora }),
prop: 'bridgeIncomingTransactions',
},
{
title: [Sora, Arrow, Ethereum].join(' '),
title: [Sora, this.Arrow, Ethereum].join(' '),
tooltip: this.t('tooltips.bridgeTransactions', { from: Sora, to: Ethereum }),
prop: 'bridgeOutgoingTransactions',
},
Expand Down
Loading