Skip to content

Commit

Permalink
Set FullyCanoncialSig flag and fix integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Clark committed Oct 20, 2015
1 parent 01ecd19 commit 8a1bc23
Show file tree
Hide file tree
Showing 33 changed files with 284 additions and 270 deletions.
8 changes: 6 additions & 2 deletions src/api/common/schema-validator.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,12 @@ function loadSchemas() {
}

function formatSchemaError(error) {
return error.field + ' ' + error.message
+ (error.value ? ' (' + JSON.stringify(error.value) + ')' : '');
try {
return error.field + ' ' + error.message
+ (error.value ? ' (' + JSON.stringify(error.value) + ')' : '');
} catch (err) {
return error.field + ' ' + error.message;
}
}

function formatSchemaErrors(errors) {
Expand Down
17 changes: 4 additions & 13 deletions src/api/server/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@

const _ = require('lodash');
const common = require('../common');
import type {Remote} from '../../core/remote';

// If a ledger is not received in this time, consider the connection offline
const CONNECTION_TIMEOUT = 1000 * 30;

type GetServerInfoResponse = {
buildVersion: string,
Expand Down Expand Up @@ -38,14 +34,9 @@ type GetServerInfoResponse = {
validationQuorum: number
}

function isUpToDate(remote: Remote): boolean {
const server = remote.getServer();
return Boolean(server) && (remote._stand_alone
|| (Date.now() - server._lastLedgerClose) <= CONNECTION_TIMEOUT);
}

function isConnected(): boolean {
return Boolean(this.remote._ledger_current_index) && isUpToDate(this.remote);
const server = this.remote.getServer();
return Boolean(server && server.isConnected());
}

function getServerInfoAsync(
Expand Down Expand Up @@ -78,7 +69,7 @@ function connect(): Promise<void> {
return common.promisify(callback => {
try {
this.remote.connect(() => callback(null));
} catch(error) {
} catch (error) {
callback(new common.errors.RippledNetworkError(error.message));
}
})();
Expand All @@ -88,7 +79,7 @@ function disconnect(): Promise<void> {
return common.promisify(callback => {
try {
this.remote.disconnect(() => callback(null));
} catch(error) {
} catch (error) {
callback(new common.errors.RippledNetworkError(error.message));
}
})();
Expand Down
4 changes: 2 additions & 2 deletions src/api/transaction/order.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ function createOrderTransaction(account: string, order: Order): Transaction {
function prepareOrderAsync(account: string, order: Order,
instructions: Instructions, callback
) {
const transaction = createOrderTransaction(account, order);
utils.prepareTransaction(transaction, this.remote, instructions, callback);
const txJSON = createOrderTransaction(account, order).tx_json;
utils.prepareTransaction(txJSON, this.remote, instructions, callback);
}

function prepareOrder(account: string, order: Order,
Expand Down
4 changes: 2 additions & 2 deletions src/api/transaction/ordercancellation.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ function createOrderCancellationTransaction(account: string,
function prepareOrderCancellationAsync(account: string, sequence: number,
instructions: Instructions, callback
) {
const transaction = createOrderCancellationTransaction(account, sequence);
utils.prepareTransaction(transaction, this.remote, instructions, callback);
const txJSON = createOrderCancellationTransaction(account, sequence).tx_json;
utils.prepareTransaction(txJSON, this.remote, instructions, callback);
}

function prepareOrderCancellation(account: string, sequence: number,
Expand Down
4 changes: 2 additions & 2 deletions src/api/transaction/payment.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ function createPaymentTransaction(account: string, paymentArgument: Payment
function preparePaymentAsync(account: string, payment: Payment,
instructions: Instructions, callback
) {
const transaction = createPaymentTransaction(account, payment);
utils.prepareTransaction(transaction, this.remote, instructions, callback);
const txJSON = createPaymentTransaction(account, payment).tx_json;
utils.prepareTransaction(txJSON, this.remote, instructions, callback);
}

function preparePayment(account: string, payment: Payment,
Expand Down
4 changes: 2 additions & 2 deletions src/api/transaction/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ function createSettingsTransaction(account: string, settings: Settings
function prepareSettingsAsync(account: string, settings: Settings,
instructions: Instructions, callback
) {
const transaction = createSettingsTransaction(account, settings);
utils.prepareTransaction(transaction, this.remote, instructions, callback);
const txJSON = createSettingsTransaction(account, settings).tx_json;
utils.prepareTransaction(txJSON, this.remote, instructions, callback);
}

function prepareSettings(account: string, settings: Object,
Expand Down
6 changes: 3 additions & 3 deletions src/api/transaction/suspended-payment-cancellation.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ function createSuspendedPaymentCancellationTransaction(account: string,
function prepareSuspendedPaymentCancellationAsync(account: string,
payment: SuspendedPaymentCancellation, instructions: Instructions, callback
) {
const transaction =
createSuspendedPaymentCancellationTransaction(account, payment);
utils.prepareTransaction(transaction, this.remote, instructions, callback);
const txJSON =
createSuspendedPaymentCancellationTransaction(account, payment).tx_json;
utils.prepareTransaction(txJSON, this.remote, instructions, callback);
}

function prepareSuspendedPaymentCancellation(account: string,
Expand Down
6 changes: 3 additions & 3 deletions src/api/transaction/suspended-payment-creation.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ function createSuspendedPaymentCreationTransaction(account: string,
function prepareSuspendedPaymentCreationAsync(account: string,
payment: SuspendedPaymentCreation, instructions: Instructions, callback
) {
const transaction =
createSuspendedPaymentCreationTransaction(account, payment);
utils.prepareTransaction(transaction, this.remote, instructions, callback);
const txJSON =
createSuspendedPaymentCreationTransaction(account, payment).tx_json;
utils.prepareTransaction(txJSON, this.remote, instructions, callback);
}

function prepareSuspendedPaymentCreation(account: string,
Expand Down
6 changes: 3 additions & 3 deletions src/api/transaction/suspended-payment-execution.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ function createSuspendedPaymentExecutionTransaction(account: string,
function prepareSuspendedPaymentExecutionAsync(account: string,
payment: SuspendedPaymentExecution, instructions: Instructions, callback
) {
const transaction =
createSuspendedPaymentExecutionTransaction(account, payment);
utils.prepareTransaction(transaction, this.remote, instructions, callback);
const txJSON =
createSuspendedPaymentExecutionTransaction(account, payment).tx_json;
utils.prepareTransaction(txJSON, this.remote, instructions, callback);
}

function prepareSuspendedPaymentExecution(account: string,
Expand Down
4 changes: 2 additions & 2 deletions src/api/transaction/trustline.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ function createTrustlineTransaction(account: string,
function prepareTrustlineAsync(account: string,
trustline: TrustLineSpecification, instructions: Instructions, callback
) {
const transaction = createTrustlineTransaction(account, trustline);
utils.prepareTransaction(transaction, this.remote, instructions, callback);
const txJSON = createTrustlineTransaction(account, trustline).tx_json;
utils.prepareTransaction(txJSON, this.remote, instructions, callback);
}

function prepareTrustline(account: string,
Expand Down
60 changes: 60 additions & 0 deletions src/api/transaction/txflags.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
'use strict';

const transactionFlags = {
// Universal flags can apply to any transaction type
Universal: {
FullyCanonicalSig: 0x80000000
},

AccountSet: {
RequireDestTag: 0x00010000,
OptionalDestTag: 0x00020000,
RequireAuth: 0x00040000,
OptionalAuth: 0x00080000,
DisallowXRP: 0x00100000,
AllowXRP: 0x00200000
},

TrustSet: {
SetAuth: 0x00010000,
NoRipple: 0x00020000,
SetNoRipple: 0x00020000,
ClearNoRipple: 0x00040000,
SetFreeze: 0x00100000,
ClearFreeze: 0x00200000
},

OfferCreate: {
Passive: 0x00010000,
ImmediateOrCancel: 0x00020000,
FillOrKill: 0x00040000,
Sell: 0x00080000
},

Payment: {
NoRippleDirect: 0x00010000,
PartialPayment: 0x00020000,
LimitQuality: 0x00040000
}
};

// The following are integer (as opposed to bit) flags
// that can be set for particular transactions in the
// SetFlag or ClearFlag field
const transactionFlagIndices = {
AccountSet: {
asfRequireDest: 1,
asfRequireAuth: 2,
asfDisallowXRP: 3,
asfDisableMaster: 4,
asfAccountTxnID: 5,
asfNoFreeze: 6,
asfGlobalFreeze: 7,
asfDefaultRipple: 8
}
};

module.exports = {
transactionFlags,
transactionFlagIndices
};
17 changes: 12 additions & 5 deletions src/api/transaction/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const async = require('async');
const BigNumber = require('bignumber.js');
const common = require('../common');
const composeAsync = common.composeAsync;
const txFlags = require('./txflags');
import type {Remote} from '../../core/remote';
import type {Transaction} from '../../core/transaction';
import type {Instructions} from './types.js';
Expand Down Expand Up @@ -44,17 +45,23 @@ function formatPrepareResponse(txJSON: Object): Object {
};
}

function setCanonicalFlag(txJSON) {
txJSON.Flags |= txFlags.transactionFlags.Universal.FullyCanonicalSig;

// JavaScript converts operands to 32-bit signed ints before doing bitwise
// operations. We need to convert it back to an unsigned int.
txJSON.Flags = txJSON.Flags >>> 0;
}

type Callback = (err: ?(typeof Error),
data: {txJSON: string, instructions: Instructions}) => void;
function prepareTransaction(transaction: Transaction, remote: Remote,
function prepareTransaction(txJSON: Object, remote: Remote,
instructions: Instructions, callback: Callback
): void {
common.validate.instructions(instructions);

transaction.complete();
const account = transaction.getAccount();
const txJSON = transaction.tx_json;

const account = txJSON.Account;
setCanonicalFlag(txJSON);

function prepareMaxLedgerVersion(callback_) {
if (instructions.maxLedgerVersion !== undefined) {
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/api/requests/sign.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"txJSON": "{\"Flags\":0,\"TransactionType\":\"AccountSet\",\"Account\":\"r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59\",\"Domain\":\"726970706C652E636F6D\",\"LastLedgerSequence\":8820051,\"Fee\":\"12\",\"Sequence\":23}",
"txJSON": "{\"Flags\":2147483648,\"TransactionType\":\"AccountSet\",\"Account\":\"r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59\",\"Domain\":\"726970706C652E636F6D\",\"LastLedgerSequence\":8820051,\"Fee\":\"12\",\"Sequence\":23}",
"instructions": {
"fee": "12",
"sequence": 23,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"txJSON": "{\"Flags\":0,\"TransactionType\":\"OfferCancel\",\"Account\":\"r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59\",\"OfferSequence\":23,\"LastLedgerSequence\":8820051,\"Fee\":\"12\",\"Sequence\":23}",
"txJSON": "{\"Flags\":2147483648,\"TransactionType\":\"OfferCancel\",\"Account\":\"r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59\",\"OfferSequence\":23,\"LastLedgerSequence\":8820051,\"Fee\":\"12\",\"Sequence\":23}",
"instructions": {
"fee": "12",
"sequence": 23,
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/api/responses/prepare-order-sell.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"txJSON": "{\"Flags\":655360,\"TransactionType\":\"OfferCreate\",\"Account\":\"r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59\",\"TakerGets\":{\"value\":\"10.1\",\"currency\":\"USD\",\"issuer\":\"rMH4UxPrbuMa1spCBR98hLLyNJp4d8p4tM\"},\"TakerPays\":\"2000000\",\"LastLedgerSequence\":8820051,\"Fee\":\"12\",\"Sequence\":23}",
"txJSON": "{\"Flags\":2148139008,\"TransactionType\":\"OfferCreate\",\"Account\":\"r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59\",\"TakerGets\":{\"value\":\"10.1\",\"currency\":\"USD\",\"issuer\":\"rMH4UxPrbuMa1spCBR98hLLyNJp4d8p4tM\"},\"TakerPays\":\"2000000\",\"LastLedgerSequence\":8820051,\"Fee\":\"12\",\"Sequence\":23}",
"instructions": {
"fee": "12",
"sequence": 23,
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/api/responses/prepare-order.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"txJSON": "{\"Flags\":131072,\"TransactionType\":\"OfferCreate\",\"Account\":\"r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59\",\"TakerGets\":\"2000000\",\"TakerPays\":{\"value\":\"10.1\",\"currency\":\"USD\",\"issuer\":\"rMH4UxPrbuMa1spCBR98hLLyNJp4d8p4tM\"},\"LastLedgerSequence\":8820051,\"Fee\":\"12\",\"Sequence\":23}",
"txJSON": "{\"Flags\":2147614720,\"TransactionType\":\"OfferCreate\",\"Account\":\"r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59\",\"TakerGets\":\"2000000\",\"TakerPays\":{\"value\":\"10.1\",\"currency\":\"USD\",\"issuer\":\"rMH4UxPrbuMa1spCBR98hLLyNJp4d8p4tM\"},\"LastLedgerSequence\":8820051,\"Fee\":\"12\",\"Sequence\":23}",
"instructions": {
"fee": "12",
"sequence": 23,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"txJSON": "{\"Flags\":327680,\"TransactionType\":\"Payment\",\"Account\":\"r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59\",\"Destination\":\"rpZc4mVfWUif9CRoHRKKcmhu1nx2xktxBo\",\"Amount\":\"10000\",\"InvoiceID\":\"A98FD36C17BE2B8511AD36DC335478E7E89F06262949F36EB88E2D683BBCC50A\",\"SourceTag\":14,\"DestinationTag\":58,\"Memos\":[{\"Memo\":{\"MemoType\":\"74657374\",\"MemoFormat\":\"706C61696E2F74657874\",\"MemoData\":\"7465787465642064617461\"}}],\"LastLedgerSequence\":8820051,\"Fee\":\"12\",\"Sequence\":23}",
"txJSON": "{\"Flags\":2147811328,\"TransactionType\":\"Payment\",\"Account\":\"r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59\",\"Destination\":\"rpZc4mVfWUif9CRoHRKKcmhu1nx2xktxBo\",\"Amount\":\"10000\",\"InvoiceID\":\"A98FD36C17BE2B8511AD36DC335478E7E89F06262949F36EB88E2D683BBCC50A\",\"SourceTag\":14,\"DestinationTag\":58,\"Memos\":[{\"Memo\":{\"MemoType\":\"74657374\",\"MemoFormat\":\"706C61696E2F74657874\",\"MemoData\":\"7465787465642064617461\"}}],\"LastLedgerSequence\":8820051,\"Fee\":\"12\",\"Sequence\":23}",
"instructions": {
"fee": "12",
"sequence": 23,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"txJSON": "{\"Flags\":131072,\"TransactionType\":\"Payment\",\"Account\":\"r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59\",\"Destination\":\"ra5nK24KXen9AHvsdFTKHSANinZseWnPcX\",\"Amount\":{\"value\":\"9999999999999999e80\",\"currency\":\"USD\",\"issuer\":\"ra5nK24KXen9AHvsdFTKHSANinZseWnPcX\"},\"SendMax\":{\"value\":\"5\",\"currency\":\"USD\",\"issuer\":\"r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59\"},\"DeliverMin\":{\"value\":\"9999999999999999e80\",\"currency\":\"USD\",\"issuer\":\"ra5nK24KXen9AHvsdFTKHSANinZseWnPcX\"},\"Paths\":[[{\"account\":\"rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B\"},{\"currency\":\"XRP\"},{\"issuer\":\"rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q\",\"currency\":\"USD\"},{\"account\":\"rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q\"},{\"account\":\"rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn\"}],[{\"account\":\"rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B\"},{\"currency\":\"XRP\"},{\"issuer\":\"rfsEoNBUBbvkf4jPcFe2u9CyaQagLVHGfP\",\"currency\":\"USD\"},{\"account\":\"rfsEoNBUBbvkf4jPcFe2u9CyaQagLVHGfP\"},{\"account\":\"rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q\"}]],\"LastLedgerSequence\":8820051,\"Fee\":\"12\",\"Sequence\":23}",
"txJSON": "{\"Flags\":2147614720,\"TransactionType\":\"Payment\",\"Account\":\"r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59\",\"Destination\":\"ra5nK24KXen9AHvsdFTKHSANinZseWnPcX\",\"Amount\":{\"value\":\"9999999999999999e80\",\"currency\":\"USD\",\"issuer\":\"ra5nK24KXen9AHvsdFTKHSANinZseWnPcX\"},\"SendMax\":{\"value\":\"5\",\"currency\":\"USD\",\"issuer\":\"r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59\"},\"DeliverMin\":{\"value\":\"9999999999999999e80\",\"currency\":\"USD\",\"issuer\":\"ra5nK24KXen9AHvsdFTKHSANinZseWnPcX\"},\"Paths\":[[{\"account\":\"rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B\"},{\"currency\":\"XRP\"},{\"issuer\":\"rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q\",\"currency\":\"USD\"},{\"account\":\"rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q\"},{\"account\":\"rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn\"}],[{\"account\":\"rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B\"},{\"currency\":\"XRP\"},{\"issuer\":\"rfsEoNBUBbvkf4jPcFe2u9CyaQagLVHGfP\",\"currency\":\"USD\"},{\"account\":\"rfsEoNBUBbvkf4jPcFe2u9CyaQagLVHGfP\"},{\"account\":\"rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q\"}]],\"LastLedgerSequence\":8820051,\"Fee\":\"12\",\"Sequence\":23}",
"instructions": {
"fee": "12",
"sequence": 23,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"txJSON": "{\"Flags\":458752,\"TransactionType\":\"Payment\",\"Account\":\"r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59\",\"Destination\":\"rpZc4mVfWUif9CRoHRKKcmhu1nx2xktxBo\",\"Amount\":{\"value\":\"0.01\",\"currency\":\"LTC\",\"issuer\":\"rpZc4mVfWUif9CRoHRKKcmhu1nx2xktxBo\"},\"InvoiceID\":\"A98FD36C17BE2B8511AD36DC335478E7E89F06262949F36EB88E2D683BBCC50A\",\"SourceTag\":14,\"DestinationTag\":58,\"Memos\":[{\"Memo\":{\"MemoType\":\"74657374\",\"MemoFormat\":\"706C61696E2F74657874\",\"MemoData\":\"7465787465642064617461\"}}],\"SendMax\":{\"value\":\"0.01\",\"currency\":\"USD\",\"issuer\":\"r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59\"},\"Paths\":[[{\"account\":\"rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q\",\"issuer\":\"rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q\",\"currency\":\"USD\",\"type_hex\":\"0000000000000031\"},{\"issuer\":\"rfYv1TXnwgDDK4WQNbFALykYuEBnrR4pDX\",\"currency\":\"LTC\",\"type_hex\":\"0000000000000030\"},{\"account\":\"rfYv1TXnwgDDK4WQNbFALykYuEBnrR4pDX\",\"issuer\":\"rfYv1TXnwgDDK4WQNbFALykYuEBnrR4pDX\",\"currency\":\"LTC\",\"type_hex\":\"0000000000000031\"}]],\"LastLedgerSequence\":8820051,\"Fee\":\"12\",\"Sequence\":23}",
"txJSON": "{\"Flags\":2147942400,\"TransactionType\":\"Payment\",\"Account\":\"r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59\",\"Destination\":\"rpZc4mVfWUif9CRoHRKKcmhu1nx2xktxBo\",\"Amount\":{\"value\":\"0.01\",\"currency\":\"LTC\",\"issuer\":\"rpZc4mVfWUif9CRoHRKKcmhu1nx2xktxBo\"},\"InvoiceID\":\"A98FD36C17BE2B8511AD36DC335478E7E89F06262949F36EB88E2D683BBCC50A\",\"SourceTag\":14,\"DestinationTag\":58,\"Memos\":[{\"Memo\":{\"MemoType\":\"74657374\",\"MemoFormat\":\"706C61696E2F74657874\",\"MemoData\":\"7465787465642064617461\"}}],\"SendMax\":{\"value\":\"0.01\",\"currency\":\"USD\",\"issuer\":\"r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59\"},\"Paths\":[[{\"account\":\"rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q\",\"issuer\":\"rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q\",\"currency\":\"USD\",\"type_hex\":\"0000000000000031\"},{\"issuer\":\"rfYv1TXnwgDDK4WQNbFALykYuEBnrR4pDX\",\"currency\":\"LTC\",\"type_hex\":\"0000000000000030\"},{\"account\":\"rfYv1TXnwgDDK4WQNbFALykYuEBnrR4pDX\",\"issuer\":\"rfYv1TXnwgDDK4WQNbFALykYuEBnrR4pDX\",\"currency\":\"LTC\",\"type_hex\":\"0000000000000031\"}]],\"LastLedgerSequence\":8820051,\"Fee\":\"12\",\"Sequence\":23}",
"instructions": {
"fee": "12",
"sequence": 23,
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/api/responses/prepare-payment.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"txJSON": "{\"Flags\":0,\"TransactionType\":\"Payment\",\"Account\":\"r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59\",\"Destination\":\"rpZc4mVfWUif9CRoHRKKcmhu1nx2xktxBo\",\"Amount\":{\"value\":\"0.01\",\"currency\":\"USD\",\"issuer\":\"rMH4UxPrbuMa1spCBR98hLLyNJp4d8p4tM\"},\"SendMax\":{\"value\":\"0.01\",\"currency\":\"USD\",\"issuer\":\"rMH4UxPrbuMa1spCBR98hLLyNJp4d8p4tM\"},\"LastLedgerSequence\":8820051,\"Fee\":\"12\",\"Sequence\":23}",
"txJSON": "{\"Flags\":2147483648,\"TransactionType\":\"Payment\",\"Account\":\"r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59\",\"Destination\":\"rpZc4mVfWUif9CRoHRKKcmhu1nx2xktxBo\",\"Amount\":{\"value\":\"0.01\",\"currency\":\"USD\",\"issuer\":\"rMH4UxPrbuMa1spCBR98hLLyNJp4d8p4tM\"},\"SendMax\":{\"value\":\"0.01\",\"currency\":\"USD\",\"issuer\":\"rMH4UxPrbuMa1spCBR98hLLyNJp4d8p4tM\"},\"LastLedgerSequence\":8820051,\"Fee\":\"12\",\"Sequence\":23}",
"instructions": {
"fee": "12",
"sequence": 23,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"txJSON": "{\"Flags\":0,\"TransactionType\":\"AccountSet\",\"Account\":\"r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59\",\"WalletLocator\":\"0\",\"LastLedgerSequence\":8820051,\"Fee\":\"12\",\"Sequence\":23}",
"txJSON": "{\"Flags\":2147483648,\"TransactionType\":\"AccountSet\",\"Account\":\"r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59\",\"WalletLocator\":\"0\",\"LastLedgerSequence\":8820051,\"Fee\":\"12\",\"Sequence\":23}",
"instructions": {
"fee": "12",
"sequence": 23,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"txJSON": "{\"Flags\":0,\"TransactionType\":\"AccountSet\",\"Account\":\"r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59\",\"ClearFlag\":1,\"LastLedgerSequence\":8820051,\"Fee\":\"12\",\"Sequence\":23}",
"txJSON": "{\"Flags\":2147483648,\"TransactionType\":\"AccountSet\",\"Account\":\"r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59\",\"ClearFlag\":1,\"LastLedgerSequence\":8820051,\"Fee\":\"12\",\"Sequence\":23}",
"instructions": {
"fee": "12",
"sequence": 23,
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/api/responses/prepare-settings-flag-set.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"txJSON": "{\"Flags\":0,\"TransactionType\":\"AccountSet\",\"Account\":\"r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59\",\"SetFlag\":1,\"LastLedgerSequence\":8820051,\"Fee\":\"12\",\"Sequence\":23}",
"txJSON": "{\"Flags\":2147483648,\"TransactionType\":\"AccountSet\",\"Account\":\"r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59\",\"SetFlag\":1,\"LastLedgerSequence\":8820051,\"Fee\":\"12\",\"Sequence\":23}",
"instructions": {
"fee": "12",
"sequence": 23,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"txJSON": "{\"Flags\":0,\"TransactionType\":\"SetRegularKey\",\"Account\":\"r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59\",\"RegularKey\":\"rAR8rR8sUkBoCZFawhkWzY4Y5YoyuznwD\",\"LastLedgerSequence\":8820051,\"Fee\":\"12\",\"Sequence\":23}",
"txJSON": "{\"Flags\":2147483648,\"TransactionType\":\"SetRegularKey\",\"Account\":\"r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59\",\"RegularKey\":\"rAR8rR8sUkBoCZFawhkWzY4Y5YoyuznwD\",\"LastLedgerSequence\":8820051,\"Fee\":\"12\",\"Sequence\":23}",
"instructions": {
"fee": "12",
"sequence": 23,
Expand Down

0 comments on commit 8a1bc23

Please sign in to comment.