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

add command for exporting wallet account #68

Merged
merged 2 commits into from
Oct 28, 2024

Conversation

andrewkmin
Copy link
Contributor

Summary & Motivation (Problem vs. Solution)

Release Steps

See README for additional details.

  • Tag the release (once approved)
  • Attest (once merged)
  • Create release with changelog
  • Update Homebrew tap

Copy link
Contributor

@robin-turnkey robin-turnkey left a comment

Choose a reason for hiding this comment

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

Approved with optional nits

OutputError(eris.Errorf("failed to export wallet account: %s", resp.Error()))
}

exportBundle := resp.Payload.Activity.Result.ExportWalletAccountResult.ExportBundle
Copy link
Contributor

Choose a reason for hiding this comment

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

non-blocking nit: do explicit type-assert on Result to avoid panic if the wrong kind of result is returned.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

not sure if this is currently possible...?

invalid operation: resp.Payload.Activity.Result (variable of type *models.Result) is not an interface


exportBundle := resp.Payload.Activity.Result.ExportWalletAccountResult.ExportBundle
err = writeFile(*exportBundle, exportBundlePath)
if err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: if err := writeFile(*exportBundle, exportBundlePath); err != nil {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

love it!

@andrewkmin andrewkmin merged commit 32b9bc0 into main Oct 28, 2024
4 checks passed
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.

2 participants