From 2f4bafe5306900373ce6073cecccb352bbe7cdbb Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Wed, 27 Nov 2024 10:55:24 -0600 Subject: [PATCH] chore: settler: don't forward without evidence --- packages/fast-usdc/src/exos/settler.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/fast-usdc/src/exos/settler.js b/packages/fast-usdc/src/exos/settler.js index ac74679cc06..e986593be8f 100644 --- a/packages/fast-usdc/src/exos/settler.js +++ b/packages/fast-usdc/src/exos/settler.js @@ -166,11 +166,13 @@ export const prepareSettler = ( this.state.mintedEarly.add(makeMintedEarlyKey(sender, amount)); return; - case undefined: case PendingTxStatus.Observed: case PendingTxStatus.AdvanceFailed: + return self.forward(found.txHash, sender, amount, EUD); + + case undefined: default: - return self.forward(found?.txHash, sender, amount, EUD); + console.warn('⚠️ tap: no status for ', sender, amount); } }, }, @@ -247,7 +249,7 @@ export const prepareSettler = ( statusManager.disbursed(txHash); }, /** - * @param {EvmHash | undefined} txHash + * @param {EvmHash} txHash * @param {NobleAddress} sender * @param {NatValue} fullValue * @param {string} EUD @@ -275,7 +277,7 @@ export const prepareSettler = ( * @param {SettlerTransferCtx} ctx * * @typedef {{ - * txHash: EvmHash | undefined; + * txHash: EvmHash; * sender: NobleAddress; * fullValue: NatValue; * }} SettlerTransferCtx