Skip to content

Commit

Permalink
fix: WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
limpbrains committed Nov 15, 2024
1 parent 0087e51 commit 25b6432
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 37 deletions.
1 change: 0 additions & 1 deletion src/utils/boost.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { TWalletName } from '../store/types/wallet';
import { EAvailableNetwork } from './networks';
import {
getOnChainWalletAsync,
// getOnChainWallet,
getSelectedNetwork,
getSelectedWallet,
} from './wallet';
Expand Down
16 changes: 0 additions & 16 deletions src/utils/wallet/electrum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -274,22 +274,6 @@ export const getBlockHex = async ({
return await electrum.getBlockHex({ height });
};

/**
* Returns the block hash given a block hex.
* Leaving blockHex empty will return the last known block hash from storage.
* @param {string} [blockHex]
* @param {EAvailableNetwork} [selectedNetwork]
* @returns {string}
*/
// export const getBlockHashFromHex = ({
// blockHex,
// }: {
// blockHex?: string;
// }): string => {
// const electrum = getOnChainWalletElectrum();
// return electrum.getBlockHashFromHex({ blockHex });
// };

/**
* Returns last known block height, and it's corresponding hex from local storage.
* @returns {IHeader}
Expand Down
20 changes: 0 additions & 20 deletions src/utils/wallet/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,6 @@ const bip32 = BIP32Factory(ecc);

let addressGenerator: BitcoinActions | undefined;
let globalWallet: TWallet;
// let globalWalletPromise: Promise<TWallet> & {
// resolve?: (wallet: TWallet) => void;
// reject?: (error: Error) => void;
// } = new Promise((resolve, reject) => {
// globalWalletPromise.resolve = resolve;
// globalWalletPromise.reject = reject;
// });

export const setupAddressGenerator = async ({
selectedWallet = getSelectedWallet(),
Expand Down Expand Up @@ -139,17 +132,6 @@ export const setupAddressGenerator = async ({
}
};

// export const waitForWallet = async (): Promise<void> => {
// if (globalWallet) {
// return;
// }
// return new Promise((resolve) => {
// setTimeout(() => {
// resolve(waitForWallet());
// }, 100);
// });
// };

/*
* Wait for wallet to be ready
*/
Expand Down Expand Up @@ -183,8 +165,6 @@ export const refreshWallet = async ({
InteractionManager.runAfterInteractions(() => resolve(null));
});

// await waitForWallet();

let notificationTxid: string | undefined;

if (onchain) {
Expand Down

0 comments on commit 25b6432

Please sign in to comment.