Skip to content

Commit

Permalink
chore: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
slavastartsev committed Dec 12, 2024
1 parent e18917e commit 047dc11
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sdk/src/wallet/utxo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const getBtcNetwork = (name: BitcoinNetworkName) => {

type Output = { address: string; amount: bigint } | { script: Uint8Array; amount: bigint };

export class TreeNode<T> {
class TreeNode<T> {
val: T;
children: TreeNode<T>[];

Expand Down Expand Up @@ -61,7 +61,7 @@ const processNodes = async (rootNodes: TreeNode<OutputNodeData>[], esploraClient
};

const checkUtxoNode = (node: TreeNode<OutputNodeData>) => {
// leaf node == confirmed input
// leaf node either confirmed or contains ordinals
if (node.children.length === 0) return node.val.cardinal;

return node.children.reduce((acc, child) => acc && checkUtxoNode(child), true);
Expand Down

0 comments on commit 047dc11

Please sign in to comment.