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/dist/index.js
CHANGED
@@ -3917,10 +3917,12 @@ var BTCWallet = (_0) => __async(void 0, [_0], function* ({
|
|
3917
3917
|
return;
|
3918
3918
|
const btcNetwork = yield btcContext.getNetwork();
|
3919
3919
|
console.log("btcNetwork:", btcNetwork, network);
|
3920
|
-
|
3921
|
-
|
3922
|
-
|
3923
|
-
|
3920
|
+
const networkMap = {
|
3921
|
+
livenet: ["mainnet"],
|
3922
|
+
testnet: ["testnet", "dev"]
|
3923
|
+
};
|
3924
|
+
if (!networkMap[btcNetwork].includes(network)) {
|
3925
|
+
yield btcContext.switchNetwork(btcNetwork === "livenet" ? "testnet" : "livenet");
|
3924
3926
|
}
|
3925
3927
|
});
|
3926
3928
|
}
|
@@ -3965,7 +3967,7 @@ function setupBTCWallet({
|
|
3965
3967
|
|
3966
3968
|
// src/index.ts
|
3967
3969
|
var getVersion = () => {
|
3968
|
-
return "0.3.
|
3970
|
+
return "0.3.20";
|
3969
3971
|
};
|
3970
3972
|
if (typeof window !== "undefined") {
|
3971
3973
|
window.__BTC_WALLET_VERSION = getVersion();
|