turl_rewrite - electrum - Electrum Bitcoin wallet
HTML git clone https://git.parazyd.org/electrum
DIR Log
DIR Files
DIR Refs
DIR Submodules
---
DIR commit 31c4849566cda04a131775365abadb65221485b8
DIR parent b83b7fa5c8157d51250d72d8dbfd5540724aa7b6
HTML Author: ThomasV <thomasv@gitorious>
Date: Tue, 2 Jun 2015 10:41:36 +0200
url_rewrite
Diffstat:
M lib/commands.py | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
---
DIR diff --git a/lib/commands.py b/lib/commands.py
t@@ -516,8 +516,12 @@ class Commands:
'expiration': v.get('expiration'),
}
if v.get('path'):
- p = self.config.get('url_prefix', 'file://')
- URI = 'bitcoin:?r=' + p + v.get('path')
+ url = 'file://' + v.get('path')
+ r = self.config.get('url_rewrite')
+ if r:
+ a, b = r
+ url = url.replace(a, b)
+ URI = 'bitcoin:?r=' + url
out['url'] = URI
return out