@trustware/sdk-staging 1.1.8-staging.4 → 1.1.8-staging.5
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.
- package/dist/constants.cjs +1 -1
- package/dist/constants.mjs +1 -1
- package/dist/{core-B9PJ0mUX.d.cts → core-BcoaMbJ6.d.cts} +1 -1
- package/dist/{core-DrWK6PT3.d.ts → core-BqqBQ5nF.d.ts} +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.d.cts +2 -2
- package/dist/core.d.ts +2 -2
- package/dist/core.mjs +1 -1
- package/dist/{detect-BLE9aPwJ.d.ts → detect-F6garpnf.d.ts} +1 -1
- package/dist/{detect-Dn7A-Svt.d.cts → detect-srLQtIzU.d.cts} +1 -1
- package/dist/index.cjs +31 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.mjs +31 -4
- package/dist/index.mjs.map +1 -1
- package/dist/{manager-C85ARoxD.d.cts → manager-BWmNEeZb.d.cts} +7 -0
- package/dist/{manager-PBjHXKjh.d.ts → manager-BojJyYIt.d.ts} +7 -0
- package/dist/smart-account.cjs +1 -1
- package/dist/smart-account.mjs +1 -1
- package/dist/wallet.cjs +1 -1
- package/dist/wallet.d.cts +3 -3
- package/dist/wallet.d.ts +3 -3
- package/dist/wallet.mjs +1 -1
- package/dist/widget.cjs +31 -4
- package/dist/widget.cjs.map +1 -1
- package/dist/widget.mjs +31 -4
- package/dist/widget.mjs.map +1 -1
- package/package.json +1 -1
package/dist/constants.cjs
CHANGED
|
@@ -30,7 +30,7 @@ __export(constants_exports, {
|
|
|
30
30
|
});
|
|
31
31
|
module.exports = __toCommonJS(constants_exports);
|
|
32
32
|
var SDK_NAME = "@trustware/sdk";
|
|
33
|
-
var SDK_VERSION = "1.1.8-staging.
|
|
33
|
+
var SDK_VERSION = "1.1.8-staging.5";
|
|
34
34
|
var API_ROOT = "https://bv-staging-api.trustware.io";
|
|
35
35
|
var GTM_ID = "GTM-TZDGNCXB";
|
|
36
36
|
var API_PREFIX = "/api";
|
package/dist/constants.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as BuildRouteResult, T as Transaction, w as TrustwareConfigOptions, Q as WalletInterFaceAPI, k as ResolvedTrustwareConfig, N as WalletIdentity, a8 as walletManager, G as WalletAddressResolution, Y as buildRoute, X as buildDepositAddress, a2 as submitReceipt, $ as getStatus, a0 as pollStatus } from './manager-
|
|
1
|
+
import { B as BuildRouteResult, T as Transaction, w as TrustwareConfigOptions, Q as WalletInterFaceAPI, k as ResolvedTrustwareConfig, N as WalletIdentity, a8 as walletManager, G as WalletAddressResolution, Y as buildRoute, X as buildDepositAddress, a2 as submitReceipt, $ as getStatus, a0 as pollStatus } from './manager-BWmNEeZb.cjs';
|
|
2
2
|
import { C as ChainDef, c as ChainType, B as BalanceRow, a as BalanceStreamOptions, W as WalletAddressBalanceWrapper } from './blockchain-BONedEsU.cjs';
|
|
3
3
|
import { T as Token } from './types-B3nKHW6H.cjs';
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as BuildRouteResult, T as Transaction, w as TrustwareConfigOptions, Q as WalletInterFaceAPI, k as ResolvedTrustwareConfig, N as WalletIdentity, a8 as walletManager, G as WalletAddressResolution, Y as buildRoute, X as buildDepositAddress, a2 as submitReceipt, $ as getStatus, a0 as pollStatus } from './manager-
|
|
1
|
+
import { B as BuildRouteResult, T as Transaction, w as TrustwareConfigOptions, Q as WalletInterFaceAPI, k as ResolvedTrustwareConfig, N as WalletIdentity, a8 as walletManager, G as WalletAddressResolution, Y as buildRoute, X as buildDepositAddress, a2 as submitReceipt, $ as getStatus, a0 as pollStatus } from './manager-BojJyYIt.js';
|
|
2
2
|
import { C as ChainDef, c as ChainType, B as BalanceRow, a as BalanceStreamOptions, W as WalletAddressBalanceWrapper } from './blockchain-BONedEsU.js';
|
|
3
3
|
import { T as Token } from './types-MtdjJgwT.js';
|
|
4
4
|
|
package/dist/core.cjs
CHANGED
|
@@ -83,7 +83,7 @@ var init_constants = __esm({
|
|
|
83
83
|
"src/constants.ts"() {
|
|
84
84
|
"use strict";
|
|
85
85
|
SDK_NAME = "@trustware/sdk";
|
|
86
|
-
SDK_VERSION = "1.1.8-staging.
|
|
86
|
+
SDK_VERSION = "1.1.8-staging.5";
|
|
87
87
|
API_ROOT = "https://bv-staging-api.trustware.io";
|
|
88
88
|
API_PREFIX = "/api";
|
|
89
89
|
WALLETCONNECT_PROJECT_ID = "72ea74c400f5111d43aea638d7d83a24";
|
package/dist/core.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { T as Trustware, a as TrustwareCore } from './core-
|
|
2
|
-
import './manager-
|
|
1
|
+
export { T as Trustware, a as TrustwareCore } from './core-BcoaMbJ6.cjs';
|
|
2
|
+
import './manager-BWmNEeZb.cjs';
|
|
3
3
|
import './blockchain-BONedEsU.cjs';
|
|
4
4
|
import './types-B3nKHW6H.cjs';
|
package/dist/core.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { T as Trustware, a as TrustwareCore } from './core-
|
|
2
|
-
import './manager-
|
|
1
|
+
export { T as Trustware, a as TrustwareCore } from './core-BqqBQ5nF.js';
|
|
2
|
+
import './manager-BojJyYIt.js';
|
|
3
3
|
import './blockchain-BONedEsU.js';
|
|
4
4
|
import './types-MtdjJgwT.js';
|
package/dist/core.mjs
CHANGED
|
@@ -61,7 +61,7 @@ var init_constants = __esm({
|
|
|
61
61
|
"src/constants.ts"() {
|
|
62
62
|
"use strict";
|
|
63
63
|
SDK_NAME = "@trustware/sdk";
|
|
64
|
-
SDK_VERSION = "1.1.8-staging.
|
|
64
|
+
SDK_VERSION = "1.1.8-staging.5";
|
|
65
65
|
API_ROOT = "https://bv-staging-api.trustware.io";
|
|
66
66
|
API_PREFIX = "/api";
|
|
67
67
|
WALLETCONNECT_PROJECT_ID = "72ea74c400f5111d43aea638d7d83a24";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as DetectedWallet, W as WagmiBridge, Q as WalletInterFaceAPI, E as EIP1193, M as WalletId, g as EIP6963ProviderDetail } from './manager-
|
|
1
|
+
import { f as DetectedWallet, W as WagmiBridge, Q as WalletInterFaceAPI, E as EIP1193, M as WalletId, g as EIP6963ProviderDetail } from './manager-BojJyYIt.js';
|
|
2
2
|
|
|
3
3
|
/** Try wagmi bridge first (if provided), otherwise return EIP-1193 adapter. */
|
|
4
4
|
declare function connectDetectedWallet(dw: DetectedWallet, opts?: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as DetectedWallet, W as WagmiBridge, Q as WalletInterFaceAPI, E as EIP1193, M as WalletId, g as EIP6963ProviderDetail } from './manager-
|
|
1
|
+
import { f as DetectedWallet, W as WagmiBridge, Q as WalletInterFaceAPI, E as EIP1193, M as WalletId, g as EIP6963ProviderDetail } from './manager-BWmNEeZb.cjs';
|
|
2
2
|
|
|
3
3
|
/** Try wagmi bridge first (if provided), otherwise return EIP-1193 adapter. */
|
|
4
4
|
declare function connectDetectedWallet(dw: DetectedWallet, opts?: {
|
package/dist/index.cjs
CHANGED
|
@@ -442,7 +442,7 @@ var init_constants = __esm({
|
|
|
442
442
|
"src/constants.ts"() {
|
|
443
443
|
"use strict";
|
|
444
444
|
SDK_NAME = "@trustware/sdk";
|
|
445
|
-
SDK_VERSION = "1.1.8-staging.
|
|
445
|
+
SDK_VERSION = "1.1.8-staging.5";
|
|
446
446
|
API_ROOT = "https://bv-staging-api.trustware.io";
|
|
447
447
|
GTM_ID = "GTM-TZDGNCXB";
|
|
448
448
|
API_PREFIX = "/api";
|
|
@@ -31834,6 +31834,7 @@ function SwapMode({
|
|
|
31834
31834
|
);
|
|
31835
31835
|
const settingsRef = (0, import_react46.useRef)(null);
|
|
31836
31836
|
const currencyDropdownRef = (0, import_react46.useRef)(null);
|
|
31837
|
+
const { emitEvent } = useTrustware();
|
|
31837
31838
|
const { features } = useTrustwareConfig();
|
|
31838
31839
|
const defaultDestRef = features.swapDefaultDestToken;
|
|
31839
31840
|
const lockDestToken = features.swapLockDestToken && !!defaultDestRef;
|
|
@@ -31974,8 +31975,16 @@ function SwapMode({
|
|
|
31974
31975
|
setAmountInputMode("usd");
|
|
31975
31976
|
}
|
|
31976
31977
|
setStage("home");
|
|
31978
|
+
emitEvent?.({
|
|
31979
|
+
type: "swap_route_changed",
|
|
31980
|
+
fromChain: String(chain.chainId),
|
|
31981
|
+
fromToken: token.address,
|
|
31982
|
+
toChain: String(toChain?.chainId ?? ""),
|
|
31983
|
+
toToken: toToken?.address ?? "",
|
|
31984
|
+
...amount ? { amount } : {}
|
|
31985
|
+
});
|
|
31977
31986
|
},
|
|
31978
|
-
[route]
|
|
31987
|
+
[route, emitEvent, toToken, toChain, amount]
|
|
31979
31988
|
);
|
|
31980
31989
|
const handleSelectToToken = (0, import_react46.useCallback)(
|
|
31981
31990
|
(token, chain) => {
|
|
@@ -31983,18 +31992,35 @@ function SwapMode({
|
|
|
31983
31992
|
setToChain(chain);
|
|
31984
31993
|
route.clear();
|
|
31985
31994
|
setStage("home");
|
|
31995
|
+
emitEvent?.({
|
|
31996
|
+
type: "swap_route_changed",
|
|
31997
|
+
fromChain: String(fromChain?.chainId ?? ""),
|
|
31998
|
+
fromToken: fromToken?.address ?? "",
|
|
31999
|
+
toChain: String(chain.chainId),
|
|
32000
|
+
toToken: token.address,
|
|
32001
|
+
...amount ? { amount } : {}
|
|
32002
|
+
});
|
|
31986
32003
|
},
|
|
31987
|
-
[route]
|
|
32004
|
+
[route, emitEvent, fromToken, fromChain, amount]
|
|
31988
32005
|
);
|
|
31989
32006
|
const handleFlip = (0, import_react46.useCallback)(() => {
|
|
31990
32007
|
if (lockDestToken) return;
|
|
32008
|
+
const newFrom = toToken ?? fromToken;
|
|
32009
|
+
const newFromChain = toChain ?? fromChain;
|
|
31991
32010
|
setFromToken((prev) => toToken ?? prev);
|
|
31992
32011
|
setFromChain((prev) => toChain ?? prev);
|
|
31993
32012
|
setToToken(fromToken);
|
|
31994
32013
|
setToChain(fromChain);
|
|
31995
32014
|
setAmount("");
|
|
31996
32015
|
route.clear();
|
|
31997
|
-
|
|
32016
|
+
emitEvent?.({
|
|
32017
|
+
type: "swap_route_changed",
|
|
32018
|
+
fromChain: String(newFromChain?.chainId ?? ""),
|
|
32019
|
+
fromToken: newFrom?.address ?? "",
|
|
32020
|
+
toChain: String(fromChain?.chainId ?? ""),
|
|
32021
|
+
toToken: fromToken?.address ?? ""
|
|
32022
|
+
});
|
|
32023
|
+
}, [lockDestToken, fromToken, fromChain, toToken, toChain, route, emitEvent]);
|
|
31998
32024
|
const fromChainType = normalizeChainType2(fromChain);
|
|
31999
32025
|
const toChainType = normalizeChainType2(toChain);
|
|
32000
32026
|
const needsDestAddress = !!fromChainType && !!toChainType && fromChainType !== toChainType;
|
|
@@ -35737,6 +35763,7 @@ var init_SwapMode = __esm({
|
|
|
35737
35763
|
init_tokenAmount();
|
|
35738
35764
|
init_chainHelpers();
|
|
35739
35765
|
init_hooks();
|
|
35766
|
+
init_provider();
|
|
35740
35767
|
init_useSwapRoute();
|
|
35741
35768
|
init_useSwapExecution();
|
|
35742
35769
|
init_useForex();
|