diff options
Diffstat (limited to 'packages/taler-wallet-core/src')
-rw-r--r-- | packages/taler-wallet-core/src/versions.ts | 8 | ||||
-rw-r--r-- | packages/taler-wallet-core/src/wallet.ts | 4 |
2 files changed, 10 insertions, 2 deletions
diff --git a/packages/taler-wallet-core/src/versions.ts b/packages/taler-wallet-core/src/versions.ts index eedaf68f6..f0f747e22 100644 --- a/packages/taler-wallet-core/src/versions.ts +++ b/packages/taler-wallet-core/src/versions.ts @@ -34,3 +34,11 @@ export const WALLET_MERCHANT_PROTOCOL_VERSION = "2:0:1"; * Uses libtool's current:revision:age versioning. */ export const WALLET_BANK_INTEGRATION_PROTOCOL_VERSION = "0:0:0"; + +/** + * Semver of the wallet-core implementation. + * Will be replaced with the value from package.json in a + * post-compilation step (inside lib/). + */ +export const WALLET_CORE_IMPLEMENTATION_VERSION = + "__WALLET_CORE_IMPLEMENTATION_VERSION__"; diff --git a/packages/taler-wallet-core/src/wallet.ts b/packages/taler-wallet-core/src/wallet.ts index 4a83db856..aab414e94 100644 --- a/packages/taler-wallet-core/src/wallet.ts +++ b/packages/taler-wallet-core/src/wallet.ts @@ -300,6 +300,7 @@ import { import { TimerAPI, TimerGroup } from "./util/timer.js"; import { WALLET_BANK_INTEGRATION_PROTOCOL_VERSION, + WALLET_CORE_IMPLEMENTATION_VERSION, WALLET_EXCHANGE_PROTOCOL_VERSION, WALLET_MERCHANT_PROTOCOL_VERSION, } from "./versions.js"; @@ -310,7 +311,6 @@ import { WalletCoreApiClient, WalletCoreResponseType, } from "./wallet-api-types.js"; -import versionInfo from "./version.json"; const logger = new Logger("wallet.ts"); @@ -1587,7 +1587,7 @@ async function dispatchRequestInternal<Op extends WalletApiOperation>( export function getVersion(ws: InternalWalletState): WalletCoreVersion { const result: WalletCoreVersion = { hash: undefined, - version: versionInfo.version, + version: WALLET_CORE_IMPLEMENTATION_VERSION, exchange: WALLET_EXCHANGE_PROTOCOL_VERSION, merchant: WALLET_MERCHANT_PROTOCOL_VERSION, bank: WALLET_BANK_INTEGRATION_PROTOCOL_VERSION, |