fix #7717
This commit is contained in:
parent
e3460de331
commit
efed6b32c5
@ -994,6 +994,9 @@ export interface ExchangeDetailedResponse {
|
||||
}
|
||||
|
||||
export interface WalletCoreVersion {
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
hash: string | undefined;
|
||||
version: string;
|
||||
exchange: string;
|
||||
|
1
packages/taler-wallet-core/.gitignore
vendored
1
packages/taler-wallet-core/.gitignore
vendored
@ -1,2 +1,3 @@
|
||||
/lib
|
||||
/coverage
|
||||
/src/version.json
|
||||
|
@ -12,7 +12,7 @@
|
||||
"author": "Florian Dold",
|
||||
"license": "GPL-3.0",
|
||||
"scripts": {
|
||||
"compile": "tsc --build",
|
||||
"compile": "jq '{version}' package.json > src/version.json && tsc --build",
|
||||
"pretty": "prettier --write src",
|
||||
"test": "tsc && ava",
|
||||
"coverage": "tsc && c8 --src src --all ava",
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -7,8 +7,10 @@
|
||||
"target": "ES2017",
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "Node16",
|
||||
"resolveJsonModule": true,
|
||||
"sourceMap": true,
|
||||
"lib": ["es6"],
|
||||
"resolvePackageJsonImports": true,
|
||||
"types": ["node"],
|
||||
"noImplicitReturns": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
@ -31,5 +33,8 @@
|
||||
"path": "../taler-util/"
|
||||
}
|
||||
],
|
||||
"include": ["src/**/*"]
|
||||
"include": [
|
||||
"src/**/*",
|
||||
"src/*.json"
|
||||
]
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
lockfileVersion: '6.0'
|
||||
lockfileVersion: '6.1'
|
||||
|
||||
settings:
|
||||
autoInstallPeers: true
|
||||
|
Loading…
Reference in New Issue
Block a user