From 1403ec9f7e1d2d682aebc5601a0066c5cab131f2 Mon Sep 17 00:00:00 2001 From: Nishant Ghodke <64554492+iamcrazycoder@users.noreply.github.com> Date: Wed, 16 Aug 2023 20:35:24 +0530 Subject: [PATCH] fix(sdk): compare with sats value instead of BTC value (#46) fix: compare with sats value instead of BTC value --- packages/sdk/src/transactions/OrdTransaction.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/sdk/src/transactions/OrdTransaction.ts b/packages/sdk/src/transactions/OrdTransaction.ts index 944b113e..28e491fe 100644 --- a/packages/sdk/src/transactions/OrdTransaction.ts +++ b/packages/sdk/src/transactions/OrdTransaction.ts @@ -313,7 +313,7 @@ export class OrdTransaction { type: this.#safeMode === "on" ? "spendable" : "all" }) - const suitableUTXO = utxos.find((utxo) => utxo.value >= amount) + const suitableUTXO = utxos.find((utxo) => utxo.sats >= amount) if (!suitableUTXO) { throw new Error("No suitable unspent found for reveal.") }