Skip to content

Commit

Permalink
Remove is confirmed check (#3633)
Browse files Browse the repository at this point in the history
* Remove is confirmed check

* Pass confirmations
  • Loading branch information
ygao76 authored Mar 10, 2023
1 parent 610088b commit 2d80160
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions ironfish/src/wallet/wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -979,7 +979,7 @@ export class Wallet {
return { amount, notes }
}

for await (const unspentNote of this.getUnspentNotes(sender, assetId)) {
for await (const unspentNote of this.getUnspentNotes(sender, assetId, { confirmations })) {
if (unspentNote.note.value() <= 0n) {
continue
}
Expand All @@ -988,11 +988,6 @@ export class Wallet {
Assert.isNotNull(unspentNote.nullifier)
Assert.isNotNull(unspentNote.sequence)

const isConfirmed = head.sequence - unspentNote.sequence >= confirmations
if (!isConfirmed) {
continue
}

if (await this.checkNoteOnChainAndRepair(sender, unspentNote)) {
continue
}
Expand Down

0 comments on commit 2d80160

Please sign in to comment.