Skip to content

Commit 0982c00

Browse files
committed
Final PR comment actions
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
1 parent 79d012f commit 0982c00

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,3 +204,5 @@ The configurable retry settings are:
204204
- `RETRY_MAX_ATTEMPTS` (default `15`)
205205

206206
Setting `RETRY_CONDITION` to `""` disables retries. Setting `RETRY_MAX_ATTEMPTS` to `-1` causes it to retry indefinitely.
207+
208+
Note, the token connector will make a total of `RETRY_MAX_ATTEMPTS` + 1 calls for a given retryable call (1 original attempt and `RETRY_MAX_ATTEMPTS` retries)

src/tokens/blockchain.service.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ export class BlockchainConnectorService {
104104
private matchesRetryCondition(err: any): boolean {
105105
return (
106106
this.retryConfiguration.retryCondition != '' &&
107-
err?.toString().match(this.retryConfiguration.retryCondition) !== null
107+
`${err}`.match(this.retryConfiguration.retryCondition) !== null
108108
);
109109
}
110110

@@ -153,7 +153,7 @@ export class BlockchainConnectorService {
153153
const url = this.baseUrl;
154154
const response = await this.wrapError(
155155
this.retryableCall<EthConnectReturn>(async (): Promise<AxiosResponse<EthConnectReturn>> => {
156-
return await lastValueFrom(
156+
return lastValueFrom(
157157
this.http.post(
158158
url,
159159
{ headers: { type: queryHeader }, to, method, params },
@@ -178,7 +178,7 @@ export class BlockchainConnectorService {
178178
const response = await this.wrapError(
179179
this.retryableCall<EthConnectAsyncResponse>(
180180
async (): Promise<AxiosResponse<EthConnectAsyncResponse>> => {
181-
return await lastValueFrom(
181+
return lastValueFrom(
182182
this.http.post(
183183
url,
184184
{ headers: { id, type: sendTransactionHeader }, from, to, method, params },
@@ -195,7 +195,7 @@ export class BlockchainConnectorService {
195195
const url = this.baseUrl;
196196
const response = await this.wrapError(
197197
this.retryableCall<EventStreamReply>(async (): Promise<AxiosResponse<EventStreamReply>> => {
198-
return await lastValueFrom(
198+
return lastValueFrom(
199199
this.http.get(new URL(`/reply/${id}`, url).href, {
200200
validateStatus: status => status < 300 || status === 404,
201201
...this.requestOptions(ctx),

0 commit comments

Comments
 (0)