diff --git a/patches/@nimiq+ledger-api+3.1.1.patch b/patches/@nimiq+ledger-api+3.1.1.patch index c8e4d09c..1ebc84c7 100644 --- a/patches/@nimiq+ledger-api+3.1.1.patch +++ b/patches/@nimiq+ledger-api+3.1.1.patch @@ -1,8 +1,20 @@ diff --git a/node_modules/@nimiq/ledger-api/dist/high-level-api/lazy-chunk-request-nimiq.es.js b/node_modules/@nimiq/ledger-api/dist/high-level-api/lazy-chunk-request-nimiq.es.js -index b05f20b..abab1bc 100644 +index b05f20b..b609e35 100644 --- a/node_modules/@nimiq/ledger-api/dist/high-level-api/lazy-chunk-request-nimiq.es.js +++ b/node_modules/@nimiq/ledger-api/dist/high-level-api/lazy-chunk-request-nimiq.es.js -@@ -46,7 +46,7 @@ async function loadNimiqAlbatrossCore(preloadWasm = true) { +@@ -27,7 +27,10 @@ const nimiqCoreBasePath = isNimiqAlbatrossHub + // On a Nimiq Hub with Albatross support, use the Hub's copy of the core (copied from @nimiq/albatross-wasm in the + // Hub's vue.config.js, which is an alias for @nimiq/core@next), same as the Hub itself is doing, to avoid using and + // loading an additional version. +- ? '/albatross-client/web/' ++ // TODO either automatically adapt the version, based on @nimiq/core's package.json (here in the patch, or in the ++ // the Ledger API itself), or ideally make the dependency an external one in the Ledger API, and try to inject it ++ // in vue.config.js. ++ ? '/nimiq/v2.0.5/web/' + // In other cases load @nimiq/core-web@next from jsdelivr. Load from cdn to avoid bundling a copy of core if it's + // not needed. This way, we also don't need to handle the wasm file in the rollup config. + : 'https://cdn.jsdelivr.net/npm/@nimiq/core@next/web/'; +@@ -46,7 +49,7 @@ async function loadNimiqAlbatrossCore(preloadWasm = true) { // exact same files as loaded by the Hub, i.e. there is no double loading happening as files will be already // cached. Also, calling init again when the wasm is already initialized, does not unnecessarily initialize // or fetch anything again. @@ -58,10 +70,22 @@ index 21e723b..be9606b 100644 export declare function loadNimiq(nimiqVersion: Version, inlcudeNimiqLegacyCryptography: boolean, preloadWasm?: boolean): Promise>; declare module './load-nimiq' { diff --git a/node_modules/@nimiq/ledger-api/dist/low-level-api/low-level-api.es.js b/node_modules/@nimiq/ledger-api/dist/low-level-api/low-level-api.es.js -index 5b18143..4984515 100644 +index 5b18143..6a45b5f 100644 --- a/node_modules/@nimiq/ledger-api/dist/low-level-api/low-level-api.es.js +++ b/node_modules/@nimiq/ledger-api/dist/low-level-api/low-level-api.es.js -@@ -49,7 +49,7 @@ async function loadNimiqAlbatrossCore(preloadWasm = true) { +@@ -30,7 +30,10 @@ const nimiqCoreBasePath = isNimiqAlbatrossHub + // On a Nimiq Hub with Albatross support, use the Hub's copy of the core (copied from @nimiq/albatross-wasm in the + // Hub's vue.config.js, which is an alias for @nimiq/core@next), same as the Hub itself is doing, to avoid using and + // loading an additional version. +- ? '/albatross-client/web/' ++ // TODO either automatically adapt the version, based on @nimiq/core's package.json (here in the patch, or in the ++ // the Ledger API itself), or ideally make the dependency an external one in the Ledger API, and try to inject it ++ // in vue.config.js. ++ ? '/nimiq/v2.0.5/web/' + // In other cases load @nimiq/core-web@next from jsdelivr. Load from cdn to avoid bundling a copy of core if it's + // not needed. This way, we also don't need to handle the wasm file in the rollup config. + : 'https://cdn.jsdelivr.net/npm/@nimiq/core@next/web/'; +@@ -49,7 +52,7 @@ async function loadNimiqAlbatrossCore(preloadWasm = true) { // exact same files as loaded by the Hub, i.e. there is no double loading happening as files will be already // cached. Also, calling init again when the wasm is already initialized, does not unnecessarily initialize // or fetch anything again.