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 support for CAP0015 (FeeBump). #321

Merged
merged 31 commits into from
Apr 14, 2020
Merged
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
5921842
Fix hash generation with v1 or v0 transactions.
abuiles Apr 9, 2020
71f2ef7
Fix transaction envelope for TransactionV1Envelope.
abuiles Apr 10, 2020
fa2eea1
Add hidden flag to allow building v1 tx with tx builder.
abuiles Apr 10, 2020
8b6421c
Add Transaction.buildFeeBumpTransaction
abuiles Apr 10, 2020
ec9e04c
Change v1 feature flag name.
abuiles Apr 10, 2020
f987eb4
Add docs for new methods.
abuiles Apr 10, 2020
6e74d35
Fix ts types.
abuiles Apr 10, 2020
038bc18
Start fee and source from tx.
abuiles Apr 13, 2020
0d5eb38
Add innerFee and innerSignatures.
abuiles Apr 13, 2020
f9ffbd7
Fix test and make all related args a string.
abuiles Apr 13, 2020
cff1ae5
Add tests against expected xdr.
abuiles Apr 13, 2020
b5f69ec
Move buildFeeBumpTransaction to TransactionBuilder class.
abuiles Apr 13, 2020
8d3cac5
Fix ts tests.
abuiles Apr 13, 2020
4d306e4
Calculate fee from baseFee.
abuiles Apr 13, 2020
bdd2bbd
Move helper back to transaction.
abuiles Apr 13, 2020
1569dbb
Validate minFee.
abuiles Apr 13, 2020
d101496
Show received envelope type.
abuiles Apr 13, 2020
3e06b1e
Fix dependency cycle.
abuiles Apr 13, 2020
75013bb
Move buildFeeBumpTransaction to transaction builder.
abuiles Apr 14, 2020
1ca9afc
Add second condition for minimum base base.
abuiles Apr 14, 2020
0883dad
Fix types.
abuiles Apr 14, 2020
e61506d
Add comment.
abuiles Apr 14, 2020
e95b89d
Simplify minBase fee check.
abuiles Apr 14, 2020
3da9538
Receive a Transaction instead of a xdr.TransactionV1Envelope.
abuiles Apr 14, 2020
272b24d
Fix type for buildFeeBumpTransaction.
abuiles Apr 14, 2020
97ae0da
Fix typo for _envelopeType.
abuiles Apr 14, 2020
3b6eac9
Remove unused import
abuiles Apr 14, 2020
0dc1e00
Use builder to generate innerTx.
abuiles Apr 14, 2020
002f70d
Fix test.
abuiles Apr 14, 2020
c239c54
Add test for invalid envelopeType.
abuiles Apr 14, 2020
e0d734f
Validate transaction envelope to be of type v1.
abuiles Apr 14, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Show received envelope type.
  • Loading branch information
abuiles committed Apr 13, 2020
commit d101496063e2a6fee02d035609396180a136d4a6
4 changes: 2 additions & 2 deletions src/transaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export class Transaction {
.ed25519();
break;
default:
throw new Error('Unknown TransactionEnvelope');
throw new Error(`Invalid EnvelopeType: ${this.envelopeType}.`);
}

// since this transaction is immutable, save the tx
Expand Down Expand Up @@ -327,7 +327,7 @@ export class Transaction {
);
break;
default:
throw new Error('Unknown TransactionEnvelope');
throw new Error(`Invalid EnvelopeType: ${this.envelopeType}.`);
abuiles marked this conversation as resolved.
Show resolved Hide resolved
}

return envelope;
Expand Down