Skip to content

Commit 70972a7

Browse files
committed
chore: update vue-router to be able to use addRoute
1 parent b04784b commit 70972a7

File tree

4 files changed

+12
-10
lines changed

4 files changed

+12
-10
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
"v-click-outside": "^3.0.1",
5454
"vue": "^2.6.11",
5555
"vue-i18n": "^8.15.5",
56-
"vue-router": "^3.1.6",
56+
"vue-router": "^3.5.0",
5757
"vue-virtual-scroller": "https://github.com/sisou/vue-virtual-scroller#nimiq/build",
5858
"webpack-i18n-tools": "https://github.com/nimiq/webpack-i18n-tools"
5959
},
@@ -87,4 +87,4 @@
8787
"vue-template-compiler": "^2.6.11"
8888
},
8989
"license": "Apache-2.0"
90-
}
90+
}

src/components/modals/Modal.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ const Modal = defineComponent({
8787
8888
while (context.root.$route.matched.find((routeRecord) => 'modal' in routeRecord.components
8989
|| 'persistent-modal' in routeRecord.components
90-
|| Object.values(routeRecord.components).some((component) => /modal/i.test(component.name || '')))
90+
|| Object.values(routeRecord.components).some((component) => /modal/i.test(
91+
'name' in component ? component.name as string : '')))
9192
) {
9293
context.root.$router.back();
9394

src/hub.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ import { WELCOME_MODAL_LOCALSTORAGE_KEY, WELCOME_STAKING_MODAL_LOCALSTORAGE_KEY
3838
import { usePwaInstallPrompt } from './composables/usePwaInstallPrompt';
3939
import type { SetupSwapWithKycResult, SWAP_KYC_HANDLER_STORAGE_KEY } from './swap-kyc-handler'; // avoid bundling
4040
import type { RelayServerInfo } from './lib/usdc/OpenGSN';
41+
import { HubApiMock, isPlaygroundEnabled } from './stores/Playground';
4142

4243
export function shouldUseRedirects(ignoreSettings = false): boolean {
4344
if (!ignoreSettings) {
@@ -125,7 +126,7 @@ hubApi.on(HubApi.RequestType.ONBOARD, async (accounts) => {
125126
processAndStoreAccounts(accounts);
126127

127128
// Open optional Welcome modal, Bitcoin activation modal or USDC activation modal if appropriate.
128-
await new Promise((resolve) => { router.onReady(resolve); });
129+
await new Promise<void>((resolve) => { router.onReady(resolve); });
129130
if (!areOptionalRedirectsAllowed(router.currentRoute)) return;
130131
const welcomeModalAlreadyShown = window.localStorage.getItem(WELCOME_MODAL_LOCALSTORAGE_KEY);
131132
const { requestType } = accounts[0];
@@ -390,7 +391,7 @@ export async function syncFromHub() {
390391
// for Ledgers USDC would not be enabled automatically on logins and the activation reminder on every app start
391392
// would be annoying for the user.
392393
const { activeAccountInfo } = useAccountStore();
393-
await new Promise((resolve) => { router.onReady(resolve); });
394+
await new Promise<void>((resolve) => { router.onReady(resolve); });
394395
if (
395396
areOptionalRedirectsAllowed(router.currentRoute)
396397
&& activeAccountInfo.value?.type === AccountType.BIP39 // Legacy accounts and Ledgers are not supported.
@@ -434,7 +435,7 @@ export async function onboard(asRedirect = false) {
434435
// automatically on login), optionally offer to activate it. After activation, the Bitcoin activation modal leads
435436
// into the Welcome modal if not shown yet.
436437
const { activeAccountInfo } = useAccountStore();
437-
await new Promise((resolve) => { router.onReady(resolve); });
438+
await new Promise<void>((resolve) => { router.onReady(resolve); });
438439
if (
439440
areOptionalRedirectsAllowed(router.currentRoute)
440441
&& activeAccountInfo.value

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10792,10 +10792,10 @@ vue-resize@^0.4.5:
1079210792
resolved "https://registry.yarnpkg.com/vue-resize/-/vue-resize-0.4.5.tgz#4777a23042e3c05620d9cbda01c0b3cc5e32dcea"
1079310793
integrity sha512-bhP7MlgJQ8TIkZJXAfDf78uJO+mEI3CaLABLjv0WNzr4CcGRGPIAItyWYnP6LsPA4Oq0WE+suidNs6dgpO4RHg==
1079410794

10795-
vue-router@^3.1.6:
10796-
version "3.4.9"
10797-
resolved "https://registry.yarnpkg.com/vue-router/-/vue-router-3.4.9.tgz#c016f42030ae2932f14e4748b39a1d9a0e250e66"
10798-
integrity sha512-CGAKWN44RqXW06oC+u4mPgHLQQi2t6vLD/JbGRDAXm0YpMv0bgpKuU5bBd7AvMgfTz9kXVRIWKHqRwGEb8xFkA==
10795+
vue-router@^3.5.0:
10796+
version "3.6.5"
10797+
resolved "https://registry.yarnpkg.com/vue-router/-/vue-router-3.6.5.tgz#95847d52b9a7e3f1361cb605c8e6441f202afad8"
10798+
integrity sha512-VYXZQLtjuvKxxcshuRAwjHnciqZVoXAjTjcqBTz4rKc8qih9g9pI3hbDjmqXaHdgL3v8pV6P8Z335XvHzESxLQ==
1079910799

1080010800
vue-style-loader@^4.1.0, vue-style-loader@^4.1.3:
1080110801
version "4.1.3"

0 commit comments

Comments
 (0)