From 83c50f8ade4caa8b72bb8979bfe217d5818c78e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren?= Date: Fri, 22 Nov 2024 19:20:59 -0600 Subject: [PATCH] Update @nimiq/core to v2.0.2, hopefully fixing transaction history queries --- package.json | 2 +- src/components/swap/SwapNotification.vue | 5 +++++ src/lib/StakingUtils.ts | 1 + yarn.lock | 15 +++++++++------ 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index a8609d22c..c2eb61674 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "@adapttive/vue-markdown": "^4.0.1", "@formatjs/intl-displaynames": "^3.3.4", "@linusborg/vue-simple-portal": "^0.1.4", - "@nimiq/core": "^2.0.1", + "@nimiq/core": "^2.0.2", "@nimiq/electrum-client": "https://github.com/nimiq/electrum-client#build", "@nimiq/fastspot-api": "^1.10.3", "@nimiq/hub-api": "^1.10.0", diff --git a/src/components/swap/SwapNotification.vue b/src/components/swap/SwapNotification.vue index 60990a07c..47e5802a6 100644 --- a/src/components/swap/SwapNotification.vue +++ b/src/components/swap/SwapNotification.vue @@ -384,6 +384,7 @@ export default defineComponent({ // Unreachable, as Erc20AssetHandler does not fire onUpdate } else { updateSwap({ + // @ts-expect-error Missmatch with Nimiq.PlainTransactionDetails from fastspot-api remoteFundingTx: tx, }); } @@ -404,6 +405,7 @@ export default defineComponent({ updateSwap({ state: SwapState.CREATE_OUTGOING, stateEnteredAt: Date.now(), + // @ts-expect-error Missmatch with Nimiq.PlainTransactionDetails from fastspot-api remoteFundingTx, }); } @@ -583,6 +585,7 @@ export default defineComponent({ activeSwap.value!.fundingSerializedTx!, (tx) => { updateSwap({ + // @ts-expect-error Missmatch with PlainTransactionDetails from fastspot-api fundingTx: tx as Transaction, }); currentError.value = null; @@ -604,6 +607,7 @@ export default defineComponent({ updateSwap({ state: SwapState.AWAIT_SECRET, stateEnteredAt: Date.now(), + // @ts-expect-error Missmatch with Nimiq.PlainTransactionDetails from fastspot-api fundingTx: fundingTx as Transaction, }); } catch (error: any) { @@ -894,6 +898,7 @@ export default defineComponent({ updateSwap({ state: SwapState.COMPLETE, stateEnteredAt: Date.now(), + // @ts-expect-error Missmatch with Nimiq.PlainTransactionDetails from fastspot-api settlementTx: settlementTx as Transaction, }); diff --git a/src/lib/StakingUtils.ts b/src/lib/StakingUtils.ts index c63bac3d2..74db88787 100644 --- a/src/lib/StakingUtils.ts +++ b/src/lib/StakingUtils.ts @@ -24,6 +24,7 @@ export function getPayoutText(payoutType: 'none' | 'direct' | 'restake') { export function getStakingTransactionMeaning(transaction: Transaction, verbose: boolean): string | null { if (transaction.sender === STAKING_CONTRACT_ADDRESS) { + // @ts-expect-error Missmatch with Nimiq.PlainTransactionDetails from fastspot-api switch (transaction.senderData.type) { case 'delete-validator': { const text = i18n.t('Delete validator') as string; diff --git a/yarn.lock b/yarn.lock index 2e0be4339..ccb4896ef 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1473,7 +1473,7 @@ dependencies: nanoid "^3.1.20" -"@nimiq/core@^2.0.0", "@nimiq/core@^2.0.1": +"@nimiq/core@^2.0.0": version "2.0.1" resolved "https://registry.yarnpkg.com/@nimiq/core/-/core-2.0.1.tgz#44d947058962c597a18e52d8e7b49c6c7492d138" integrity sha512-4YPfuxMkWgiLrEyC/ufbWnhccTe5i31s8ROwV/SV3Qd+dgaaxrHk0BWM8YmrFMfkDOj8lakenXq/4wzzqbtJ2Q== @@ -1481,6 +1481,14 @@ comlink "^4.4.1" websocket "^1.0.34" +"@nimiq/core@^2.0.2": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@nimiq/core/-/core-2.0.2.tgz#2ea39b8dda0965ff93f2eb0a544c69feed0c9ab3" + integrity sha512-xjJQxlf83wOVh8DTxGo+2Pi2szBEMw5eJJ9mrEcPFWE57Wov4PSsJ/KTQdbZBxztgK8QWJvhx7Hc5jEslWYzNw== + dependencies: + comlink "^4.4.1" + websocket "^1.0.34" + "@nimiq/electrum-client@https://github.com/nimiq/electrum-client#build": version "0.2.2" resolved "https://github.com/nimiq/electrum-client#4f706a0acb13b8e8abdf5be68cfc036eb102e3fc" @@ -3678,11 +3686,6 @@ caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001297, caniuse-lite@^1.0.30001646: resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001683.tgz" integrity sha512-iqmNnThZ0n70mNwvxpEC2nBJ037ZHZUoBI5Gorh1Mw6IlEAZujEoU1tXA628iZfzm7R9FvFzxbfdgml82a3k8Q== -caniuse-lite@^1.0.30001683: - version "1.0.30001683" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001683.tgz#7f026a2d5d319a9cf8915a1451173052caaadc81" - integrity sha512-iqmNnThZ0n70mNwvxpEC2nBJ037ZHZUoBI5Gorh1Mw6IlEAZujEoU1tXA628iZfzm7R9FvFzxbfdgml82a3k8Q== - case-sensitive-paths-webpack-plugin@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/case-sensitive-paths-webpack-plugin/-/case-sensitive-paths-webpack-plugin-2.3.0.tgz#23ac613cc9a856e4f88ff8bb73bbb5e989825cf7"