Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix build errors
  • Loading branch information
vinistevam committed Dec 5, 2025
commit 6444493033d2bb4b2a36106d0cb64397a4c5a1af
Original file line number Diff line number Diff line change
Expand Up @@ -1851,7 +1851,6 @@ describe('Bridge Status Controller Transaction Utils', () => {
id: 'tx1',
type: TransactionType.swap,
}),
'Update tx type to swap',
);

// Should update the approval transaction
Expand All @@ -1860,7 +1859,6 @@ describe('Bridge Status Controller Transaction Utils', () => {
id: 'tx2',
type: TransactionType.swapApproval,
}),
'Update tx type to swapApproval',
);
});

Expand Down Expand Up @@ -1895,7 +1893,6 @@ describe('Bridge Status Controller Transaction Utils', () => {
id: 'tx1',
type: TransactionType.swap,
}),
'Update tx type to swap',
);
});

Expand Down Expand Up @@ -1929,7 +1926,6 @@ describe('Bridge Status Controller Transaction Utils', () => {
id: 'tx1',
type: TransactionType.swapApproval,
}),
'Update tx type to swapApproval',
);
});

Expand Down Expand Up @@ -1967,15 +1963,13 @@ describe('Bridge Status Controller Transaction Utils', () => {
id: 'tx1',
type: TransactionType.bridge,
}),
'Update tx type to bridge',
);

expect(mockUpdateTransactionFn).toHaveBeenCalledWith(
expect.objectContaining({
id: 'tx2',
type: TransactionType.bridgeApproval,
}),
'Update tx type to bridgeApproval',
);
});

Expand Down
2 changes: 1 addition & 1 deletion packages/bridge-status-controller/src/utils/transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ export const findAndUpdateTransactionsInBatch = ({

if (txMeta) {
const updatedTx = { ...txMeta, type: txType as TransactionType };
updateTransactionFn(updatedTx, `Update tx type to ${txType}`);
updateTransactionFn(updatedTx);
txBatch[
[TransactionType.bridgeApproval, TransactionType.swapApproval].includes(
txType as TransactionType,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ async function submitBridgeTransaction(
{
transactionId: transaction.id,
messenger,
note: 'Add required transaction ID',
},
(transactionMeta) => {
if (!transactionMeta.requiredTransactionIds) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,6 @@ describe('Relay Submit Utils', () => {
{
transactionId: ORIGINAL_TRANSACTION_ID_MOCK,
messenger,
note: expect.any(String),
},
expect.any(Function),
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ async function executeSingleQuote(
{
transactionId: transaction.id,
messenger,
note: 'Remove nonce from skipped transaction',
},
(tx) => {
tx.txParams.nonce = undefined;
Expand All @@ -94,7 +93,6 @@ async function executeSingleQuote(
{
transactionId: transaction.id,
messenger,
note: 'Intent complete after Relay completion',
},
(tx) => {
tx.isIntentComplete = true;
Expand Down Expand Up @@ -217,7 +215,6 @@ async function submitTransactions(
{
transactionId: parentTransactionId,
messenger,
note: 'Add required transaction ID from Relay submission',
},
(tx) => {
if (!tx.requiredTransactionIds) {
Expand Down
1 change: 0 additions & 1 deletion packages/transaction-pay-controller/src/utils/quotes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ function syncTransaction({
{
transactionId,
messenger: messenger as never,
note: 'Update transaction pay data',
},
(tx: TransactionMeta) => {
tx.batchTransactions = batchTransactions;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ describe('Transaction Utils', () => {
{
transactionId: TRANSACTION_ID_MOCK,
messenger: messenger as never,
note: 'Test note',
},
(draft) => {
draft.txParams.from = '0x456';
Expand All @@ -212,7 +211,6 @@ describe('Transaction Utils', () => {
from: '0x456',
}),
}),
'Test note',
);
});

Expand All @@ -226,7 +224,6 @@ describe('Transaction Utils', () => {
{
transactionId: TRANSACTION_ID_MOCK,
messenger: messenger as never,
note: 'Test note',
},
noop,
),
Expand Down
8 changes: 1 addition & 7 deletions packages/transaction-pay-controller/src/utils/transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,18 +165,16 @@
* @param request - Request object.
* @param request.transactionId - ID of the transaction to update.
* @param request.messenger - Controller messenger.
* @param request.note - Note describing the update.

Check failure on line 168 in packages/transaction-pay-controller/src/utils/transaction.ts

View workflow job for this annotation

GitHub Actions / Lint, build, and test / Lint (22.x)

@param "request.note" does not exist on request
* @param fn - Function that applies updates to the transaction draft.
*/
export function updateTransaction(
{
transactionId,
messenger,
note,
}: {
transactionId: string;
messenger: TransactionPayControllerMessenger;
note: string;
},
fn: (draft: TransactionMeta) => void,
) {
Expand All @@ -190,11 +188,7 @@

fn(newTransaction);

messenger.call(
'TransactionController:updateTransaction',
newTransaction,
note,
);
messenger.call('TransactionController:updateTransaction', newTransaction);
}

/**
Expand Down
Loading