bitcoin-atm
bitcoin atm for pyc inc.
git clone https://9o.is/git/bitcoin-atm.git
PhoneNumber.scala
(440B)
1 package inc.pyc.chimera
2 package ddb
3
4 import akka.actor.Actor
5 import awscala.dynamodbv2.Condition
6
7 /**
8 * Save phone numbers when verified with an address.
9 * Primary Key is the bitcoin address.
10 */
11 class PhoneNumber extends Actor with DDB {
12 def receive = {
13 case (address: String, phone: Phone) =>
14 table.put(address, "phone" -> phone.number)
15
16 case address: BitcoinAddress =>
17 sender ! table.get(address.data)
18 }
19 }