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

Make source_account optional and use .source_account() to handle None case with config lookup #1713

Open
willemneal opened this issue Nov 7, 2024 · 1 comment
Assignees
Labels

Comments

@willemneal
Copy link
Member

          The only place where this `Address` is pulled from the config is for the source account, so we could just handle the option is the `source_account()`, method. If `self.source_account` is None, then we use the config, otherwise it will be the `Address` type and it resolves as normal. I do agree that using the empty string as a special case is not very idiomatic rust and Option is the preferred way to do it.  Plus my recent work adding a `ContractAddress` type make me realize that we need a unified approach between it and `Address` because in contract invoke an `ScAddress` could be either! So more reason not to handle the config at all in the `Address` type.

Originally posted by @willemneal in #1711 (comment)

@github-project-automation github-project-automation bot moved this to Backlog (Not Ready) in DevX Nov 7, 2024
Copy link
Contributor

github-actions bot commented Dec 9, 2024

This issue is stale because it has been assigned for 30 days with no activity. It will be closed in 30 days unless the stale label is removed, and the assignee is removed or updated.

@github-actions github-actions bot added the stale label Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Backlog (Not Ready)
Development

No branches or pull requests

2 participants