summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/wallet.ts
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2023-08-02 07:40:28 -0300
committerSebastian <sebasjm@gmail.com>2023-08-02 07:40:28 -0300
commitefed6b32c5f4680f3175305985c4371517131927 (patch)
tree6263ce41c083b9eb802e92828b0df9844f978c5b /packages/taler-wallet-core/src/wallet.ts
parente3460de3317e2c0689cc32519cf5a02a142bfc99 (diff)
downloadwallet-core-efed6b32c5f4680f3175305985c4371517131927.tar.gz
wallet-core-efed6b32c5f4680f3175305985c4371517131927.tar.bz2
wallet-core-efed6b32c5f4680f3175305985c4371517131927.zip
fix #7717
Diffstat (limited to 'packages/taler-wallet-core/src/wallet.ts')
-rw-r--r--packages/taler-wallet-core/src/wallet.ts15
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;
}
/**