added parsing FLO comments feature
This commit is contained in:
parent
30bf13f336
commit
99ed562a6d
@ -7408,7 +7408,8 @@
|
||||
this.buyer_public_key = null;
|
||||
this.buyer_key_signature = null;
|
||||
this.order_validator_public_key = null;
|
||||
this.rpc_job = null;
|
||||
this.rpc_job = null;
|
||||
this.floAddress = null;
|
||||
}
|
||||
|
||||
Trade.prototype = {
|
||||
@ -7481,6 +7482,27 @@
|
||||
},
|
||||
trade_sell() {
|
||||
console.log("sell is called");
|
||||
},
|
||||
/*Parse Flo Blockchain comments*/
|
||||
parse_flo_comments() {
|
||||
if (this.floAddress == null) { return false; }
|
||||
var request = new XMLHttpRequest();
|
||||
|
||||
request.open('GET', `https://livenet.flocha.in/api/txs/?address=${this.floAddress}`, true);
|
||||
request.onload = function () {
|
||||
|
||||
// Begin accessing JSON data here
|
||||
var data = JSON.parse(this.response);
|
||||
|
||||
if (request.status >= 200 && request.status < 400) {
|
||||
data.txs.forEach(tx => {
|
||||
console.log(tx.floData);
|
||||
});
|
||||
} else {
|
||||
console.log('error');
|
||||
}
|
||||
}
|
||||
request.send();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@ -7730,9 +7752,7 @@
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
return;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user