contract WalletPausable is Ownable {
    event WalletPaused(address account, address wallet);
    event WalletUnpaused(address account, address wallet);
    event WalletPausableRenounced(address account);

    mapping (address => bool) private _walletPaused;
    bool private _walletPausable;

    constructor () internal {
        _walletPausable = true;
    }     
 
    /**
     * @return True if the wallet is paused, false otherwise.
     */
    function walletPaused(address _wallet) public view returns (bool) {
        return _walletPaused[_wallet];
    }

    /**
     * @return True if the wallets are pausable, false otherwise.
     */
    function walletPausable() public view returns (bool) {
        return _walletPausable;
    }

    /**
     * @dev Modifier to make a function callable only when the wallet is not paused.
     */
    modifier whenWalletNotPaused(address _wallet) {
        require(!_walletPaused[_wallet]);
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the wallet is paused.
     */
    modifier whenWalletPaused(address _wallet) {
        require(_walletPaused[_wallet]);
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the wallets are not pausable.
     */
    modifier whenWalletNotPausable() {
        require(!_walletPausable);
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the wallets are pausable.
     */
    modifier whenWalletPausable() {
        require(_walletPausable);
        _;
    }

    /**
     * @dev Called by owner to pause wallet.
     */
    function pauseWallet(address _wallet) public onlyOwner whenWalletPausable whenWalletNotPaused(_wallet) {
        _pauseWallet(_wallet);
    }

    /**
     * @dev Pauses the wallet.
     */
    function _pauseWallet(address _wallet) internal {
        _walletPaused[_wallet] = true;
        emit WalletPaused(msg.sender, _wallet);
    }

    /**
     * @dev Called by owner to unpause wallet.
     */
    function unpauseWallet(address _wallet) public onlyOwner whenWalletPaused(_wallet) {
        _unpauseWallet(_wallet);
    }

    /**
     * @dev Unpauses the wallet.
     */
    function _unpauseWallet(address _wallet) internal {
        _walletPaused[_wallet] = false;
        emit WalletUnpaused(msg.sender, _wallet);
    }

    /**
     * @dev Called by owner to renounce the pausability of wallets.
     */
    function renounceWalletPausable() public onlyOwner whenWalletPausable {
        _walletPausable = false;
        emit WalletPausableRenounced(msg.sender);
    }
}
/**
 * @title WalletPausable
 * @dev Base contract which allows children to implement an emergency stop mechanism for wallets.
 */
function pauseWallet(address _wallet) public onlyOwner whenWalletPausable whenWalletNotPaused(_wallet) {
        _pauseWallet(_wallet);
    }
/**
 * @dev Called by owner to pause wallet.
 */