Skip to content
Merged
Changes from all commits
Commits
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
7 changes: 7 additions & 0 deletions test/unit/transaction_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,13 @@ describe('Transaction', function () {
const envelope = transaction.toEnvelope().value();
envelope.tx().fee(StellarBase.xdr.Int64.fromString('300'));

expect(transaction.tx.fee().toString()).to.equal('100');
});
it('tx getter returns a defensive copy that does not affect internal XDR', function () {
const transaction = this.transaction;
const txCopy = transaction.tx;
txCopy.fee(StellarBase.xdr.Int64.fromString('999'));

expect(transaction.tx.fee().toString()).to.equal('100');
});
});
Expand Down
Loading