From 2a00906597312bbb8d92d187549b79fcb8f99057 Mon Sep 17 00:00:00 2001 From: "David A. Harding" Date: Tue, 9 May 2017 14:25:02 -0400 Subject: [PATCH] Wallets: produce error if mismatch between platform and compats If a wallet contains a section for a particular platform, it must also contain that platform in its compatibility field. This commit adds a test for the above and corrects two existing mismatches. --- _templates/choose-your-wallet.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/_templates/choose-your-wallet.html b/_templates/choose-your-wallet.html index 3d9dbc85..05174019 100755 --- a/_templates/choose-your-wallet.html +++ b/_templates/choose-your-wallet.html @@ -116,7 +116,7 @@ wallets: - electrum: title: "Electrum" titleshort: "Electrum" - compat: "desktop windows mac linux" + compat: "desktop windows mac linux android" level: 2 platform: desktop: @@ -803,7 +803,7 @@ wallets: - coinspace: title: "Coin.Space" titleshort: "Coin.Space" - compat: "mobile web android windowsphone" + compat: "mobile web android windowsphone ios" level: 3 platform: mobile: @@ -1215,7 +1215,7 @@ wallets:

{{ wallet[1].title }}

-
{% for os in platform.os %}{% translate platform{{os}} %}{% endfor %}
+
{% for os in platform.os %}{% translate platform{{os}} %}{% unless wallet[1].compat contains os %}{% die platform not listed in compat field %}{% endunless %}{% endfor %}
{% if platform.link == 'bitcoincore' %}{% translate walletdownload %}{% elsif platform.link contains 'play.google.com' or platform.link contains 'itunes.apple.com' or platform.link contains 'chrome.google.com' %}{% translate walletdownload %}{% else %}{% translate walletvisit %}{% endif %}{% if platform.source %}{% translate walletsourcecode %}{% endif %}
{% for check in platform.check %}{% if check[0] == 'privacy' and platform.privacycheck %}