btc-wallet 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.js +13 -6
- package/dist/index.js.map +2 -2
- package/dist/utils/setupBTCWallet.d.ts +1 -1
- package/esm/index.js +13 -6
- package/esm/index.js.map +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -2499,8 +2499,8 @@ var { transfer, functionCall } = import_transactions.actionCreators;
|
|
2499
2499
|
var config = {
|
2500
2500
|
dev: {
|
2501
2501
|
base_url: "https://api.dev.satoshibridge.top/v1",
|
2502
|
-
token: "nbtc1-nsp.
|
2503
|
-
contractId: "dev1-nsp.
|
2502
|
+
token: "nbtc1-nsp.testnet",
|
2503
|
+
contractId: "dev1-nsp.testnet"
|
2504
2504
|
},
|
2505
2505
|
testnet: {
|
2506
2506
|
base_url: "https://api.testnet.satoshibridge.top/v1",
|
@@ -2760,7 +2760,12 @@ var BTCWallet = (_0) => __async(void 0, [_0], function* ({
|
|
2760
2760
|
gas_limit: "3000",
|
2761
2761
|
use_near_pay_gas: false
|
2762
2762
|
};
|
2763
|
-
const
|
2763
|
+
const nearAccount = yield provider.query({
|
2764
|
+
request_type: "view_account",
|
2765
|
+
account_id: accountId,
|
2766
|
+
finality: "final"
|
2767
|
+
});
|
2768
|
+
const availableBalance = parseFloat(nearAccount.amount) / __pow(10, 24);
|
2764
2769
|
if (availableBalance > 0.2) {
|
2765
2770
|
intention.use_near_pay_gas = true;
|
2766
2771
|
}
|
@@ -2828,7 +2833,8 @@ function uploadBTCTx(url, data) {
|
|
2828
2833
|
function setupBTCWallet({
|
2829
2834
|
iconUrl = "https://assets.deltatrade.ai/assets/chain/btc.svg",
|
2830
2835
|
deprecated = false,
|
2831
|
-
autoConnect = true
|
2836
|
+
autoConnect = true,
|
2837
|
+
isDev = false
|
2832
2838
|
} = {}) {
|
2833
2839
|
const btcWallet = () => __async(this, null, function* () {
|
2834
2840
|
return {
|
@@ -2841,7 +2847,8 @@ function setupBTCWallet({
|
|
2841
2847
|
downloadUrl: iconUrl,
|
2842
2848
|
deprecated,
|
2843
2849
|
available: true,
|
2844
|
-
autoConnect
|
2850
|
+
autoConnect,
|
2851
|
+
isDev
|
2845
2852
|
},
|
2846
2853
|
init: BTCWallet
|
2847
2854
|
};
|
@@ -2901,7 +2908,7 @@ function pollTransactionStatuses(network, hashes) {
|
|
2901
2908
|
|
2902
2909
|
// src/index.ts
|
2903
2910
|
var getVersion = () => {
|
2904
|
-
return "0.2.
|
2911
|
+
return "0.2.3";
|
2905
2912
|
};
|
2906
2913
|
if (typeof window !== "undefined") {
|
2907
2914
|
window.__PARTICLE_BTC_CONNECT_VERSION = getVersion();
|