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

Set withMuxing flags dynamically #535

Merged
merged 1 commit into from
Jun 30, 2021
Merged

Conversation

quietbits
Copy link
Contributor

No description provided.

@stellar-jenkins
Copy link

@quietbits quietbits requested a review from piyalbasu June 29, 2021 21:29
Comment on lines +543 to 547
if (isMAddress) {
account = new Sdk.MuxedAccount.fromAddress(attributes.sourceAccount, sequence);
} else {
account = new Sdk.Account(attributes.sourceAccount, sequence);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Just musing out loud here: when I initially designed the API, I specifically wanted to avoid people needing if blocks like this... Fundamentally, a muxed account is just another account. The SDK should transparently handle M accounts and G accounts and the user shouldn't have to care. Hopefully in future iterations (see e.g. stellar/js-stellar-base#436) we can remove the need for these kinds of checks.

@shanzzam
Copy link

Passed testing w/ sending to both Muxed and regular accounts

@quietbits quietbits merged commit 5d92e57 into master Jun 30, 2021
@quietbits quietbits deleted the il-muxed-accounts-dynamic-flag branch August 19, 2021 00:15
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.

5 participants