Skip to content

Commit

Permalink
Leave TODO in findWalletForRedemption function
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
r-czajkowski committed Jul 10, 2023
1 parent b57077a commit e68a7ef
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions typescript/src/redemption.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 work.
const utxos = await bitcoinClient.findAllUnspentTransactionOutputs(
walletBitcoinAddress
)
Expand Down

0 comments on commit e68a7ef

Please sign in to comment.