Skip to content

Commit

Permalink
Merge branch 'release/0.1.32'
Browse files Browse the repository at this point in the history
  • Loading branch information
xeroc committed Sep 4, 2018
2 parents e0abfba + d67fedd commit 41e3d83
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 4 deletions.
54 changes: 54 additions & 0 deletions peerplays/cli/bos.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import click
from pprint import pprint
from prettytable import PrettyTable
from .decorators import onlineChain, unlockWallet, customchain
from .main import main
from .ui import pretty_print

from peerplays.account import Account
from peerplays.asset import Asset
from peerplays.sport import Sport, Sports
from peerplays.eventgroup import EventGroup, EventGroups
from peerplays.event import Event, Events
from peerplays.bettingmarketgroup import BettingMarketGroup, BettingMarketGroups
from peerplays.rule import Rule, Rules
from peerplays.proposal import Proposals
from peerplays.storage import configStorage as config


@main.group()
def bos():
""" BOS related calls
"""
pass


@bos.command()
@click.pass_context
@click.argument(
"eventids",
nargs=-1)
@customchain(bundle=True)
@unlockWallet
def cancel_event(ctx, eventids):
for eventid in eventids:
Event(eventid)
ctx.blockchain.event_update_status(
eventid,
"canceled",
)
click.echo(ctx.broadcast())


@bos.command()
@click.pass_context
@click.argument("account")
@onlineChain
@unlockWallet
def approve_all(ctx, account):
proposals = Proposals(account)
proposal_ids = {x["id"] for x in proposals}
click.echo(ctx.peerplays.approveproposal(
proposal_ids,
account=account
))
3 changes: 2 additions & 1 deletion peerplays/cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
bookie,
message,
rpc,
asset
asset,
bos
)

log = logging.getLogger(__name__)
Expand Down
2 changes: 1 addition & 1 deletion peerplaysapi/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import re
from grapheneapi.graphenewsrpc import RPCError
from grapheneapi.exceptions import RPCError


def decodeRPCErrorMsg(e):
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
ascii = codecs.lookup('ascii')
codecs.register(lambda name, enc=ascii: {True: enc}.get(name == 'mbcs'))

VERSION = '0.1.31'
VERSION = '0.1.32'

setup(
name='peerplays',
Expand Down Expand Up @@ -46,7 +46,7 @@
],
},
install_requires=[
"graphenelib==0.6.6",
"graphenelib<1.0.0",
"appdirs",
"prettytable",
"events==0.3",
Expand Down

0 comments on commit 41e3d83

Please sign in to comment.