diff --git a/typescript/api-reference/classes/EthereumWalletRegistry.md b/typescript/api-reference/classes/EthereumWalletRegistry.md index d32a85209..da2b3d34d 100644 --- a/typescript/api-reference/classes/EthereumWalletRegistry.md +++ b/typescript/api-reference/classes/EthereumWalletRegistry.md @@ -180,7 +180,7 @@ WalletRegistry.getDkgResultApprovedEvents #### Defined in -[lib/ethereum/wallet-registry.ts:126](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/wallet-registry.ts#L126) +[lib/ethereum/wallet-registry.ts:129](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/wallet-registry.ts#L129) ___ @@ -207,7 +207,7 @@ WalletRegistry.getDkgResultChallengedEvents #### Defined in -[lib/ethereum/wallet-registry.ts:151](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/wallet-registry.ts#L151) +[lib/ethereum/wallet-registry.ts:154](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/wallet-registry.ts#L154) ___ @@ -234,7 +234,7 @@ WalletRegistry.getDkgResultSubmittedEvents #### Defined in -[lib/ethereum/wallet-registry.ts:83](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/wallet-registry.ts#L83) +[lib/ethereum/wallet-registry.ts:86](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/wallet-registry.ts#L86) ___ diff --git a/typescript/src/lib/ethereum/wallet-registry.ts b/typescript/src/lib/ethereum/wallet-registry.ts index 9a70557e8..96dc261d4 100644 --- a/typescript/src/lib/ethereum/wallet-registry.ts +++ b/typescript/src/lib/ethereum/wallet-registry.ts @@ -8,7 +8,7 @@ import { ChainIdentifier, Chains, } from "../contracts" -import { backoffRetrier, Hex } from "../utils" +import { backoffRetrier, Hex, skipRetryWhenMatched } from "../utils" import { Event as EthersEvent } from "@ethersproject/contracts" import { BigNumber } from "ethers" import { @@ -66,13 +66,16 @@ export class EthereumWalletRegistry * @see {WalletRegistry#getWalletPublicKey} */ async getWalletPublicKey(walletID: Hex): Promise { - const publicKey = await backoffRetrier(this._totalRetryAttempts)( - async () => { - return await this._instance.getWalletPublicKey( - walletID.toPrefixedString() - ) - } - ) + const publicKey = await backoffRetrier( + this._totalRetryAttempts, + undefined, + undefined, + skipRetryWhenMatched(["Wallet with the given ID has not been registered"]) + )(async () => { + return await this._instance.getWalletPublicKey( + walletID.toPrefixedString() + ) + }) return Hex.from(publicKey.substring(2)) }