bitcoin-atm

bitcoin atm for pyc inc.

git clone https://9o.is/git/bitcoin-atm.git

Overlord.scala

(1184B)


      1 package inc.pyc.chimera
      2 package snippet
      3 
      4 import System._
      5 import net.liftweb.json._
      6 import minions.SMSCode
      7 
      8 /**
      9  * Snippet to allow client to communicate with 
     10  * Overlord.
     11  */
     12 class Overlord extends ChimeraEventRegister {
     13   val topic = ""
     14     
     15   override val receive: Receive = {
     16     case JString("continue")                              => overlord ! Continue
     17     case JString("previous")                              => overlord ! Previous
     18     case JString("touch")                                 => overlord ! Touch
     19     case JString("buy")                                   => overlord ! Buy
     20     case JObject(List(JField("qrcode", JString(code))))   => overlord ! QrCode(code)
     21     case JObject(List(JField("phone", JString(number))))  => overlord ! Phone(number)
     22     case JObject(List(JField("email", JString(address)))) => overlord ! Email(address)
     23     
     24     case JObject(List(JField("phone", JString(number)), 
     25                   JField("verified", JBool(verified))))   => overlord ! Phone(number, true, verified)
     26     
     27     case JObject(List(JField("email", JString(email)), 
     28                   JField("password", JString(password)))) => overlord ! UserVerify(email, password)
     29   }
     30 }