Skip to content

Conversation

@limpbrains
Copy link
Contributor

Description

This should prevent wallet instance to write any data to the redux or call any onMessage callback after it has been stoped.
Maybe we can stop restarting RN after this

Linked Issues/Tasks

Type of change

Bug fix

Tests

No test

@socket-security
Copy link

socket-security bot commented Dec 4, 2024

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/[email protected] network 0 9.39 MB limpbrains

🚮 Removed packages: npm/[email protected]

View full report↗︎

@limpbrains limpbrains marked this pull request as ready for review December 9, 2024 16:21
@limpbrains limpbrains requested a review from pwltr December 9, 2024 16:21
Comment on lines +34 to +39
// stop onchain wallet if it exists
try {
const wallet = getOnChainWallet();
await wallet.stop();
} catch (e) {}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can expect the wallet to exist at this point, so it should be able to be stopped. If it does fail we should probably propagate and return the error. Especially if we're going to remove the restart in the future.

Suggested change
// stop onchain wallet if it exists
try {
const wallet = getOnChainWallet();
await wallet.stop();
} catch (e) {}
// stop onchain wallet if it exists
const wallet = getOnChainWallet();
await wallet.stop();

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We run wipeApp during Onboard/TermsOfUse, at this point wallet does not exists

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right ok let's leave it for now. If we're going to remove the restart later we should probably return the error outside the onboarding though.

@limpbrains limpbrains merged commit 32bbd32 into master Dec 9, 2024
7 checks passed
@limpbrains limpbrains deleted the stop branch December 9, 2024 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants