btc-wallet 0.3.19 → 0.3.20
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/index.js +7 -5
- package/dist/index.js.map +2 -2
- package/esm/index.js +7 -5
- package/esm/index.js.map +2 -2
- package/package.json +1 -1
package/esm/index.js
CHANGED
@@ -3873,10 +3873,12 @@ var BTCWallet = (_0) => __async(void 0, [_0], function* ({
|
|
3873
3873
|
return;
|
3874
3874
|
const btcNetwork = yield btcContext.getNetwork();
|
3875
3875
|
console.log("btcNetwork:", btcNetwork, network);
|
3876
|
-
|
3877
|
-
|
3878
|
-
|
3879
|
-
|
3876
|
+
const networkMap = {
|
3877
|
+
livenet: ["mainnet"],
|
3878
|
+
testnet: ["testnet", "dev"]
|
3879
|
+
};
|
3880
|
+
if (!networkMap[btcNetwork].includes(network)) {
|
3881
|
+
yield btcContext.switchNetwork(btcNetwork === "livenet" ? "testnet" : "livenet");
|
3880
3882
|
}
|
3881
3883
|
});
|
3882
3884
|
}
|
@@ -3921,7 +3923,7 @@ function setupBTCWallet({
|
|
3921
3923
|
|
3922
3924
|
// src/index.ts
|
3923
3925
|
var getVersion = () => {
|
3924
|
-
return "0.3.
|
3926
|
+
return "0.3.20";
|
3925
3927
|
};
|
3926
3928
|
if (typeof window !== "undefined") {
|
3927
3929
|
window.__BTC_WALLET_VERSION = getVersion();
|