diff --git a/raiden-ts/CHANGELOG.md b/raiden-ts/CHANGELOG.md index 281ed7bfec..d3a1953f80 100644 --- a/raiden-ts/CHANGELOG.md +++ b/raiden-ts/CHANGELOG.md @@ -8,8 +8,10 @@ - [#2965] Remove `options.subkey` on certain `Raiden` public methods; if you need to force subkey or main account usage for single txs, set `config.subkey` then reset after tx is sent; default behavior is kept ### Fixed +- [#2913] Fix crash when starting client with `userDepositContractAddress` as contracts entrypoint on a `TokenNetworkRegistry` with no registered tokens yet - [#2963] Don't set channel as `closing` upon `channelClose.request`, allowing user to cancel Metamask's prompt and keep an usable channel; Channel becomes `closing` only after tx is sent +[#2913]: https://github.com/raiden-network/light-client/issues/2913 [#2949]: https://github.com/raiden-network/light-client/issues/2949 [#2952]: https://github.com/raiden-network/light-client/issues/2952 [#2953]: https://github.com/raiden-network/light-client/pull/2953 diff --git a/raiden-ts/src/helpers.ts b/raiden-ts/src/helpers.ts index 6a9a3e9500..508fdd59cb 100644 --- a/raiden-ts/src/helpers.ts +++ b/raiden-ts/src/helpers.ts @@ -410,14 +410,14 @@ export async function fetchContractsInfo( const serviceRegistry = (await monitoringServiceContract.service_registry()) as Address; const toBlock = await provider.getBlockNumber(); - let firstBlock = await firstValueFrom( + const firstBlock = await firstValueFrom( getLogsByChunk$(provider, { ...tokenNetworkRegistryContract.filters.TokenNetworkCreated(null, null), fromBlock: 1, toBlock, }).pipe(pluck('blockNumber'), filter(isntNil)), + { defaultValue: toBlock }, ); - firstBlock ??= 0; const oneToN = (await userDepositContract.one_to_n_address()) as Address;