Skip to content

Commit a1acd79

Browse files
committed
Update gas but don't block
1 parent c2e2d69 commit a1acd79

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

packages/transaction-controller/src/TransactionController.ts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1366,6 +1366,31 @@ export class TransactionController extends BaseController<
13661366
traceContext: context,
13671367
}),
13681368
);
1369+
} else {
1370+
const newTransactionMeta = cloneDeep(addedTransactionMeta);
1371+
1372+
this.#updateGasProperties(newTransactionMeta)
1373+
.then(() => {
1374+
this.#updateTransactionInternal(
1375+
{
1376+
transactionId: newTransactionMeta.id,
1377+
skipHistory: true,
1378+
skipResimulateCheck: true,
1379+
skipValidation: true,
1380+
},
1381+
(tx) => {
1382+
tx.txParams.gas = newTransactionMeta.txParams.gas;
1383+
tx.txParams.gasPrice = newTransactionMeta.txParams.gasPrice;
1384+
tx.txParams.maxFeePerGas =
1385+
newTransactionMeta.txParams.maxFeePerGas;
1386+
tx.txParams.maxPriorityFeePerGas =
1387+
newTransactionMeta.txParams.maxPriorityFeePerGas;
1388+
},
1389+
);
1390+
1391+
return undefined;
1392+
})
1393+
.catch(noop);
13691394
}
13701395

13711396
// Checks if a transaction already exists with a given actionId

0 commit comments

Comments
 (0)