mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-20 12:15:51 +00:00
Move from account create fee to reserve XRP.
This commit is contained in:
committed by
Stefan Thomas
parent
baf5799aa3
commit
c56b7662df
@@ -267,7 +267,7 @@ Remote.flags = {
|
||||
},
|
||||
|
||||
'Payment' : {
|
||||
'CreateAccount' : 0x00010000,
|
||||
'PaymentLegacy' : 0x00010000,
|
||||
'PartialPayment' : 0x00020000,
|
||||
'LimitQuality' : 0x00040000,
|
||||
'NoRippleDirect' : 0x00080000,
|
||||
@@ -277,7 +277,6 @@ Remote.flags = {
|
||||
// XXX This needs to be determined from the network.
|
||||
Remote.fees = {
|
||||
'default' : Amount.from_json("10"),
|
||||
'account_create' : Amount.from_json("1000000000"),
|
||||
'nickname_create' : Amount.from_json("1000"),
|
||||
'offer' : Amount.from_json("10"),
|
||||
};
|
||||
@@ -1260,15 +1259,8 @@ Transaction.prototype.submit = function (callback) {
|
||||
// YYY Might check paths for invalid accounts.
|
||||
|
||||
if (this.remote.local_fee && undefined === tx_json.Fee) {
|
||||
if ('Payment' === tx_json.TransactionType
|
||||
&& tx_json.Flags & Remote.flags.Payment.CreateAccount) {
|
||||
|
||||
tx_json.Fee = Remote.fees.account_create.to_json();
|
||||
}
|
||||
else {
|
||||
tx_json.Fee = Remote.fees['default'].to_json();
|
||||
}
|
||||
}
|
||||
|
||||
if (this.callback || this.listeners('final').length || this.listeners('lost').length || this.listeners('pending').length) {
|
||||
// There are listeners for callback, 'final', 'lost', or 'pending' arrange to emit them.
|
||||
@@ -1435,9 +1427,6 @@ Transaction.prototype.set_flags = function (flags) {
|
||||
// XXX Immediately report an error or mark it.
|
||||
}
|
||||
}
|
||||
|
||||
if (this.remote.local_fee && (this.tx_json.Flags & Remote.flags.Payment.CreateAccount))
|
||||
this.tx_json.Fee = Remote.fees.account_create.to_json();
|
||||
}
|
||||
|
||||
return this;
|
||||
|
||||
Reference in New Issue
Block a user