Skip to content

Commit

Permalink
Tesla crystal updates
Browse files Browse the repository at this point in the history
  • Loading branch information
geho2 committed Jun 7, 2020
1 parent 59e4b99 commit 97fa2b2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion wallet/crystals/420_tesla/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
4 changes: 2 additions & 2 deletions wallet/crystals/420_tesla/static/tesla.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
Expand Down Expand Up @@ -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");
}
Expand Down
2 changes: 1 addition & 1 deletion wallet/crystals/420_tesla/teslaapihandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down

0 comments on commit 97fa2b2

Please sign in to comment.