Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: refresh after chequebook withdraw deposit #576

Merged
merged 2 commits into from
Nov 7, 2022

Conversation

Cafe137
Copy link
Collaborator

@Cafe137 Cafe137 commented Nov 1, 2022

No description provided.

@Cafe137 Cafe137 marked this pull request as ready for review November 1, 2022 12:50
@Cafe137 Cafe137 linked an issue Nov 1, 2022 that may be closed by this pull request
@bee-worker
Copy link
Collaborator

bee-worker commented Nov 1, 2022

🐝 PR preview in Swarm

Preview URL: https://bah5acgzacilq553e4wci46qmcnc37bqs73mkrc7bcixzbopg6x5kbanurpaa.bzz.link
Swarm Hash: 12170ef764e5848e7a0c1345bf8612fed8a88be1122f90b9e6f5faa081b48bc0
Commit Hash: f976bab
Commit Message: refactor: remove extra catch

Copy link
Contributor

@AuHau AuHau left a comment

Choose a reason for hiding this comment

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

Generally LGTM, but...

Comment on lines 23 to 25
const transactionHash = await beeDebugApi.depositTokens(amount.toString()).catch((error: Error) => {
throw error
})
Copy link
Contributor

Choose a reason for hiding this comment

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

Ehm why the catch()? With throw inside it? 🤨

Suggested change
const transactionHash = await beeDebugApi.depositTokens(amount.toString()).catch((error: Error) => {
throw error
})
const transactionHash = await beeDebugApi.depositTokens(amount.toString())

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

To convert unhandled rejection to a sync error, but it turned out not to be necessary. Removing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Chequebook balance is not refreshed after deposit
3 participants