Skip to content

Conversation

@od-hunter
Copy link
Contributor

fixes #7

@od-hunter
Copy link
Contributor Author

@ElliotFriend please review.

Copy link
Contributor

@ElliotFriend ElliotFriend left a comment

Choose a reason for hiding this comment

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

thanks for the PR! i think you're pretty close. i'm requesting a couple nitpicky changes. after they're resolved, I think this will be good to go!

if (err.response?.status === 404) {
throw error(404, 'account not funded on network')
try {
fundWithFriendbot(publicKey)
Copy link
Contributor

Choose a reason for hiding this comment

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

i think you'll want to await fundWithFriendbot(...) here


let account = await server.accounts().accountId(publicKey).call()
return account
} catch (error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
} catch (error) {
} catch (err) {

This will be more consistent with the rest of the codebase

@od-hunter
Copy link
Contributor Author

@ElliotFriend , please review again

Copy link
Contributor

@ElliotFriend ElliotFriend left a comment

Choose a reason for hiding this comment

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

one more tiny nitpick and this is ready to go! Thanks!!

return account
} catch (err) {
throw error(500, {
message: `Unable to fund account ${publicKey}: ${error.message}`,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
message: `Unable to fund account ${publicKey}: ${error.message}`,
message: `Unable to fund account ${publicKey}: ${err.message}`,

this'll need to change to err, as well

@od-hunter
Copy link
Contributor Author

@ElliotFriend please review again🥲

Copy link
Contributor

@ElliotFriend ElliotFriend left a comment

Choose a reason for hiding this comment

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

excellent! Thanks so much for the contribution!

@ElliotFriend ElliotFriend merged commit 8c188cb into stellar:main Oct 7, 2024
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.

Testnet accounts should be checked for funding when signing in

2 participants