@hyperbridge/sdk 1.3.8-canary-0000001 → 1.3.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2739,7 +2739,7 @@ type XcmGatewayParams = {
2739
2739
  * Note: There is no guarantee that both Dispatched and Finalized events will be yielded.
2740
2740
  * Consumers should listen for either one of these events instead of expecting both.
2741
2741
  *
2742
- * @param sourceApi - Polkadot API instance connected to the relay chain
2742
+ * @param sourceApi - Polkadot API instance connected to the relay chain or asset hub
2743
2743
  * @param sourceIsAssetHub - If `true` uses AssetHub Network for teleport
2744
2744
  * @param who - Sender's SS58Address address
2745
2745
  * @param options - Transaction signing options
@@ -5682,15 +5682,20 @@ function queryPostRequest(params) {
5682
5682
  }
5683
5683
  async function queryAssetTeleported(params) {
5684
5684
  const { id, queryClient } = params;
5685
- while (true) {
5686
- const response = await queryClient.request(ASSET_TELEPORTED_BY_PARAMS, {
5687
- id
5688
- });
5689
- if (response?.assetTeleported) {
5685
+ return await retryPromise(
5686
+ async () => {
5687
+ const response = await queryClient.request(ASSET_TELEPORTED_BY_PARAMS, { id });
5688
+ if (!response?.assetTeleported) {
5689
+ throw new Error(`AssetTeleportedEvent not found for ${id}`);
5690
+ }
5690
5691
  return response.assetTeleported;
5692
+ },
5693
+ {
5694
+ logMessage: "queryingAssetTeleported",
5695
+ backoffMs: 15e3,
5696
+ maxRetries: 15
5691
5697
  }
5692
- await sleep(2e3);
5693
- }
5698
+ );
5694
5699
  }
5695
5700
  function queryGetRequest(params) {
5696
5701
  return _queryGetRequestInternal(params);