@defuse-protocol/intents-sdk 0.62.0 → 0.62.1
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.
|
@@ -64,7 +64,7 @@ var HotBridge = class HotBridge {
|
|
|
64
64
|
}
|
|
65
65
|
parseAssetId(assetId) {
|
|
66
66
|
const parsed = require_parse_defuse_asset_id.parseDefuseAssetId(assetId);
|
|
67
|
-
if (!(parsed.contractId === _hot_labs_omni_sdk.
|
|
67
|
+
if (!(parsed.contractId === _hot_labs_omni_sdk.GlobalSettings.omniHotContract)) return null;
|
|
68
68
|
if (parsed.standard !== "nep245") throw new require_errors.UnsupportedAssetIdError(assetId, "Should start with \"nep245:\".");
|
|
69
69
|
const [chainId, address] = _hot_labs_omni_sdk.utils.fromOmni(parsed.tokenId).split(":");
|
|
70
70
|
if (chainId == null || address == null) throw new require_errors.UnsupportedAssetIdError(assetId, "Asset has invalid token id format.");
|
|
@@ -138,7 +138,7 @@ var HotBridge = class HotBridge {
|
|
|
138
138
|
token: "native" in assetInfo ? "native" : assetInfo.address,
|
|
139
139
|
receiver: args.withdrawalParams.destinationAddress
|
|
140
140
|
});
|
|
141
|
-
if (assetInfo.blockchain === require_caip2.Chains.Plasma && args.withdrawalParams.assetId !== feeAssetId) result.gasPrice *=
|
|
141
|
+
if (assetInfo.blockchain === require_caip2.Chains.Plasma && args.withdrawalParams.assetId !== feeAssetId) result.gasPrice *= 100n;
|
|
142
142
|
return result;
|
|
143
143
|
}, {
|
|
144
144
|
errorInstance: new require_error.HotWithdrawalApiFeeRequestTimeoutError(),
|
|
@@ -10,7 +10,7 @@ import { HotWithdrawStatus, MIN_GAS_AMOUNT } from "./hot-bridge-constants.js";
|
|
|
10
10
|
import { formatTxHash, getFeeAssetIdForChain, hotBlockchainInvariant, hotNetworkIdToCAIP2, toHotNetworkId } from "./hot-bridge-utils.js";
|
|
11
11
|
import isHex from "../../lib/hex.js";
|
|
12
12
|
import { assert, bridgeIndexer, withTimeout } from "@defuse-protocol/internal-utils";
|
|
13
|
-
import {
|
|
13
|
+
import { GlobalSettings, utils as utils$1 } from "@hot-labs/omni-sdk";
|
|
14
14
|
import { LRUCache } from "lru-cache";
|
|
15
15
|
import * as v from "valibot";
|
|
16
16
|
|
|
@@ -62,7 +62,7 @@ var HotBridge$1 = class HotBridge$1 {
|
|
|
62
62
|
}
|
|
63
63
|
parseAssetId(assetId) {
|
|
64
64
|
const parsed = parseDefuseAssetId(assetId);
|
|
65
|
-
if (!(parsed.contractId ===
|
|
65
|
+
if (!(parsed.contractId === GlobalSettings.omniHotContract)) return null;
|
|
66
66
|
if (parsed.standard !== "nep245") throw new UnsupportedAssetIdError(assetId, "Should start with \"nep245:\".");
|
|
67
67
|
const [chainId, address] = utils$1.fromOmni(parsed.tokenId).split(":");
|
|
68
68
|
if (chainId == null || address == null) throw new UnsupportedAssetIdError(assetId, "Asset has invalid token id format.");
|
|
@@ -136,7 +136,7 @@ var HotBridge$1 = class HotBridge$1 {
|
|
|
136
136
|
token: "native" in assetInfo ? "native" : assetInfo.address,
|
|
137
137
|
receiver: args.withdrawalParams.destinationAddress
|
|
138
138
|
});
|
|
139
|
-
if (assetInfo.blockchain === Chains.Plasma && args.withdrawalParams.assetId !== feeAssetId) result.gasPrice *=
|
|
139
|
+
if (assetInfo.blockchain === Chains.Plasma && args.withdrawalParams.assetId !== feeAssetId) result.gasPrice *= 100n;
|
|
140
140
|
return result;
|
|
141
141
|
}, {
|
|
142
142
|
errorInstance: new HotWithdrawalApiFeeRequestTimeoutError(),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@defuse-protocol/intents-sdk",
|
|
3
|
-
"version": "0.62.
|
|
3
|
+
"version": "0.62.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"typescript": "^5"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@hot-labs/omni-sdk": "2.
|
|
34
|
+
"@hot-labs/omni-sdk": "2.25.5",
|
|
35
35
|
"@isaacs/ttlcache": "^1.0.0",
|
|
36
36
|
"@lifeomic/attempt": "^3.0.0",
|
|
37
37
|
"@omni-bridge/core": "0.6.1",
|