Skip to content

Commit

Permalink
fix: add reconciliation-txn-recorded check to register-broadcast handler
Browse files Browse the repository at this point in the history
This is to fix the idempotency bug introduced in:
#3550
  • Loading branch information
vindard committed Nov 16, 2023
1 parent 3ee3688 commit df0a32a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/api/src/app/wallets/register-broadcasted-payout-txn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ export const registerBroadcastedPayout = async ({
const { estimatedProtocolFee } = setTxIdResult
if (estimatedProtocolFee.amount === proportionalFee.amount) return true

const isRecorded = await LedgerFacade.isOnChainFeeReconciliationRecorded(payoutId)
if (isRecorded !== false) return isRecorded

const { metadata } = LedgerFacade.OnChainFeeReconciliationLedgerMetadata({
payoutId,
txHash: txId,
Expand Down

0 comments on commit df0a32a

Please sign in to comment.