Resolve "WIP: UTXO Selection and Storage"
This commit is contained in:
@@ -8,21 +8,21 @@ import {
|
||||
|
||||
export function useWalletP2PKH(
|
||||
privateKeyBytes: Uint8Array,
|
||||
electrum: Blockchain
|
||||
electrum: Blockchain,
|
||||
) {
|
||||
const wallet = React.useMemo(
|
||||
() => new WalletP2PKHReact(privateKeyBytes, electrum),
|
||||
[privateKeyBytes, electrum]
|
||||
[privateKeyBytes, electrum],
|
||||
);
|
||||
|
||||
const unspents = useSyncExternalStore(
|
||||
wallet.subscribeToUnspents,
|
||||
wallet.getUnspents
|
||||
wallet.getUnspents,
|
||||
);
|
||||
|
||||
const transactions = useSyncExternalStore(
|
||||
wallet.subscribeToTransactions,
|
||||
wallet.getTransactions
|
||||
wallet.getTransactions,
|
||||
);
|
||||
|
||||
const balance = React.useMemo(() => {
|
||||
|
||||
Reference in New Issue
Block a user