From 493f0411a422fc838c2ad2339692dd9e020b3955 Mon Sep 17 00:00:00 2001 From: Paul <108695806+pxrl@users.noreply.github.com> Date: Wed, 11 Sep 2024 13:59:53 +0200 Subject: [PATCH] improve(clients): Add "NotReady" failure cause (#729) 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 689f7c50a..dc03e905a 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 6652c5679..c7ca62ed7 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 5f01f6d1f..6e7d6ef01 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";