diff options
author | Sebastian <sebasjm@gmail.com> | 2024-03-01 10:50:17 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2024-03-01 10:50:17 -0300 |
commit | 1facde4ab16c8d943f16f7cb0ded8dc9104dacfd (patch) | |
tree | 14ee630a7e569779525b4e7a1c12a2fc650d41b4 /packages/taler-wallet-core/src | |
parent | d09c50bdb1f5eadc7aa64f38aedd07eb5beea039 (diff) | |
download | wallet-core-1facde4ab16c8d943f16f7cb0ded8dc9104dacfd.tar.xz |
send a new request id to wallet instead of client request id
Diffstat (limited to 'packages/taler-wallet-core/src')
-rw-r--r-- | packages/taler-wallet-core/src/wallet.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/taler-wallet-core/src/wallet.ts b/packages/taler-wallet-core/src/wallet.ts index 879508036..28d54fde3 100644 --- a/packages/taler-wallet-core/src/wallet.ts +++ b/packages/taler-wallet-core/src/wallet.ts @@ -530,13 +530,14 @@ async function dumpCoins(wex: WalletExecutionContext): Promise<CoinDumpJson> { /** * Get an API client from an internal wallet state object. */ +let id = 0; async function getClientFromWalletState( ws: InternalWalletState, ): Promise<WalletCoreApiClient> { - let id = 0; const client: WalletCoreApiClient = { async call(op, payload): Promise<any> { - const res = await handleCoreApiRequest(ws, op, `${id++}`, payload); + id = (id + 1) % (Number.MAX_SAFE_INTEGER - 100); + const res = await handleCoreApiRequest(ws, op, String(id), payload); switch (res.type) { case "error": throw TalerError.fromUncheckedDetail(res.error); |