Newer
Older
package fucoin.actions.transaction;
import akka.actor.ActorRef;
import akka.actor.UntypedActorContext;
Simon Könnecke
committed
import fucoin.wallet.AbstractWallet;
/**
* Used to send (positive amount) or retrieve money (negative amount)
Simon Könnecke
committed
*/
public class ActionReceiveTransaction extends Transaction {
Simon Könnecke
committed
final public int amount;
public ActionReceiveTransaction(int amount) {
this.amount = amount;
}
Simon Könnecke
committed
@Override
protected void onAction(ActorRef sender, ActorRef self,
UntypedActorContext context, AbstractWallet wallet) {
wallet.addAmount(wallet.getAmount());
}