From 7bb3b947baf5f23c277358ede90bd893d75d52f4 Mon Sep 17 00:00:00 2001 From: Rafal Czajkowski Date: Mon, 10 Jul 2023 13:01:32 +0200 Subject: [PATCH] Leave TODO in `findWalletForRedemption` function In case a wallet is working on something (e.g. redemption) and a Bitcoin transaction was already submitted by the wallet to the bitcoin chain (new utxo returned from bitcoin client), but proof hasn't been submitted yet to the Bridge (old main utxo returned from the Bridge) the `findWalletForRedemption` function will not find such a wallet. To cover this case, we should take, for example, the last 5 transactions made by the wallet into account. We will address this issue in a follow-up work. --- typescript/src/redemption.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/typescript/src/redemption.ts b/typescript/src/redemption.ts index 91d169d37..2d8a6f155 100644 --- a/typescript/src/redemption.ts +++ b/typescript/src/redemption.ts @@ -495,6 +495,13 @@ export async function findWalletForRedemption( bitcoinNetwork ) + // TODO: In case a wallet is working on something (e.g. redemption) and a + // Bitcoin transaction was already submitted by the wallet to the bitcoin + // chain (new utxo returned from bitcoin client), but proof hasn't been + // submitted yet to the Bridge (old main utxo returned from the Bridge) the + // `findWalletForRedemption` function will not find such a wallet. To cover + // this case, we should take, for example, the last 5 transactions made by + // the wallet into account. We will address this issue in a follow-up. const utxos = await bitcoinClient.findAllUnspentTransactionOutputs( walletBitcoinAddress )