Skip to content
Snippets Groups Projects
ActionGetAmountAnswer.java 688 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.AbstractWallet;
import fucoin.wallet.WalletImpl;
Michael Kmoch's avatar
Michael Kmoch committed

public class ActionGetAmountAnswer extends Transaction {

    public String address;
    public String name;
    public int amount;
Michael Kmoch's avatar
Michael Kmoch committed

    public ActionGetAmountAnswer(String address, String name, int amount) {
        this.address = address;
        this.name = name;
        this.amount = amount;
    }
Michael Kmoch's avatar
Michael Kmoch committed

    @Override
    protected void onAction(ActorRef sender, ActorRef self,
                            UntypedActorContext context, AbstractWallet wallet) {
        wallet.amounts.put(sender, amount);
    }