Skip to content

Commit

Permalink
Merge pull request #89 from Lamden/cl-79-update-documentation-after-l…
Browse files Browse the repository at this point in the history
…ots-of-changes

[#79] Update documentation after lots of changes
  • Loading branch information
Ola Czerepak authored Mar 2, 2018
2 parents 2e5b268 + fcd4483 commit 5f2d308
Show file tree
Hide file tree
Showing 2 changed files with 263 additions and 68 deletions.
15 changes: 14 additions & 1 deletion clove/network/monacoin.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
from clove.network.bitcoin import Bitcoin
from bitcoin.wallet import CBitcoinSecretError

from clove.network.bitcoin import Bitcoin, auto_switch_params


class Monacoin(Bitcoin):
Expand All @@ -19,6 +21,17 @@ class Monacoin(Bitcoin):
'SCRIPT_ADDR': 5,
'SECRET_KEY': 176
}
alternative_secret_key = 178

@classmethod
@auto_switch_params()
def get_wallet(cls, *args, **kwargs):
try:
return super().get_wallet(*args, **kwargs)
except CBitcoinSecretError:
cls.base58_prefixes['SECRET_KEY'], cls.alternative_secret_key = \
cls.alternative_secret_key, cls.base58_prefixes['SECRET_KEY']
return super().get_wallet(*args, **kwargs)


class MonacoinTestNet(Monacoin):
Expand Down
Loading

0 comments on commit 5f2d308

Please sign in to comment.