floTokenAPI v1.0.3b
- floGlobals.currency serves as getter and setter for DEFAULT.currency in tokenAPI module
This commit is contained in:
parent
29e20de25b
commit
9435592c8b
@ -1,4 +1,4 @@
|
||||
(function(EXPORTS) { //floTokenAPI v1.0.3a
|
||||
(function(EXPORTS) { //floTokenAPI v1.0.3b
|
||||
/* Token Operator to send/receive tokens via blockchain using API calls*/
|
||||
'use strict';
|
||||
const tokenAPI = EXPORTS;
|
||||
@ -20,6 +20,13 @@
|
||||
|
||||
if (floGlobals.currency) tokenAPI.currency = floGlobals.currency;
|
||||
|
||||
Object.defineProperties(floGlobals, {
|
||||
currency: {
|
||||
get: () => DEFAULT.currency,
|
||||
set: currency => DEFAULT.currency = currency
|
||||
}
|
||||
});
|
||||
|
||||
const fetch_api = tokenAPI.fetch = function(apicall) {
|
||||
return new Promise((resolve, reject) => {
|
||||
console.log(DEFAULT.apiURL + apicall);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user