feat: increment gas by iota when cap reached

Signed-off-by: bestmike007 <i@bestmike007.com>
This commit is contained in:
bestmike007
2024-02-14 23:31:08 -06:00
parent ca3c1d9c64
commit 0b08664204

View File

@@ -79,8 +79,8 @@ export async function rbfIfNecessary(
console.error(`Fail to load gas config for tx 0x${user_tx_id}`);
}
if (gas <= tx.fee) {
console.warn(`Skip RBF tx 0x${user_tx_id} because the gas reached cap`);
continue;
console.warn(`RBF tx 0x${user_tx_id} gas reached cap`);
gas = tx.fee + 10n;
}
const sponsored_tx = await sponsorTransaction({
transaction: user_tx,