Skip to content
This repository was archived by the owner on May 16, 2019. It is now read-only.

Commit b8df55f

Browse files
committed
Remove CoinKite Wallet
- removes the no longer supported CoinKite wallet - fixes the randomization code - Closes #1725
1 parent d370bbf commit b8df55f

File tree

2 files changed

+7
-35
lines changed

2 files changed

+7
-35
lines changed

js/templates/buyWizard.html

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -210,24 +210,6 @@ <h2 class="margin0 marginTop80"><%= polyglot.t('buyFlow.HaveWallet') %></h2>
210210
</div>
211211
</div>
212212

213-
<!-- Coinkite -->
214-
<div class="width100 table padding15 borderBottom1 custCol-border js-bitcoinWalletProvider">
215-
<div class="floatLeft marginRight8">
216-
<a href="https://coinkite.com/promo/nwt1" target="_blank">
217-
<img src="imgs/wallet-providers/coinkite.png" class="thumbnail thumbnail-large-slim " />
218-
</a>
219-
</div>
220-
<div class="floatLeft width420 marginTop4">
221-
<div class="clearfix">
222-
<div class="marginBottom2 marginRight5 lineHeight21 textOpacity1 fontSize15">
223-
<a href="https://coinkite.com/promo/nwt1" class="js-externalLink textOpacity1">Coinkite <span class="ion-android-open fontSize10"></span></a>
224-
<span class="textOpacity50 fontSize12"><%= polyglot.t('walletProviders.WalletOnly') %></span>
225-
</div>
226-
<div class="textOpacity75 fontSize14"><%= polyglot.t('walletProviders.CoinkiteTagline') %></div>
227-
</div>
228-
</div>
229-
</div>
230-
231213
<!-- BitGo -->
232214
<div class="width100 table padding15 borderBottom1 custCol-border js-bitcoinWalletProvider">
233215
<div class="floatLeft marginRight8">

js/views/buyWizardVw.js

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,6 @@ var __ = require('underscore'),
1414
clipboard = require('clipboard'),
1515
templateHelpers = require('../utils/templateHelpers');
1616

17-
// randomize function
18-
$.fn.randomize = function(selector){
19-
var $elems = selector ? $(this).find(selector) : $(this).children(),
20-
$parents = $elems.parent();
21-
22-
$parents.each(function(){
23-
$(this).children(selector).sort(function(){
24-
return Math.round(Math.random()) - 0.5;
25-
}).detach().appendTo(this);
26-
});
27-
28-
return this;
29-
};
30-
3117
module.exports = baseModal.extend({
3218

3319
className: "buyView custCol-text insideApp",
@@ -220,9 +206,13 @@ module.exports = baseModal.extend({
220206
//auto select first payment type
221207
self.$el.find("input:radio[name=radioPaymentType]:first").attr('checked', true).trigger('click');
222208

223-
//randomize the bitcoin wallet providers 5 times
224-
for (var i = 0; i < 5; i++) {
225-
$(".js-BuyWizardWallets").randomize();
209+
//randomize the bitcoin wallet providers
210+
211+
let $allWallets = self.$(".js-BuyWizardWallets");
212+
let wallets = $allWallets.children('.js-bitcoinWalletProvider');
213+
214+
while (wallets.length){
215+
$allWallets.append(wallets.splice(Math.floor(Math.random() * wallets.length), 1)[0]);
226216
}
227217

228218
//set the QR details checkbox

0 commit comments

Comments
 (0)