Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
EggPool committed Dec 11, 2018
1 parent 9b6fdc3 commit ab6e24e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
3 changes: 3 additions & 0 deletions History.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# History

## 0.0.65 - 2018-12-11

Incremental fixes to wallet creation location and small template tweak.

## 0.0.64 - 2018-12-11

Expand Down
3 changes: 2 additions & 1 deletion wallet/themes/material/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="/wallet/info">
<a class="nav-link" href="/wallet/info" title="{{ _('Wallet') }}">
<i class="material-icons">account_balance_wallet</i>
<i class="material-icons">lock_open</i>
<!-- todo: lock if wallet is encrypted and locked , other icon if no wallet, and if wallet is in clear -->
<p class="d-lg-none d-md-block">
Expand Down
8 changes: 5 additions & 3 deletions wallet/wallet.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
from bismuthclient import bismuthclient
from bismuthclient.bismuthutil import BismuthUtil

__version__ = '0.0.64' #
__version__ = '0.0.65' #

define("port", default=8888, help="run on the given port", type=int)
define("debug", default=False, help="debug mode", type=bool)
Expand Down Expand Up @@ -145,6 +145,7 @@ async def get(self):
if not self.bismuth_vars['address']:
self.bismuth_vars['address'] = 'None'
self.redirect("/wallet/load")
return
self.bismuth_vars['transactions'] = self.bismuth.latest_transactions(5, for_display=True)
self.render("home.html", bismuth=self.bismuth_vars)
# self.app_log.info("> home")
Expand Down Expand Up @@ -280,7 +281,7 @@ async def load(self, params=None):
self.redirect("/wallet/info")

async def info(self, params=None):
wallet_info = self.bismuth.wallet('wallets')
wallet_info = self.bismuth.wallet()
self.render("wallet_info.html", wallet=wallet_info, bismuth=self.bismuth_vars)

async def create(self, params=None):
Expand All @@ -289,7 +290,8 @@ async def create(self, params=None):
_ = self.locale.translate
wallet = param.replace('wallet=', '')
wallet = wallet.replace('.der', '') # just in case the user added .der
file_name = 'wallets/{}.der'.format(wallet)
wallet_dir = self.bismuth.user_subdir(BISMUTH_PRIVATE_DIR)
file_name = os.path.join(wallet_dir,'{}.der'.format(wallet))
if os.path.isfile(file_name):
self.render("message.html", type="warning", title=_("Error"), message=_("This file already exists: {}.der").format(wallet), bismuth=self.bismuth_vars)
else:
Expand Down

0 comments on commit ab6e24e

Please sign in to comment.