mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-27 06:25:51 +00:00
JS: Fix offer_create.
This commit is contained in:
@@ -676,8 +676,6 @@ Transaction.prototype.offer_create = function (src, taker_pays, taker_gets, expi
|
|||||||
this.secret = this.account_secret(src);
|
this.secret = this.account_secret(src);
|
||||||
this.transaction.TransactionType = 'OfferCreate';
|
this.transaction.TransactionType = 'OfferCreate';
|
||||||
this.transaction.Account = this.account_default(src);
|
this.transaction.Account = this.account_default(src);
|
||||||
this.transaction.Amount = deliver_amount.to_json();
|
|
||||||
this.transaction.Destination = dst_account;
|
|
||||||
this.transaction.Fee = fees.offer.to_json();
|
this.transaction.Fee = fees.offer.to_json();
|
||||||
this.transaction.TakerPays = taker_pays.to_json();
|
this.transaction.TakerPays = taker_pays.to_json();
|
||||||
this.transaction.TakerGets = taker_gets.to_json();
|
this.transaction.TakerGets = taker_gets.to_json();
|
||||||
|
|||||||
@@ -58,7 +58,8 @@ buster.testCase("Remote functions", {
|
|||||||
|
|
||||||
buster.assert.equals(m.ledger_current_index, 3);
|
buster.assert.equals(m.ledger_current_index, 3);
|
||||||
done();
|
done();
|
||||||
}).on('error', function(m) {
|
})
|
||||||
|
.on('error', function(m) {
|
||||||
console.log(m);
|
console.log(m);
|
||||||
|
|
||||||
buster.assert(false);
|
buster.assert(false);
|
||||||
@@ -72,7 +73,8 @@ buster.testCase("Remote functions", {
|
|||||||
|
|
||||||
buster.assert.equals(m.ledger_closed_index, 2);
|
buster.assert.equals(m.ledger_closed_index, 2);
|
||||||
done();
|
done();
|
||||||
}).on('error', function(m) {
|
})
|
||||||
|
.on('error', function(m) {
|
||||||
console.log("error: %s", m);
|
console.log("error: %s", m);
|
||||||
|
|
||||||
buster.assert(false);
|
buster.assert(false);
|
||||||
@@ -93,12 +95,14 @@ buster.testCase("Remote functions", {
|
|||||||
|
|
||||||
buster.assert('node' in r);
|
buster.assert('node' in r);
|
||||||
done();
|
done();
|
||||||
}).on('error', function(m) {
|
})
|
||||||
|
.on('error', function(m) {
|
||||||
console.log("error: %s", m);
|
console.log("error: %s", m);
|
||||||
|
|
||||||
buster.assert(false);
|
buster.assert(false);
|
||||||
}).request();
|
}).request();
|
||||||
}).on('error', function(m) {
|
})
|
||||||
|
.on('error', function(m) {
|
||||||
console.log("error: %s", m);
|
console.log("error: %s", m);
|
||||||
|
|
||||||
buster.assert(false);
|
buster.assert(false);
|
||||||
@@ -118,14 +122,16 @@ buster.testCase("Remote functions", {
|
|||||||
// console.log("account_root: %s", JSON.stringify(r));
|
// console.log("account_root: %s", JSON.stringify(r));
|
||||||
|
|
||||||
buster.assert(false);
|
buster.assert(false);
|
||||||
}).on('error', function(m) {
|
})
|
||||||
|
.on('error', function(m) {
|
||||||
console.log("error: %s", m);
|
console.log("error: %s", m);
|
||||||
|
|
||||||
buster.assert.equals(m.error, 'remoteError');
|
buster.assert.equals(m.error, 'remoteError');
|
||||||
buster.assert.equals(m.remote.error, 'malformedAddress');
|
buster.assert.equals(m.remote.error, 'malformedAddress');
|
||||||
done();
|
done();
|
||||||
}).request();
|
}).request();
|
||||||
}).on('error', function(m) {
|
})
|
||||||
|
.on('error', function(m) {
|
||||||
console.log("error: %s", m);
|
console.log("error: %s", m);
|
||||||
|
|
||||||
buster.assert(false);
|
buster.assert(false);
|
||||||
@@ -145,14 +151,16 @@ buster.testCase("Remote functions", {
|
|||||||
// console.log("account_root: %s", JSON.stringify(r));
|
// console.log("account_root: %s", JSON.stringify(r));
|
||||||
|
|
||||||
buster.assert(false);
|
buster.assert(false);
|
||||||
}).on('error', function(m) {
|
})
|
||||||
|
.on('error', function(m) {
|
||||||
console.log("error: %s", m);
|
console.log("error: %s", m);
|
||||||
|
|
||||||
buster.assert.equals(m.error, 'remoteError');
|
buster.assert.equals(m.error, 'remoteError');
|
||||||
buster.assert.equals(m.remote.error, 'entryNotFound');
|
buster.assert.equals(m.remote.error, 'entryNotFound');
|
||||||
done();
|
done();
|
||||||
}).request();
|
}).request();
|
||||||
}).on('error', function(m) {
|
})
|
||||||
|
.on('error', function(m) {
|
||||||
console.log("error: %s", m);
|
console.log("error: %s", m);
|
||||||
|
|
||||||
buster.assert(false);
|
buster.assert(false);
|
||||||
@@ -174,12 +182,14 @@ buster.testCase("Remote functions", {
|
|||||||
|
|
||||||
buster.assert('node_binary' in r);
|
buster.assert('node_binary' in r);
|
||||||
done();
|
done();
|
||||||
}).on('error', function(m) {
|
})
|
||||||
|
.on('error', function(m) {
|
||||||
console.log("error: %s", m);
|
console.log("error: %s", m);
|
||||||
|
|
||||||
buster.assert(false);
|
buster.assert(false);
|
||||||
}).request();
|
}).request();
|
||||||
}).on('error', function(m) {
|
})
|
||||||
|
.on('error', function(m) {
|
||||||
console.log(m);
|
console.log(m);
|
||||||
|
|
||||||
buster.assert(false);
|
buster.assert(false);
|
||||||
@@ -196,7 +206,8 @@ buster.testCase("Remote functions", {
|
|||||||
|
|
||||||
// Need to verify account and balance.
|
// Need to verify account and balance.
|
||||||
done();
|
done();
|
||||||
}).on('error', function(m) {
|
})
|
||||||
|
.on('error', function(m) {
|
||||||
console.log("error: %s", m);
|
console.log("error: %s", m);
|
||||||
|
|
||||||
buster.assert(false);
|
buster.assert(false);
|
||||||
|
|||||||
Reference in New Issue
Block a user