diff options
author | Sebastian <sebasjm@gmail.com> | 2023-08-02 07:40:28 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2023-08-02 07:40:28 -0300 |
commit | efed6b32c5f4680f3175305985c4371517131927 (patch) | |
tree | 6263ce41c083b9eb802e92828b0df9844f978c5b /packages/taler-wallet-core/src | |
parent | e3460de3317e2c0689cc32519cf5a02a142bfc99 (diff) | |
download | wallet-core-efed6b32c5f4680f3175305985c4371517131927.tar.xz |
fix #7717
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; } /** |