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

Implement FeeBumpTransaction builder, update SEP10 and SEP29 #278

Merged
merged 2 commits into from
May 4, 2020

Conversation

tamirms
Copy link
Contributor

@tamirms tamirms commented Apr 30, 2020

  • Implement FeeBumpTransaction builder
  • Update SEP 10 implementation to reject fee bump transactions and muxed accounts
  • Update SEP 29 implementation to support fee bump transactions

This PR should address all remaining protocol 13 issues in the Java SDK

close #277

Copy link
Contributor

@bartekn bartekn left a comment

Choose a reason for hiding this comment

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

LGTM! Are planning to update TransactionResponse in another PR or another SDK release?

Comment on lines 86 to 88
} catch (IOException exception) {
return null;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

This code was copied but we probably shouldn't silence errors like this.


long innerBaseFee = this.mInner.getFee();
long numOperations = this.mInner.getOperations().length;
if (numOperations > 0 ) {
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
if (numOperations > 0 ) {
if (numOperations > 0) {

public FeeBumpTransaction build() {
if (mBaseFee == null) {
throw new RuntimeException("base fee has to be set. you must call setBaseFee().");
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: can be a one-liner using checkNotNull.

* account which requires a memo.
* @throws IOException
*/
public SubmitTransactionResponse submitTransaction(FeeBumpTransaction transaction, boolean skipMemoRequiredCheck) throws IOException, AccountRequiresMemoException {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not merge this and above into one:

public SubmitTransactionResponse submitTransaction(AbstractTransaction transaction, boolean skipMemoRequiredCheck) throws IOException, AccountRequiresMemoException

👍 either way.

@tamirms
Copy link
Contributor Author

tamirms commented May 4, 2020

@bartekn

LGTM! Are planning to update TransactionResponse in another PR or another SDK release?

the TransactionResponse was updated here #275

@bartekn
Copy link
Contributor

bartekn commented May 4, 2020

the TransactionResponse was updated here #275

🤦 I was looking at master.

@tamirms tamirms merged commit 610b567 into release-0.16.0 May 4, 2020
@tamirms tamirms deleted the fee-bump branch May 4, 2020 17:57
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.

3 participants