From 5ae2613014283a9b7fb69dc4209c8ed25debb277 Mon Sep 17 00:00:00 2001 From: Paul <108695806+pxrl@users.noreply.github.com> Date: Wed, 11 Sep 2024 11:45:45 +0200 Subject: [PATCH 1/2] improve(clients): Add "NotReady" failure cause This is useful in the looping model where some SpokePoolClient instances will be updated faster than others. The looping model doesn't wait for the SpokePoolClient to be ready, so it's useful to signal that update did not occur, rather than assuming that it did. --- package.json | 2 +- src/clients/BaseAbstractClient.ts | 1 + src/clients/index.ts | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 689f7c50..dc03e905 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@across-protocol/sdk", "author": "UMA Team", - "version": "3.1.33", + "version": "3.1.34", "license": "AGPL-3.0", "homepage": "https://docs.across.to/reference/sdk", "files": [ diff --git a/src/clients/BaseAbstractClient.ts b/src/clients/BaseAbstractClient.ts index 6652c567..c7ca62ed 100644 --- a/src/clients/BaseAbstractClient.ts +++ b/src/clients/BaseAbstractClient.ts @@ -3,6 +3,7 @@ import { CachingMechanismInterface } from "../interfaces"; import { EventSearchConfig, isDefined, MakeOptional } from "../utils"; export enum UpdateFailureReason { + NotReady, AlreadyUpdated, BadRequest, RPCError, diff --git a/src/clients/index.ts b/src/clients/index.ts index 5f01f6d1..dce73a14 100644 --- a/src/clients/index.ts +++ b/src/clients/index.ts @@ -4,6 +4,7 @@ export { AcrossConfigStoreClient, ConfigStoreUpdate, } from "./AcrossConfigStoreClient"; +export { UpdateFailureReason } from "./BaseAbstractClient" export { HubPoolClient, LpFeeRequest } from "./HubPoolClient"; export { SpokePoolClient, SpokePoolUpdate } from "./SpokePoolClient"; export * as BundleDataClient from "./BundleDataClient"; From ce64409fbcbf7d6b8d3bab36b449e6ee0b560ea1 Mon Sep 17 00:00:00 2001 From: Paul <108695806+pxrl@users.noreply.github.com> Date: Wed, 11 Sep 2024 11:49:59 +0200 Subject: [PATCH 2/2] lint --- src/clients/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/clients/index.ts b/src/clients/index.ts index dce73a14..6e7d6ef0 100644 --- a/src/clients/index.ts +++ b/src/clients/index.ts @@ -4,7 +4,7 @@ export { AcrossConfigStoreClient, ConfigStoreUpdate, } from "./AcrossConfigStoreClient"; -export { UpdateFailureReason } from "./BaseAbstractClient" +export { UpdateFailureReason } from "./BaseAbstractClient"; export { HubPoolClient, LpFeeRequest } from "./HubPoolClient"; export { SpokePoolClient, SpokePoolUpdate } from "./SpokePoolClient"; export * as BundleDataClient from "./BundleDataClient";