Skip to content
Snippets Groups Projects
ActionReceiveTransaction.java 534 B
Newer Older
Michael Kmoch's avatar
Michael Kmoch committed
package fucoin.actions.transaction;

import akka.actor.ActorRef;
import akka.actor.UntypedActorContext;
import fucoin.Wallet;
//Used to send (positive amount) or retreive money (negative amount)
public class ActionReceiveTransaction extends Transaction {
	final public int amount;
    public ActionReceiveTransaction(int amount) {
        this.amount = amount;
    }
    
	@Override
	protected void onAction(ActorRef sender, ActorRef self,
			UntypedActorContext context, Wallet wallet) {
		wallet.addAmount(wallet.getAmount());
Michael Kmoch's avatar
Michael Kmoch committed
	}
}