mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-20 12:15:51 +00:00
JS: Add is_native() to Amount.
This commit is contained in:
committed by
Stefan Thomas
parent
252a81f3e2
commit
5db1dafc98
@@ -221,6 +221,11 @@ var verify_balance = function (remote, src, amount_json, callback) {
|
||||
assert(4 === arguments.length);
|
||||
var amount = Amount.from_json(amount_json);
|
||||
|
||||
if (amount.is_native()) {
|
||||
// XXX Not implemented.
|
||||
callback(false);
|
||||
}
|
||||
else {
|
||||
remote.request_ripple_balance(src, amount.issuer.to_json(), amount.currency.to_json(), 'CURRENT')
|
||||
.once('ripple_state', function (m) {
|
||||
// console.log("BALANCE: %s", JSON.stringify(m));
|
||||
@@ -236,6 +241,7 @@ var verify_balance = function (remote, src, amount_json, callback) {
|
||||
callback(!m.account_balance.equals(amount));
|
||||
})
|
||||
.request();
|
||||
}
|
||||
};
|
||||
|
||||
var verify_balances = function (remote, balances, callback) {
|
||||
|
||||
Reference in New Issue
Block a user