Skip to content

Commit

Permalink
Merge pull request #199 from astroseger/insufficinet-funds-error-open…
Browse files Browse the repository at this point in the history
…-init-channel

Insufficinet funds error in 'snet channel open-init'
  • Loading branch information
astroseger authored Jan 30, 2019
2 parents 57c234b + f39aa0a commit e224ae1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions snet_cli/mpe_channel_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ def _get_expiration_from_args(self):
return rez

def _open_channel_for_service(self, metadata):
mpe_cogs = self.call_contract_command("MultiPartyEscrow", "balances", [self.ident.address])
if (mpe_cogs < self.args.amount):
raise Exception("insufficient funds. You MPE balance is %s AGI "%cogs2stragi(mpe_cogs))

group_id = metadata.get_group_id(self.args.group_name)
recipient = metadata.get_payment_address(self.args.group_name)

Expand Down

0 comments on commit e224ae1

Please sign in to comment.