From 97fa2b238df36945dcd8434a101b5dafb6a470aa Mon Sep 17 00:00:00 2001 From: geho2 Date: Sun, 7 Jun 2020 08:10:19 +0200 Subject: [PATCH] Tesla crystal updates --- wallet/crystals/420_tesla/__init__.py | 2 +- wallet/crystals/420_tesla/static/tesla.js | 4 ++-- wallet/crystals/420_tesla/teslaapihandler.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/wallet/crystals/420_tesla/__init__.py b/wallet/crystals/420_tesla/__init__.py index be79f4b..d8bc8bd 100644 --- a/wallet/crystals/420_tesla/__init__.py +++ b/wallet/crystals/420_tesla/__init__.py @@ -36,7 +36,7 @@ def initialize(self): self.teslahandler = TeslaAPIHandler(self.bismuth,reg,unreg,op_data) address = "Bis1TeSLaWhTC2ByEwZnYWtsPVK5428uqnL46" - thresholds = {"reg": 50} + thresholds = {"reg": 25} checkfunc = {"f": self.teslahandler.checkID} self.assethandler = BismuthSimpleAsset(self.bismuth,address,reg,unreg,transfer,thresholds,checkfunc) diff --git a/wallet/crystals/420_tesla/static/tesla.js b/wallet/crystals/420_tesla/static/tesla.js index 3637db2..903b0e0 100644 --- a/wallet/crystals/420_tesla/static/tesla.js +++ b/wallet/crystals/420_tesla/static/tesla.js @@ -163,7 +163,7 @@ function teslaSubmit() { //If the account can unregister, it can also submit data $.post('check_vin_unregister', { vin_input: vin_input, _xsrf: xsrf }, function(data){ if(data != -1) { - send(address, 10.0, operation, out); + send(address, 1.0, operation, out); } else { message_post("Data submission not possible.","Check if the current wallet address has previously registered this VIN: " + vin_input,"warning"); } @@ -210,7 +210,7 @@ function RegisterVehicle() { var xsrf = $("[name='_xsrf']").val(); $.post('check_vin_register', { vin_input: vin_input, _xsrf: xsrf }, function(data){ if(data != -1) { - send(to, 50.0, operation, vin_input); + send(to, 25.0, operation, vin_input); } else { message_post("Invalid VIN or already registered.",vin_input,"warning"); } diff --git a/wallet/crystals/420_tesla/teslaapihandler.py b/wallet/crystals/420_tesla/teslaapihandler.py index 05ca13c..8c9c645 100644 --- a/wallet/crystals/420_tesla/teslaapihandler.py +++ b/wallet/crystals/420_tesla/teslaapihandler.py @@ -83,7 +83,7 @@ def get_chain_data(self,asset_id,addresses,variable,filter,range_unit,temperatur cycle_end = enddate for sender in addresses.split(","): - bisdata = self.bismuth.command(command, [sender,rec,op,10,False,t0,t1]) + bisdata = self.bismuth.command(command, [sender,rec,op,1,False,t0,t1]) for i in range(0,len(bisdata)): data = json.loads(bisdata[i][11]) vin = data["vin"]["0"]