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

Adds helper to predict claimable balance IDs given a transaction. #482

Merged
merged 8 commits into from
Jan 11, 2022

Conversation

Shaptic
Copy link
Contributor

@Shaptic Shaptic commented Jan 5, 2022

This change introduces a helper method

Transaction.getClaimableBalanceId(opIndex: number): string;

which lets you predetermine the hex claimable balance ID of a createClaimableBalance operation prior to submission to the network.

Closes part (1) of stellar/js-stellar-sdk#584.

@Shaptic Shaptic marked this pull request as ready for review January 5, 2022 08:15
@Shaptic Shaptic requested a review from a team January 5, 2022 08:16
@Shaptic Shaptic self-assigned this Jan 5, 2022
Copy link
Contributor

@marcelosalloum marcelosalloum left a comment

Choose a reason for hiding this comment

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

I've marked 2 places to be fixed 👀 , a few suggestions 💡 and a question 🤔 .

src/transaction.js Outdated Show resolved Hide resolved
src/transaction.js Outdated Show resolved Hide resolved
src/transaction.js Outdated Show resolved Hide resolved
test/unit/operation_test.js Outdated Show resolved Hide resolved
test/unit/operation_test.js Outdated Show resolved Hide resolved
Copy link
Contributor

@marcelosalloum marcelosalloum left a comment

Choose a reason for hiding this comment

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

LGTM!

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