mirror of
https://github.com/XRPLF/rippled.git
synced 2026-04-29 15:37:57 +00:00
JS: Add Currency.json_rewrite().
This commit is contained in:
@@ -232,6 +232,11 @@ var Currency = function () {
|
||||
this.value = NaN;
|
||||
}
|
||||
|
||||
// Given "USD" return the json.
|
||||
Currency.json_rewrite = function(j) {
|
||||
return Currency.from_json(j).to_json();
|
||||
};
|
||||
|
||||
Currency.from_json = function (j) {
|
||||
return (new Currency()).parse_json(j);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user