From 2e90b2a86db140a12377f15b389c10d9879d75fe Mon Sep 17 00:00:00 2001 From: weatherstar Date: Tue, 21 Nov 2023 00:02:43 +0800 Subject: [PATCH] fix: send btc nft error (#3839) --- .../vaults/utils/btcForkChain/utils/coinSelectUtils.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/packages/engine/src/vaults/utils/btcForkChain/utils/coinSelectUtils.ts b/packages/engine/src/vaults/utils/btcForkChain/utils/coinSelectUtils.ts index 6ab92028684..f30f9ccea1b 100644 --- a/packages/engine/src/vaults/utils/btcForkChain/utils/coinSelectUtils.ts +++ b/packages/engine/src/vaults/utils/btcForkChain/utils/coinSelectUtils.ts @@ -284,7 +284,7 @@ export function coinSelectForOrdinal( let ordUtxoCount = 0; let isPrevUtxoOrd = true; - result.inputs?.forEach((item, index, array) => { + result.inputs?.forEach((item, index) => { const isOrd = Boolean(item.forceSelect); if (isOrd) { if (!isPrevUtxoOrd) { @@ -302,12 +302,6 @@ export function coinSelectForOrdinal( ordUtxoCount += 1; isPrevUtxoOrd = true; } else { - if (index !== array.length - 1) { - throw new Error( - 'coinSelectForOrdinal ERROR: Change utxo should be last', - ); - } - isPrevUtxoOrd = false; } });