Skip to content

Commit

Permalink
fix: added keypair.seed() secret param on Builder instance. (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
andresmachado authored and nebolsin committed Aug 31, 2018
1 parent 42a499d commit d834816
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions mobius_client_python/auth/challenge.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@
import random
import datetime


# Helper object for timestamps
class Time(object):
def __init__(self, min_time=0, max_time=0):
self.minTime = int(min_time)
self.maxTime = int(max_time)


# Generates challenge transaction on developer's side.
class Challenge(object):
def __init__(self, developer_secret, expires_in):
Expand All @@ -30,15 +32,18 @@ def call(self):
keypair = self.keypair()

builder = Builder(address=keypair.address().decode(),
sequence=self.random_sequence())
sequence=self.random_sequence(),
secret=keypair.seed())

builder.sign()

builder.add_memo(self.memo())
builder.add_time_bounds(self.build_time_bounds())

builder.append_payment_op(source=Keypair.random(),
destination=keypair.address().decode(),
amount='0.000001')
builder.sign(keypair.seed())
builder.sign()

te = builder.gen_te()

Expand Down

0 comments on commit d834816

Please sign in to comment.