@atomiqlabs/chain-evm 1.0.0-dev.49 → 1.0.0-dev.50
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.
|
@@ -99,7 +99,7 @@ function initializeBotanix(options, bitcoinRpc, network) {
|
|
|
99
99
|
}
|
|
100
100
|
});
|
|
101
101
|
const spvVaultContract = new EVMSpvVaultContract_1.EVMSpvVaultContract(chainInterface, btcRelay, bitcoinRpc, options.spvVaultContract ?? defaultContractAddresses.spvVaultContract, options.spvVaultDeploymentHeight ?? defaultContractAddresses.spvVaultDeploymentHeight);
|
|
102
|
-
const chainEvents = provider
|
|
102
|
+
const chainEvents = provider.websocket != null ?
|
|
103
103
|
new EVMChainEventsBrowserWS_1.EVMChainEventsBrowserWS(chainInterface, swapContract, spvVaultContract) :
|
|
104
104
|
new EVMChainEventsBrowser_1.EVMChainEventsBrowser(chainInterface, swapContract, spvVaultContract);
|
|
105
105
|
return {
|
|
@@ -106,7 +106,7 @@ function initializeCitrea(options, bitcoinRpc, network) {
|
|
|
106
106
|
}
|
|
107
107
|
});
|
|
108
108
|
const spvVaultContract = new CitreaSpvVaultContract_1.CitreaSpvVaultContract(chainInterface, btcRelay, bitcoinRpc, options.spvVaultContract ?? defaultContractAddresses.spvVaultContract, options.spvVaultDeploymentHeight ?? defaultContractAddresses.spvVaultDeploymentHeight);
|
|
109
|
-
const chainEvents = provider
|
|
109
|
+
const chainEvents = provider.websocket != null ?
|
|
110
110
|
new EVMChainEventsBrowserWS_1.EVMChainEventsBrowserWS(chainInterface, swapContract, spvVaultContract) :
|
|
111
111
|
new EVMChainEventsBrowser_1.EVMChainEventsBrowser(chainInterface, swapContract, spvVaultContract);
|
|
112
112
|
return {
|
package/package.json
CHANGED
|
@@ -147,7 +147,7 @@ export function initializeBotanix(
|
|
|
147
147
|
options.spvVaultDeploymentHeight ?? defaultContractAddresses.spvVaultDeploymentHeight
|
|
148
148
|
)
|
|
149
149
|
|
|
150
|
-
const chainEvents = provider
|
|
150
|
+
const chainEvents = (provider as any).websocket!=null ?
|
|
151
151
|
new EVMChainEventsBrowserWS(chainInterface, swapContract, spvVaultContract) :
|
|
152
152
|
new EVMChainEventsBrowser(chainInterface, swapContract, spvVaultContract);
|
|
153
153
|
|
|
@@ -154,7 +154,7 @@ export function initializeCitrea(
|
|
|
154
154
|
options.spvVaultDeploymentHeight ?? defaultContractAddresses.spvVaultDeploymentHeight
|
|
155
155
|
)
|
|
156
156
|
|
|
157
|
-
const chainEvents = provider
|
|
157
|
+
const chainEvents = (provider as any).websocket!=null ?
|
|
158
158
|
new EVMChainEventsBrowserWS(chainInterface, swapContract, spvVaultContract) :
|
|
159
159
|
new EVMChainEventsBrowser(chainInterface, swapContract, spvVaultContract);
|
|
160
160
|
|