diff options
Diffstat (limited to 'packages/taler-wallet-core/src')
-rw-r--r-- | packages/taler-wallet-core/src/wallet.ts | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/packages/taler-wallet-core/src/wallet.ts b/packages/taler-wallet-core/src/wallet.ts index 628a55e92..1f5c6ee3b 100644 --- a/packages/taler-wallet-core/src/wallet.ts +++ b/packages/taler-wallet-core/src/wallet.ts @@ -310,6 +310,7 @@ import { WalletCoreApiClient, WalletCoreResponseType, } from "./wallet-api-types.js"; +import versionInfo from "./version.json" assert { type: 'json' }; const logger = new Logger("wallet.ts"); @@ -1016,12 +1017,6 @@ export async function getClientFromWalletState( return client; } -declare const __VERSION__: string; -declare const __GIT_HASH__: string; - -const VERSION = typeof __VERSION__ !== "undefined" ? __VERSION__ : "dev"; -const GIT_HASH = typeof __GIT_HASH__ !== "undefined" ? __GIT_HASH__ : undefined; - /** * Implementation of the "wallet-core" API. */ @@ -1590,15 +1585,15 @@ async function dispatchRequestInternal<Op extends WalletApiOperation>( } export function getVersion(ws: InternalWalletState): WalletCoreVersion { - const version: WalletCoreVersion = { - hash: GIT_HASH, - version: VERSION, + const result: WalletCoreVersion = { + hash: undefined, + version: versionInfo.version, exchange: WALLET_EXCHANGE_PROTOCOL_VERSION, merchant: WALLET_MERCHANT_PROTOCOL_VERSION, bank: WALLET_BANK_INTEGRATION_PROTOCOL_VERSION, devMode: false, }; - return version; + return result; } /** |