diff --git a/package.json b/package.json
index d43293f47..5ac3d2cf4 100644
--- a/package.json
+++ b/package.json
@@ -66,7 +66,7 @@
"@synonymdev/web-relay": "1.0.7",
"backpack-client": "github:synonymdev/bitkit-backup-client#f08fdb28529d8a3f8bfecc789443c43b966a7581",
"bech32": "2.0.0",
- "beignet": "0.0.22",
+ "beignet": "0.0.23",
"bip21": "2.0.3",
"bip32": "4.0.0",
"bip39": "3.1.0",
diff --git a/src/navigation/settings/SettingsNavigator.tsx b/src/navigation/settings/SettingsNavigator.tsx
index 4180886db..3cee0b280 100644
--- a/src/navigation/settings/SettingsNavigator.tsx
+++ b/src/navigation/settings/SettingsNavigator.tsx
@@ -11,6 +11,7 @@ import { TChannel } from '@synonymdev/react-native-ldk';
import MainSettings from '../../screens/Settings';
import CurrenciesSettings from '../../screens/Settings/Currencies';
import ElectrumConfig from '../../screens/Settings/ElectrumConfig';
+import GapLimit from '../../screens/Settings/GapLimit';
import RGSServer from '../../screens/Settings/RGSServer';
import CoinSelectPreference from '../../screens/Settings/CoinSelectPreference';
import PaymentPreference from '../../screens/Settings/PaymentPreference';
@@ -84,6 +85,7 @@ export type SettingsStackParamList = {
TransactionSpeedSettings: undefined;
CustomFee: undefined;
ElectrumConfig: undefined;
+ GapLimit: undefined;
RGSServer: undefined;
CoinSelectPreference: undefined;
PaymentPreference: undefined;
@@ -146,6 +148,7 @@ const SettingsNavigator = (): ReactElement => {
/>
+
{
if (isDeveloperMode) {
return Object.values(addressTypes);
@@ -27,9 +37,10 @@ const AddressTypeSettings = ({
(addressType) => addressType.type !== EAddressType.p2tr,
);
}, [isDeveloperMode]);
+ const addressTypesToMonitor = useAppSelector(addressTypesToMonitorSelector);
- const listData: IListData[] = useMemo(
- () => [
+ const listData = useMemo((): IListData[] => {
+ const data: IListData[] = [
{
title: t('adv.address_type'),
data: Object.values(availableAddressTypes).map((addressType) => ({
@@ -46,9 +57,62 @@ const AddressTypeSettings = ({
testID: addressType.type,
})),
},
- ],
- [t, availableAddressTypes, selectedAddressType, navigation],
- );
+ ];
+
+ if (isDeveloperMode) {
+ const monitoredTypes: IListData = {
+ title: t('adv.monitored_address_types'),
+ data: Object.values(availableAddressTypes).map((addressType) => ({
+ type: EItemType.button,
+ title: `${addressType.name} ${addressType.example}`,
+ subtitle: addressType.description,
+ value: addressTypesToMonitor.includes(addressType.type),
+ hide: !isDeveloperMode,
+ useCheckmark: true,
+ onPress: async (): Promise => {
+ const needsToBeAdded = !addressTypesToMonitor.includes(
+ addressType.type,
+ );
+ let newAddressTypesToMonitor: EAddressType[] = [];
+ if (needsToBeAdded) {
+ newAddressTypesToMonitor = [
+ ...addressTypesToMonitor,
+ addressType.type,
+ ];
+ } else {
+ newAddressTypesToMonitor = addressTypesToMonitor.filter(
+ (type) => type !== addressType.type,
+ );
+ }
+ updateWallet({
+ addressTypesToMonitor: newAddressTypesToMonitor,
+ });
+ if (!hasShownMonitorNotification) {
+ showToast({
+ type: 'success',
+ title: t('adv.monitored_address_types_update_title'),
+ description: t(
+ 'adv.monitored_address_types_update_description',
+ ),
+ });
+ setHasShownMonitorNotification(true);
+ }
+ },
+ testID: `Monitor${addressType.type}`,
+ })),
+ };
+ data.push(monitoredTypes);
+ }
+ return data;
+ }, [
+ t,
+ availableAddressTypes,
+ isDeveloperMode,
+ selectedAddressType,
+ navigation,
+ addressTypesToMonitor,
+ hasShownMonitorNotification,
+ ]);
return (
navigation.navigate('PaymentPreference'),
},
+ {
+ title: t('adv.gap_limit'),
+ type: EItemType.button,
+ onPress: (): void => navigation.navigate('GapLimit'),
+ testID: 'GapLimit',
+ hide: !enableDevOptions,
+ },
];
const networks: ItemData[] = [
diff --git a/src/screens/Settings/GapLimit/index.tsx b/src/screens/Settings/GapLimit/index.tsx
new file mode 100644
index 000000000..8f79574aa
--- /dev/null
+++ b/src/screens/Settings/GapLimit/index.tsx
@@ -0,0 +1,171 @@
+import React, { memo, ReactElement, useMemo, useState } from 'react';
+import { StyleSheet } from 'react-native';
+import { useTranslation } from 'react-i18next';
+
+import { View, TextInput, ScrollView } from '../../../styles/components';
+import { Text01S, Caption13Up } from '../../../styles/text';
+import { useAppSelector } from '../../../hooks/redux';
+import { gapLimitOptionsSelector } from '../../../store/reselect/wallet';
+import NavigationHeader from '../../../components/NavigationHeader';
+import SafeAreaInset from '../../../components/SafeAreaInset';
+import Button from '../../../components/Button';
+import type { SettingsScreenProps } from '../../../navigation/types';
+import { getOnChainWallet, refreshWallet } from '../../../utils/wallet';
+import { updateWallet } from '../../../store/actions/wallet';
+import { showToast } from '../../../utils/notifications';
+
+const GapLimit = ({}: SettingsScreenProps<'GapLimit'>): ReactElement => {
+ const { t } = useTranslation('settings');
+ const gapLimitOptions = useAppSelector(gapLimitOptionsSelector);
+ const [loading, setLoading] = useState(false);
+ const [lookBehind, setLookBehind] = useState(
+ String(gapLimitOptions.lookBehind),
+ );
+ const [lookAhead, setLookAhead] = useState(
+ String(gapLimitOptions.lookAhead),
+ );
+
+ const hasEdited = useMemo(() => {
+ return (
+ Number(lookBehind) !== gapLimitOptions.lookBehind ||
+ Number(lookAhead) !== gapLimitOptions.lookAhead
+ );
+ }, [
+ gapLimitOptions.lookAhead,
+ gapLimitOptions.lookBehind,
+ lookAhead,
+ lookBehind,
+ ]);
+
+ const areValid = useMemo(() => {
+ return Number(lookBehind) > 0 && Number(lookAhead) > 0;
+ }, [lookAhead, lookBehind]);
+
+ const clearChanges = (): void => {
+ setLookBehind(String(gapLimitOptions.lookBehind));
+ setLookAhead(String(gapLimitOptions.lookAhead));
+ };
+
+ const saveGapLimit = async (): Promise => {
+ setLoading(true);
+ const wallet = getOnChainWallet();
+ const res = wallet.updateGapLimit({
+ lookAhead: Number(lookAhead),
+ lookBehind: Number(lookBehind),
+ });
+ if (res.isOk()) {
+ updateWallet({
+ gapLimitOptions: res.value,
+ });
+ await refreshWallet({
+ lightning: false,
+ onchain: true,
+ scanAllAddresses: true,
+ });
+ showToast({
+ type: 'success',
+ title: t('gap.gap_limit_update_title'),
+ description: t('gap.gap_limit_update_description'),
+ });
+ }
+ setLoading(false);
+ };
+
+ return (
+
+
+
+
+ Look Behind
+ {
+ setLookBehind(txt);
+ }}
+ returnKeyType="done"
+ testID="LookBehind"
+ />
+
+
+ {'Look Ahead'}
+
+ {
+ setLookAhead(txt);
+ }}
+ testID="LookAhead"
+ />
+
+
+
+
+
+
+
+
+
+ );
+};
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ },
+ content: {
+ flexGrow: 1,
+ paddingHorizontal: 16,
+ },
+ label: {
+ marginTop: 16,
+ marginBottom: 4,
+ },
+ textInput: {
+ minHeight: 52,
+ marginTop: 5,
+ },
+ buttons: {
+ marginTop: 16,
+ flexDirection: 'row',
+ },
+ button: {
+ flex: 1,
+ },
+ divider: {
+ width: 16,
+ },
+});
+
+export default memo(GapLimit);
diff --git a/src/screens/Wallets/Send/ReviewAndSend.tsx b/src/screens/Wallets/Send/ReviewAndSend.tsx
index c55b55217..cde35cac7 100644
--- a/src/screens/Wallets/Send/ReviewAndSend.tsx
+++ b/src/screens/Wallets/Send/ReviewAndSend.tsx
@@ -284,7 +284,6 @@ const ReviewAndSend = ({
}
const response = await broadcastTransaction({
rawTx: rawTx.hex,
- selectedNetwork,
});
if (response.isErr()) {
// Check if it failed to broadcast due to low fee.
@@ -324,7 +323,7 @@ const ReviewAndSend = ({
}
navigation.navigate('Result', { success: true, txId: rawTx.id });
- }, [rawTx, selectedNetwork, _onError, navigation, transaction, dispatch, t]);
+ }, [rawTx, _onError, navigation, transaction, dispatch, t]);
useEffect(() => {
if (rawTx) {
diff --git a/src/store/index.ts b/src/store/index.ts
index da412f2be..423308e69 100644
--- a/src/store/index.ts
+++ b/src/store/index.ts
@@ -40,7 +40,7 @@ const persistConfig = {
key: 'root',
storage: mmkvStorage,
// increase version after store shape changes
- version: 37,
+ version: 38,
stateReconciler: autoMergeLevel2,
blacklist: ['receive', 'ui'],
migrate: createMigrate(migrations, { debug: __ENABLE_MIGRATION_DEBUG__ }),
diff --git a/src/store/migrations/index.ts b/src/store/migrations/index.ts
index b7c542dfd..068055c86 100644
--- a/src/store/migrations/index.ts
+++ b/src/store/migrations/index.ts
@@ -12,6 +12,7 @@ import { defaultBlocktankInfoShape } from '../shapes/blocktank';
import { initialTodosState } from '../shapes/todos';
import { defaultViewControllers } from '../shapes/ui';
import {
+ getDefaultGapLimitOptions,
getDefaultWalletStoreShape,
getNetworkContent,
} from '../shapes/wallet';
@@ -509,6 +510,15 @@ const migrations = {
}
return newState;
},
+ 38: (state): PersistedState => {
+ return {
+ ...state,
+ wallet: {
+ ...state.wallet,
+ gapLimitOptions: getDefaultGapLimitOptions(),
+ },
+ };
+ },
};
export default migrations;
diff --git a/src/store/reselect/wallet.ts b/src/store/reselect/wallet.ts
index a003e627d..fe5f45945 100644
--- a/src/store/reselect/wallet.ts
+++ b/src/store/reselect/wallet.ts
@@ -4,6 +4,7 @@ import {
IFormattedTransaction,
IFormattedTransactions,
ISendTransaction,
+ TGapLimitOptions,
IUtxo,
} from 'beignet';
import { createSelector } from '@reduxjs/toolkit';
@@ -58,6 +59,21 @@ export const currentWalletSelector = createSelector(
},
);
+/**
+ * Returns the saved gap limit options for the wallet.
+ * @param {RootState} state
+ * @returns {TGapLimitOptions}
+ */
+export const gapLimitOptionsSelector = createSelector(
+ [walletState],
+ (wallet): TGapLimitOptions => wallet.gapLimitOptions,
+);
+
+export const addressTypesToMonitorSelector = createSelector(
+ [walletState],
+ (wallet): EAddressType[] => wallet.addressTypesToMonitor,
+);
+
/**
* Returns the selected address type for a given wallet and network.
* @param {RootState} state
diff --git a/src/store/shapes/wallet.ts b/src/store/shapes/wallet.ts
index a6be5d6a1..05ae0171b 100644
--- a/src/store/shapes/wallet.ts
+++ b/src/store/shapes/wallet.ts
@@ -1,10 +1,9 @@
import cloneDeep from 'lodash/cloneDeep';
-
import { __WALLET_DEFAULT_SELECTED_NETWORK__ } from '../../constants/env';
import { IHeader } from '../../utils/types/electrum';
import { EAvailableNetwork } from '../../utils/networks';
import { objectKeys } from '../../utils/objectKeys';
-import { IWalletItem, IWallet, IWalletStore } from '../types/wallet';
+import { IWallet, IWalletItem, IWalletStore } from '../types/wallet';
import {
EAddressType,
EBoostType,
@@ -13,6 +12,7 @@ import {
IAddresses,
ISendTransaction,
TAddressTypes,
+ TGapLimitOptions,
} from 'beignet';
export const addressTypes: Readonly = {
@@ -163,12 +163,22 @@ export const defaultWalletShape: Readonly = {
},
};
+const defaultGapLimitOptions = {
+ lookAhead: 1,
+ lookBehind: 5,
+};
+
+export const getDefaultGapLimitOptions = (): TGapLimitOptions => {
+ return cloneDeep(defaultGapLimitOptions);
+};
+
export const defaultWalletStoreShape: Readonly = {
walletExists: false,
selectedNetwork: __WALLET_DEFAULT_SELECTED_NETWORK__,
selectedWallet: 'wallet0',
exchangeRates: {},
addressTypesToMonitor: [EAddressType.p2wpkh],
+ gapLimitOptions: getDefaultGapLimitOptions(),
header: {
bitcoin: defaultHeader,
bitcoinTestnet: defaultHeader,
diff --git a/src/store/types/wallet.ts b/src/store/types/wallet.ts
index dca03a245..d2f859650 100644
--- a/src/store/types/wallet.ts
+++ b/src/store/types/wallet.ts
@@ -9,6 +9,7 @@ import {
IBoostedTransactions,
IFormattedTransactions,
ISendTransaction,
+ TGapLimitOptions,
IUtxo,
TServer,
} from 'beignet';
@@ -41,6 +42,7 @@ export interface IWalletStore {
exchangeRates: IExchangeRates;
header: IWalletItem;
addressTypesToMonitor: EAddressType[];
+ gapLimitOptions: TGapLimitOptions;
wallets: { [key: TWalletName]: IWallet };
}
diff --git a/src/store/utils/blocktank.ts b/src/store/utils/blocktank.ts
index 32aedffb6..0eda1daef 100644
--- a/src/store/utils/blocktank.ts
+++ b/src/store/utils/blocktank.ts
@@ -372,7 +372,6 @@ export const confirmChannelPurchase = async ({
const broadcastResponse = await broadcastTransaction({
rawTx: rawTx.value.hex,
subscribeToOutputAddress: false,
- selectedNetwork,
});
if (broadcastResponse.isErr()) {
showToast({
diff --git a/src/utils/i18n/locales/en/settings.json b/src/utils/i18n/locales/en/settings.json
index 54f3f7823..fed4c2da4 100644
--- a/src/utils/i18n/locales/en/settings.json
+++ b/src/utils/i18n/locales/en/settings.json
@@ -141,6 +141,10 @@
"section_networks": "Networks",
"section_other": "Other",
"address_type": "Bitcoin Address Type",
+ "monitored_address_types": "Monitored Address Types",
+ "monitored_address_types_update_title": "Monitored Address Types Updated",
+ "monitored_address_types_update_description": "Changes will take full effect after app restarts.",
+ "gap_limit": "Address Gap Limit",
"coin_selection": "Coin Selection",
"cs_method": "Coin Selection Method",
"cs_manual": "Manual",
@@ -235,6 +239,12 @@
"button_reset": "Reset To Default",
"button_connect": "Connect To Host"
},
+ "gap": {
+ "save": "Save",
+ "reset": "Reset",
+ "gap_limit_update_title": "Address Gap Limit Updated",
+ "gap_limit_update_description": "Changes will take full effect after app restarts."
+ },
"rgs": {
"server_url": "Rapid-Gossip-Sync Server URL",
"button_connect": "Connect",
diff --git a/src/utils/startup/index.ts b/src/utils/startup/index.ts
index 611f656e1..415eb6aef 100644
--- a/src/utils/startup/index.ts
+++ b/src/utils/startup/index.ts
@@ -5,6 +5,7 @@ import { generateMnemonic, TServer } from 'beignet';
import {
getAddressTypesToMonitor,
getBip39Passphrase,
+ getGapLimitOptions,
getMnemonicPhrase,
getSelectedAddressType,
getSelectedNetwork,
@@ -113,10 +114,10 @@ export const startWalletServices = async ({
return err(mnemonicResponse.error.message);
}
const mnemonic = mnemonicResponse.value;
+ const bip39Passphrase = await getBip39Passphrase();
const walletExists = getWalletStore()?.walletExists;
if (!walletExists) {
- const bip39Passphrase = await getBip39Passphrase();
const createRes = await createWallet({ mnemonic, bip39Passphrase });
if (createRes.isErr()) {
return err(createRes.error.message);
@@ -127,12 +128,14 @@ export const startWalletServices = async ({
selectedNetwork,
});
const addressTypesToMonitor = getAddressTypesToMonitor();
+ const gapLimitOptions = getGapLimitOptions();
const onChainSetupRes = await setupOnChainWallet({
name: selectedWallet,
selectedNetwork,
- bip39Passphrase: await getBip39Passphrase(),
+ bip39Passphrase,
addressType,
addressTypesToMonitor,
+ gapLimitOptions,
});
if (onChainSetupRes.isErr()) {
return err(onChainSetupRes.error.message);
diff --git a/src/utils/wallet/electrum.ts b/src/utils/wallet/electrum.ts
index 81d1dd9ac..f68f204f3 100644
--- a/src/utils/wallet/electrum.ts
+++ b/src/utils/wallet/electrum.ts
@@ -39,21 +39,6 @@ export const isConnectedElectrum = async (): Promise => {
return electrum.isConnected();
};
-/**
- * Returns UTXO's for a given wallet and network along with the available balance.
- * @param {TWalletName} [selectedWallet]
- * @param {boolean} [scanAllAddresses]
- * @returns {Promise>}
- */
-export const getUtxos = async ({
- scanAllAddresses = false,
-}: {
- scanAllAddresses?: boolean;
-}): Promise> => {
- const wallet = getOnChainWallet();
- return await wallet.getUtxos({ scanAllAddresses });
-};
-
/**
* Formats a provided array of addresses a returns their UTXO's & balances.
* @param {IAddress[]} allAddresses
diff --git a/src/utils/wallet/index.ts b/src/utils/wallet/index.ts
index 2e36fae07..7a439afc9 100644
--- a/src/utils/wallet/index.ts
+++ b/src/utils/wallet/index.ts
@@ -9,6 +9,7 @@ import { err, ok, Result } from '@synonymdev/result';
import { EAvailableNetwork, networks } from '../networks';
import {
+ getDefaultGapLimitOptions,
getDefaultWalletShape,
getDefaultWalletStoreShape,
} from '../../store/shapes/wallet';
@@ -67,6 +68,7 @@ import {
ISendTransaction,
IUtxo,
IWalletData,
+ TGapLimitOptions,
TKeyDerivationAccount,
TKeyDerivationChange,
TKeyDerivationCoinType,
@@ -114,6 +116,7 @@ export const refreshWallet = async ({
if (onchain) {
await wallet.refreshWallet({ scanAllAddresses });
+ checkGapLimit();
}
if (lightning) {
@@ -136,6 +139,20 @@ export const refreshWallet = async ({
}
};
+/**
+ * In the event we temporarily changed the gap limit in Beignet when restoring Bitkit, we need to reset it back to Bitkit's default/saved values.
+ */
+const checkGapLimit = (): void => {
+ const savedGapLimitOptions = getGapLimitOptions();
+ const beignetGapLimit = wallet.gapLimitOptions;
+ if (
+ beignetGapLimit.lookAhead !== savedGapLimitOptions.lookAhead ||
+ beignetGapLimit.lookBehind !== savedGapLimitOptions.lookBehind
+ ) {
+ wallet.updateGapLimit(savedGapLimitOptions);
+ }
+};
+
/**
* Generates a series of addresses based on the specified params.
* @async
@@ -479,6 +496,14 @@ export const getAddressTypesToMonitor = (): EAddressType[] => {
return getWalletStore().addressTypesToMonitor;
};
+/**
+ * Returns the currently monitored address types (p2pkh | p2sh | p2wpkh | p2tr).
+ * @returns {EAddressType[]}
+ */
+export const getGapLimitOptions = (): TGapLimitOptions => {
+ return getWalletStore().gapLimitOptions;
+};
+
/**
* Returns the currently selected wallet (Ex: 'wallet0').
* @return {TWalletName}
@@ -744,6 +769,15 @@ export const createDefaultWallet = async ({
await createDefaultWalletStructure({ walletName });
+ let gapLimitOptions = getDefaultGapLimitOptions();
+ if (restore) {
+ // Temporarily increase the gap limit to ensure all addresses are scanned.
+ gapLimitOptions = {
+ lookAhead: 20,
+ lookBehind: 20,
+ };
+ }
+
const defaultWalletShape = getDefaultWalletShape();
const setupWalletRes = await setupOnChainWallet({
name: walletName,
@@ -753,6 +787,7 @@ export const createDefaultWallet = async ({
servers,
disableMessagesOnCreate: true,
addressTypesToMonitor: addressTypesToCreate,
+ gapLimitOptions,
});
if (setupWalletRes.isErr()) {
return err(setupWalletRes.error.message);
@@ -931,6 +966,7 @@ export const setupOnChainWallet = async ({
servers,
disableMessagesOnCreate = false,
addressTypesToMonitor = [addressType],
+ gapLimitOptions = getDefaultGapLimitOptions(),
}: {
name: TWalletName;
mnemonic?: string;
@@ -941,6 +977,7 @@ export const setupOnChainWallet = async ({
servers?: TServer | TServer[];
disableMessagesOnCreate?: boolean;
addressTypesToMonitor?: EAddressType[];
+ gapLimitOptions?: TGapLimitOptions;
}): Promise> => {
if (!mnemonic) {
const mnemonicRes = await getMnemonicPhrase(name);
@@ -970,6 +1007,7 @@ export const setupOnChainWallet = async ({
tls: global.tls,
net: global.net,
},
+ gapLimitOptions,
storage,
addressType,
customGetAddress: customGetAddress,
@@ -1232,7 +1270,8 @@ export const getReceiveAddress = async ({
if (!addressType) {
addressType = getSelectedAddressType({ selectedNetwork });
}
- return wallet.getReceiveAddress({ addressType });
+ const address = await wallet.getAddress({ addressType });
+ return address ? ok(address) : err('Unable to get receive address.');
} catch (e) {
return err(e);
}
@@ -1330,7 +1369,8 @@ export const getBalance = ({
const result = reduceValue(claimableBalances, 'amount_satoshis');
const claimableBalance = result.isOk() ? result.value : 0;
- const onchainBalance = currentWallet.balance[selectedNetwork];
+ const onchainBalance =
+ wallet.getBalance() ?? currentWallet.balance[selectedNetwork];
const lightningBalance = spendingBalance + reserveBalance + claimableBalance;
const spendableBalance = onchainBalance + spendingBalance;
const totalBalance =
diff --git a/src/utils/wallet/transactions.ts b/src/utils/wallet/transactions.ts
index 75e4ad841..9cebb1e53 100644
--- a/src/utils/wallet/transactions.ts
+++ b/src/utils/wallet/transactions.ts
@@ -14,7 +14,6 @@ import {
getOnChainWalletElectrum,
getOnChainWalletTransaction,
getRbfData,
- getScriptHash,
getSelectedNetwork,
getSelectedWallet,
getTransactionById,
@@ -36,7 +35,6 @@ import {
TCoinSelectPreference,
} from '../../store/types/settings';
import { showToast } from '../notifications';
-import { subscribeToAddresses } from './electrum';
import { TOnchainActivityItem } from '../../store/types/activity';
import { initialFeesState } from '../../store/slices/fees';
import { TRANSACTION_DEFAULTS } from './constants';
@@ -183,35 +181,15 @@ export const getOnchainTransactionData = (): Result => {
export const broadcastTransaction = async ({
rawTx,
- selectedNetwork = getSelectedNetwork(),
subscribeToOutputAddress = true,
}: {
rawTx: string;
- selectedNetwork?: EAvailableNetwork;
subscribeToOutputAddress?: boolean;
}): Promise> => {
- /**
- * Subscribe to the output address and refresh the wallet when the Electrum server detects it.
- * This prevents updating the wallet prior to the Electrum server detecting the new tx in the mempool.
- */
- if (subscribeToOutputAddress) {
- const transaction = getOnchainTransactionData();
- if (transaction.isErr()) {
- return err(transaction.error.message);
- }
- const address = transaction.value.outputs[0]?.address;
- if (address) {
- const scriptHash = await getScriptHash(address, selectedNetwork);
- if (scriptHash) {
- await subscribeToAddresses({
- scriptHashes: [scriptHash],
- });
- }
- }
- }
const electrum = getOnChainWalletElectrum();
return await electrum.broadcastTransaction({
rawTx,
+ subscribeToOutputAddress,
});
};
@@ -1097,7 +1075,6 @@ export const broadcastBoost = async ({
const broadcastResult = await broadcastTransaction({
rawTx: rawTx.value.hex,
- selectedNetwork,
subscribeToOutputAddress: false,
});
if (broadcastResult.isErr()) {
diff --git a/yarn.lock b/yarn.lock
index 8369b5e85..d8c9b9a11 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -5711,10 +5711,10 @@ bech32@^1.1.2, bech32@^1.1.4:
resolved "https://registry.yarnpkg.com/bech32/-/bech32-1.1.4.tgz#e38c9f37bf179b8eb16ae3a772b40c356d4832e9"
integrity sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==
-beignet@0.0.22:
- version "0.0.22"
- resolved "https://registry.yarnpkg.com/beignet/-/beignet-0.0.22.tgz#07fb67299b4c7c99c2537252e9adaa27a51f57c0"
- integrity sha512-Xb/L7HPUdc0yC/dy2kv1/AoZ6Alej8k8IGQGx2QIuAKTeu9kVVispJFDwe30xcyAuTFMwj2AYM8GJmoAuwkFdA==
+beignet@0.0.23:
+ version "0.0.23"
+ resolved "https://registry.yarnpkg.com/beignet/-/beignet-0.0.23.tgz#7c7860a671ad691f7c1fad1598a349085dada8c8"
+ integrity sha512-BD5KnjJrBaLkI/qm5ac9qHckMBbOGcamTFopLdEvcfasB66PPAZSGd60/6zuWFN/ihe81XjwV2EM4kcMoxkx8A==
dependencies:
"@bitcoinerlab/secp256k1" "1.0.5"
bech32 "2.0.0"