Skip to content

Commit 4f488c3

Browse files
authored
Add the "clearFees" function (#84)
1 parent 3dc760b commit 4f488c3

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/SmartTransactionsController.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,20 @@ export default class SmartTransactionsController extends BaseController<
468468
};
469469
}
470470

471+
clearFees(): Fees {
472+
const fees = {
473+
approvalTxFees: undefined,
474+
tradeTxFees: undefined,
475+
};
476+
this.update({
477+
smartTransactionsState: {
478+
...this.state.smartTransactionsState,
479+
fees,
480+
},
481+
});
482+
return fees;
483+
}
484+
471485
async getFees(
472486
tradeTx: UnsignedTransaction,
473487
approvalTx: UnsignedTransaction,

0 commit comments

Comments
 (0)