Skip to content

Commit

Permalink
Mark the "ensureUniqueSmartTransactions" fn as private
Browse files Browse the repository at this point in the history
  • Loading branch information
dan437 committed Jun 4, 2024
1 parent bc241f1 commit aad48db
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/SmartTransactionsController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,15 +183,15 @@ export default class SmartTransactionsController extends StaticIntervalPollingCo
this.getNetworkClientById = getNetworkClientById;

this.initializeSmartTransactionsForChainId();
this.ensureUniqueSmartTransactions();
this.#ensureUniqueSmartTransactions();

onNetworkStateChange(({ providerConfig: newProvider }) => {
const { chainId } = newProvider;
const isNewChainId = chainId !== this.config.chainId;
this.configure({ chainId });
this.initializeSmartTransactionsForChainId();
if (isNewChainId) {
this.ensureUniqueSmartTransactions();
this.#ensureUniqueSmartTransactions();
}
this.checkPoll(this.state);
this.ethQuery = new EthQuery(provider);
Expand Down Expand Up @@ -246,7 +246,7 @@ export default class SmartTransactionsController extends StaticIntervalPollingCo
// We fixed having duplicate smart transactions with the same uuid in a very rare edge case.
// This function resolves it for a few users who have this issue and once we see in logs
// that everything is fine, we can remove this function.
ensureUniqueSmartTransactions() {
#ensureUniqueSmartTransactions() {
const { smartTransactions } = this.state.smartTransactionsState;
const chainId = ChainId.mainnet; // Smart Transactions are only available on Ethereum mainnet at the moment.
const smartTransactionsForChainId = smartTransactions[chainId];
Expand Down

0 comments on commit aad48db

Please sign in to comment.