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

import akka.actor.ActorRef;
import akka.actor.UntypedActorContext;
 * Used to send (positive amount) or retrieve money (negative amount)
Michael Kmoch's avatar
Michael Kmoch committed
public class ActionReceiveTransaction extends Transaction {
Michael Kmoch's avatar
Michael Kmoch committed
    public ActionReceiveTransaction(int amount) {
        this.amount = amount;
    }

    @Override
    protected void onAction(ActorRef sender, ActorRef self,
                            UntypedActorContext context, AbstractWallet wallet) {
        wallet.addAmount(wallet.getAmount());
    }
Michael Kmoch's avatar
Michael Kmoch committed
}