remove callback logic from getprice
authorOwen Smith <owen@omsmith.ca>
Sat, 24 Nov 2012 03:19:51 +0000 (22:19 -0500)
committerOwen Smith <owen@omsmith.ca>
Sat, 24 Nov 2012 03:19:51 +0000 (22:19 -0500)
www/assets/js/client.js

index 5666992..d28036c 100644 (file)
@@ -11,14 +11,8 @@ PosClientWrapper = function (authKey, serverLocation) {
                return Sha1.hash(salt+_authKey);
        }
 
-       this.getPrice = function (upc, callback) {
-               if (callback === undefined) {
-                       return _client.getUPCPrice(upc) / 100;
-               }
-
-               _client.getUPCPrice(upc, function (p) {
-                       callback(p/100);
-               });
+       this.getPrice = function (upc) {
+               return _client.getUPCPrice(upc) / 100;
        }
 
        this.process = function (cardData, selection) {